Jump to content

making 2 or more mods in one cleo file


Saint Burak

Recommended Posts

Depends on the mod. It is possible to merge cleo scripts together, but the question is how hard is it to merge them together?

If you know how to make cleo scripts, you know how to merge them together.

Link to comment
Share on other sites

Ashwin.Star

Yeah, it is Possible & it's Easy

but make them both work properly at same time is a little Hard

Link to comment
Share on other sites

Saint Burak

 

Yeah, it is Possible & it's Easy

but make them both work properly at same time is a little Hard

can you give an example?

if you mean else jumps, I know that but there is must be another way.

Edited by Saint Burak
Link to comment
Share on other sites

Ashwin.Star

 

can you give an example?

Here you go,

 

Script one

 

{$cleo}thread 'one'0330: set_player $player_char infinite_run_to 105DC: end_custom_thread

 

 

Second

 

{$cleo}thread 'Two'05E0: 0@ = read_memory 0x94AD28 size 4 virtual_protect 00@ += 0x35405DF: write_memory 0@ size 4 value 9999.0 virtual_protect 005DC: end_custom_thread

 

 

The Result

 

{$cleo}thread 'LOL'0330: set_player $player_char infinite_run_to 105E0: 0@ = read_memory 0x94AD28 size 4 virtual_protect 00@ += 0x35405DF: write_memory 0@ size 4 value 9999.0 virtual_protect 005DC: end_custom_thread

 

 

It's a good Example isn't it ? lol.gif

<---------------------------------

How to merge & make them one

Actually Its

 

Depends on the mod

That What way will be better to do it

 

if you can't do it,

post it over here cuz i am Free ( my script is not working so, i am giving it a rest )

Edited by Ashwin the new boy
Link to comment
Share on other sites

Saint Burak
can you give an example?

Here you go,

 

Script one

 

{$cleo}thread 'one'0330: set_player $player_char infinite_run_to 105DC: end_custom_thread

 

 

Second

 

{$cleo}thread 'Two'05E0: 0@ = read_memory 0x94AD28 size 4 virtual_protect 00@ += 0x35405DF: write_memory 0@ size 4 value 9999.0 virtual_protect 005DC: end_custom_thread

 

 

The Result

 

{$cleo}thread 'LOL'0330: set_player $player_char infinite_run_to 105E0: 0@ = read_memory 0x94AD28 size 4 virtual_protect 00@ += 0x35405DF: write_memory 0@ size 4 value 9999.0 virtual_protect 005DC: end_custom_thread

 

 

It's a good Example isn't it ? lol.gif

<---------------------------------

How to merge & make them one

Actually Its

 

Depends on the mod

That What way will be better to do it

 

if you can't do it,

post it over here cuz i am Free ( my script is not working so, i am giving it a rest )

lol what a example lol.gif

Can you give a Real example bro? biggrin.gif

Link to comment
Share on other sites

 

making 2 or more mods in one cleo file

It all depends of what are you planing to do. If you want to force several actors or vehicles to do diferent work in CLEO scrypt then I could show you the way.

Link to comment
Share on other sites

This one combines a gate open script and a simple regeneration script, I made it very quick it could contain error's. I just had to insert some gosubs:

 

