[SNIPPET] RUN CLEO IN CLEO

{$CLEO .cs}
0000:
0662: NOP "#########################"
0662: NOP "___Made by Opcode.eXe___"  { BASIC THREAD }
0662: NOP "Www.Youtube.Com/OpcodeXe"
0662: NOP "#########################"

0AB1: call_scm_func @RUN_CLEO_MOD 1 AT LINE [member=7534]cLeo[/member]


WHILE TRUE
    wait 0
    if
    0AB0: 49 // X
    then
        0AD1: show_formatted_text_highpriority "CLEO THREAD_1 IS RUNNING! %d" time 1 33@
    end
END


:CLEO
0000:
WHILE TRUE
    wait 0
    if
    0AB0: 50 // X
    then
        0AD1: show_formatted_text_highpriority "CLEO THREAD_2 IS RUNNING! %d" time 1 33@
    end
END


:RUN_CLEO
0A9F: 32@ = current_thread_pointer
000A: 32@ += 0x10
0A8D: 32@ = read_memory 32@ size 4 virtual_protect 0
0062: 32@ -= 0@
0AA7: call_function 0x464C20 num_params 1 pop 1 32@ 33@
005A: 32@ += 0@
000A: 33@ += 0x10
0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0
000A: 33@ += 0x2C
for 32@ = 0 to 30
    0A8C: write_memory 33@ size 4 value 1@(32@,30i) virtual_protect 0
    000A: 33@ += 4
end
0AB2: ret 0
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Re: RUN CLEO IN CLEO

does this load a cleo mod?
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
Re: RUN CLEO IN CLEO

wat

how can you run CLEO in CLEO? What will run CLEO as .cs if there is no CLEO to run CLEO in .cs in the first place? So how will CLEO run itself? wat


oooh you should've said CLEO mod with another mod in same .cs xD
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Re: RUN CLEO IN CLEO

post more snippets they really help
 

LongJohnMilkeyway

New member
Joined
Mar 8, 2014
Messages
3
Reaction score
1
Re: RUN CLEO IN CLEO

nice, but you can do that also with 0A92:, thats easier and pass about 30 params to the new thread
give that script the name MultiThread.cs , same as in 0A92
Code:
{$CLEO .cs}
:MultiThread
0662: NOP "www.youtube.com/watch?v=0dLfx_8zZ0I"
if
0@ == 0
else_jump @MultiThread_20

thread 'MULTHRD'
0A92: create_custom_thread "MultiThread.cs" 1 2 3 4 

    while true
    wait 0
    03F0: enable_text_draw 1  
    045A: draw_text_1number 100.0 100.0 GXT 'NUMBER' number 0@ 
    end 


:MultiThread_20// second thread
if
0@ == 1
then
    03A4: name_thread 'SECONDT'

    while true
        wait 0
        03F0: enable_text_draw 1  
        045A: draw_text_1number 150.0 120.0 GXT 'NUMBER' number 0@
        045A: draw_text_1number 160.0 120.0 GXT 'NUMBER' number 1@ 
        045A: draw_text_1number 170.0 120.0 GXT 'NUMBER' number 2@
        045A: draw_text_1number 180.0 120.0 GXT 'NUMBER' number 3@ 
    end

else
    0A93: end_custom_thread
end
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
226
Location
( ͡° ͜ʖ ͡°)
Re: RUN CLEO IN CLEO

LongJohnMilkeyway link said:
nice, but you can do that also with 0A92:, thats easier and pass about 30 params to the new thread
give that script the name MultiThread.cs , same as in 0A92
Code:
{$CLEO .cs}
:MultiThread
0662: NOP "www.youtube.com/watch?v=0dLfx_8zZ0I"
if
0@ == 0
else_jump @MultiThread_20

thread 'MULTHRD'
0A92: create_custom_thread "MultiThread.cs" 1 2 3 4 

    while true
    wait 0
    03F0: enable_text_draw 1  
    045A: draw_text_1number 100.0 100.0 GXT 'NUMBER' number 0@ 
    end 


:MultiThread_20// second thread
if
0@ == 1
then
    03A4: name_thread 'SECONDT'

    while true
        wait 0
        03F0: enable_text_draw 1  
        045A: draw_text_1number 150.0 120.0 GXT 'NUMBER' number 0@
        045A: draw_text_1number 160.0 120.0 GXT 'NUMBER' number 1@ 
        045A: draw_text_1number 170.0 120.0 GXT 'NUMBER' number 2@
        045A: draw_text_1number 180.0 120.0 GXT 'NUMBER' number 3@ 
    end

else
    0A93: end_custom_thread
end

We got a smart ass over here :D not bad
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Re: RUN CLEO IN CLEO

Flamez link said:
How to use this, by the way?