:MERGEthread 'MERGE'// Let's load things first$GATE_X = 191.141$GATE_Y = 1870.04$GATE3_Y = 1866.84$GATE1_Z = 18.4766$GATE2_Z = 16.4766$GATE3_Z = 16.9766$DES_GATE1 = 177.141$DES_GATE2 = 1884.04$DES_GATE3 = 1870.04$MANUALOVERRIDE = 0{GATE 1}4@ = 135.0975@ = 1951.49046@ = 19.39997@ = 135.84518@ = 1930.52839@ = 19.2209{GATE 2}10@ = 275.787611@ = 1821.6686 12@ = 17.6406 13@ = 295.433914@ = 1821.5704 15@ = 17.6406{GATE 3}16@ = 92.5317  17@ = 1920.9862 18@ = 18.013619@ = 100.586420@ = 1920.9558 21@ = 18.2755{RADIUS}22@ = 4.023@ = 10.0Model.Load(19101)Model.Load(19102)Model.Load(19103):A51GATES_2wait 0if andModel.Available(19101)Model.Available(19102)Model.Available(19103)jf @A51GATES_2$A51_GATE1 = Object.Create(19101, $GATE_X, $GATE_Y, $GATE1_Z)$A51_GATE2 = Object.Create(19102, $GATE_X, $GATE_Y, $GATE2_Z)$A51_GATE3 = Object.Create(19103, $GATE_X, $GATE3_Y, $GATE3_Z) :A51GATES_3wait 0if$MANUALOVERRIDE == 0gosub @HEALTHCHECKjf @A51GATES_3if or   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 4@ 5@ 6@ radius 23@ 23@ 23@   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 7@ 8@ 9@ radius 23@ 23@ 23@then   jump @A51GATES_4else   if or       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 10@ 11@ 12@ radius 23@ 23@ 23@       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 13@ 14@ 15@ radius 23@ 23@ 23@   then       jump @A51GATES_5   else       if or           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 16@ 17@ 18@ radius 22@ 22@ 22@           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 19@ 20@ 21@ radius 22@ 22@ 22@       then           jump @A51GATES_6       else           jump @A51GATES_3       end   endend:A51GATES_4wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0then   32@ = 0   repeat       wait 0       gosub @HEALTHCHECK   until 32@ > 4000   repeat       wait 0       gosub @HEALTHCHECK       034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0   until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0   jump @A51GATES_3else   jump @A51GATES_4end:A51GATES_5wait 0034E: move_object $A51_GATE2 to $GATE_X $DES_GATE2 $GATE2_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE2 near_point $GATE_X $DES_GATE2 radius 0.1 0.1 flag 0then   32@ = 0   repeat       wait 0       gosub @HEALTHCHECK   until 32@ > 4000   repeat       wait 0       gosub @HEALTHCHECK       034E: move_object $A51_GATE2 to $GATE_X $GATE_Y $GATE2_Z speed 0.1 0.1 0.0 flag 0   until 04E5:   object $A51_GATE2 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0   jump @A51GATES_3else   jump @A51GATES_5end:A51GATES_6wait 0034E: move_object $A51_GATE3 to $GATE_X $DES_GATE3 $GATE3_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE3 near_point $GATE_X $DES_GATE3 radius 0.1 0.1 flag 0then   32@ = 0   repeat       wait 0       gosub @HEALTHCHECK   until 32@ > 4000   repeat       wait 0       gosub @HEALTHCHECK       034E: move_object $A51_GATE3 to $GATE_X $GATE3_Y $GATE3_Z speed 0.1 0.1 0.0 flag 0   until 04E5:   object $A51_GATE3 near_point $GATE_X $GATE3_Y radius 0.1 0.1 flag 0   jump @A51GATES_3else   jump @A51GATES_6endjump @A51GATES_3:HEALTHCHECKif    Player.Defined($2)then   0226: 0@ = actor $3 health   if        0@ < 250   then       0@ += 5              if           0@ > 250       then           0@ = 250       end              0223: set_actor $3 health_to 0@   endendreturn

 

 

It was a SCM thread, hence the globals

Link to comment
Share on other sites

Ashwin.Star

 

Can you give a Real example bro?

Yeah, but you have to tell me the Type of those Two cleo scripts first, wink.gif

Link to comment
Share on other sites

Saint Burak
Look at this. This is an example of merging two more complicated script.

I just wanted an easy example.Cant understand this.

Link to comment
Share on other sites

There are people who didn't get a single answer and they use EDIT so stop bumping.

Link to comment
Share on other sites

 

Look at this. This is an example of merging two more complicated script.

I just wanted an easy example.Cant understand this.

You won't get anywhere with that attitude. wink.gif

 

There's been several examples posted in this topic already. Look at them until you do understand it, and if you still don't get it then you gotta re-read some tutorials.

23088_s.gif

Link to comment
Share on other sites

Saint Burak

my English is not enough to understand that codes.Can onyone give easier example? I've used gosub command but not what I want.example the first thread incrases wanted level and second thread decrases wanted level.can anyone do that?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.