{$CLEO.cs}
0000:

0AB1: call_scm_func @RUN_CLEO_MOD 1 AT LINE @CLEO_2
{ We use this 0AB1 to call the function to the Second CLEO and so on... not the FIRST one }


:CLEO_1
wait 0
if
0ADC: "DUM"
jf @CLEO_1
print "I'M DA LOVE OF DA NIGGAZ" 696969
jump @CLEO_01
// Finish first thread , now to the second thread.

:CLEO_2 // this the one that use the func "RUN CLEO IN CLEO" we've called.
wait 0
if
key_down 2
jf @CLEO_2
print "I'm DA NIGGAZ TOOOOOO" 969696
jump @CLEO_2 // DONE


// now paste the snippsets to the end of CLEO
{ we need to paste it otherwise there is nothing to call the func.}

:RUN_CLEO_MOD
0A9F: 32@ = current_thread_pointer
000A: 32@ += 0x10
0A8D: 32@ = read_memory 32@ size 4 virtual_protect 0
0062: 32@ -= 0@
0AA7: call_function 0x464C20 num_params 1 pop 1 32@ 33@
005A: 32@ += 0@
000A: 33@ += 0x10
0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0
000A: 33@ += 0x2C
for 32@ = 0 to 30
    0A8C: write_memory 33@ size 4 value 1@(32@,30i) virtual_protect 0
    000A: 33@ += 4
end
0AB2: ret 0

// NOW 2 CLEOS GONNA BE COMBINED TO 1 CLEO only :b have fun~
 

WaTTi

Well-known member
Joined
Jan 4, 2015
Messages
260
Reaction score
8
Re: RUN CLEO IN CLEO

I can use this for more than 2 clos in one?
 

Spix

Well-known member
Joined
Sep 23, 2013
Messages
353
Reaction score
1
Opcode.eXe link said:
{$CLEO .cs}
0000:
0662: NOP "#########################"
0662: NOP "___Made by Opcode.eXe___"  { BASIC THREAD }
0662: NOP "Www.Youtube.Com/OpcodeXe"
0662: NOP "#########################"

0AB1: call_scm_func @RUN_CLEO_MOD 1 AT LINE [member=7534]cLeo[/member]






WHILE TRUE
    wait 0
    if
    0AB0: 49 // X
    then
        0AD1: show_formatted_text_highpriority "CLEO THREAD_1 IS RUNNING! %d" time 1 33@
    end
END


:CLEO
0000:
WHILE TRUE
    wait 0
    if
    0AB0: 50 // X
    then
        0AD1: show_formatted_text_highpriority "CLEO THREAD_2 IS RUNNING! %d" time 1 33@
    end
END


:RUN_CLEO
0A9F: 32@ = current_thread_pointer
000A: 32@ += 0x10
0A8D: 32@ = read_memory 32@ size 4 virtual_protect 0
0062: 32@ -= 0@
0AA7: call_function 0x464C20 num_params 1 pop 1 32@ 33@
005A: 32@ += 0@
000A: 33@ += 0x10
0A8C: write_memory 33@ size 4 value 32@ virtual_protect 0
000A: 33@ += 0x2C
for 32@ = 0 to 30
    0A8C: write_memory 33@ size 4 value 1@(32@,30i) virtual_protect 0
    000A: 33@ += 4
end
0AB2: ret 0

Possible to send variables? then how?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
149
the same way you pass them to any other function

example

Code:
0AB1: @RUN_CLEO 8 AT LINE @Box_Actor_Timed TIME 1000 Actor_handle 0@ RGBA 255 72 0 255 THICKNESS 2.0

:Box_Actor_Timed
0000:
32@ = 0 
repeat
    wait 0
    0AB1: @Box_Actor 6 Actor_handle 1@ Red 2@ Green 3@ Blue 4@ Alpha 5@ Thickness 6@
until 001D:   32@ > 0@
004E: END_THIS_THREAD
0A93: END_THIS_THREAD
 

Spix

Well-known member
Joined
Sep 23, 2013
Messages
353
Reaction score
1
monday link said:
the same way you pass them to any other function

example

Code:
0AB1: @RUN_CLEO 8 AT LINE @Box_Actor_Timed TIME 1000 Actor_handle 0@ RGBA 255 72 0 255 THICKNESS 2.0

:Box_Actor_Timed
0000:
32@ = 0 
repeat
    wait 0
    0AB1: @Box_Actor 6 Actor_handle 1@ Red 2@ Green 3@ Blue 4@ Alpha 5@ Thickness 6@
until 001D:   32@ > 0@
004E: END_THIS_THREAD
0A93: END_THIS_THREAD

Its that simple, thanks brother :) !
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
149
actually when i think about it I have no idea why it works  :looky:
But i remember that this code was working properly
 
Top