Quantcast

Jump to content

» «
Photo

opcode to check if a certain mission completed ?

2 replies to this topic
spidermight
  • spidermight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#1

Posted 07 April 2012 - 03:09 AM

is there a opcode to check if a certain mission has been completed ?

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#2

Posted 07 April 2012 - 03:59 AM

i already told you that in other Topic
There is no such opcode Available,
even R* have used Global Variables in Main.scm to check if Mission is Passed or not,
like
CODE

$mission1_Passed = 0
$mission2_Passed = 0

////////////////// In Mission//////////////
:mission1_pass
$mission1_Passed = 1

/////////////// Mission 2 trigger ////////
:0
wait 0
if and
$mission1_Passed == 1
$mission2_Passed == 0
jf @0
start mission 2

spidermight
  • spidermight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#3

Posted 07 April 2012 - 12:05 PM

where in my scripts do i put this :
CODE

$mission1_Passed = 0
$mission2_Passed = 0

////////////////// In Mission//////////////
:mission1_pass
$mission1_Passed = 1

/////////////// Mission 2 trigger ////////
:0
wait 0
if and
$mission1_Passed == 1
$mission2_Passed == 0
jf @0
start mission 2


my script:
CODE
{$CLEO .cm}
:TestMiss_1
03A4: name_thread "Mission1"  
0050: gosub @TestMiss_main_1
00D6: if  0
0112:   wasted_or_busted
004D: jump_if_false @TestMiss_end_1
0050: gosub @TestMiss_fail_1                    

:TestMiss_end_1
0050: gosub @TestMiss_clep_1
004E: end_thread

:TestMiss_main_1
0317: increment_mission_attempts//here starts the missionscript
0004: $ONMISSION =  1

016A: fade 0 time 500

:load_army_guytalk
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk
Player.CanMove($PLAYER_CHAR, false)
Model.Load(#ARMY)
Model.Load(#m4)
model.Load(#CELLPHONE)
Model.Load(#WMYPLT)
model.Load(#micro_uzi)
04ED: load_animation "GANGS"

:army_guy_talker
wait 2000
if
  Model.Available(#ARMY)
else_jump @army_guy_talker
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 0
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(1@) = 1100  
Model.Destroy(#ARMY)

wait 9000
016A: fade 1 time 1000

:animation_talk2
wait 0                                              
if
04EE:   animation "GANGS" loaded
else_jump @animation_talk2

0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIA' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMO' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIB' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMT' time 5500 flag 1     //6 letters max in name
wait 5600
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIC' time 9000 flag 1     //6 letters max in name
wait 9100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
wait 100
0729: AS_actor 1@ hold_cellphone 1 // requires to load first the model #cellphone
wait 2000
00BC: show_text_highpriority GXT 'BMKID' time 7000 flag 1     //6 letters max in name
wait 7100
00BC: show_text_highpriority GXT 'BMKIE' time 2500 flag 1     //6 letters max in name
wait 2600
0729: AS_actor 1@ hold_cellphone 0
0249: release_model #CELLPHONE
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIF' time 8500 flag 1     //6 letters max in name
wait 8600
00BC: show_text_highpriority GXT 'BMKIG' time 8500 flag 1     //6 letters max in name
wait 8600
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
Player.CanMove($PLAYER_CHAR, true)
02A8: $terroristhouse = create_marker 0 at 766.5538 -555.8936 18.0129
00BC: show_text_highpriority GXT 'GTOTH' time 7000 flag 1       //6 letters max in name
03E5: show_text_box 'BINFOF'

:dead_check
wait 0                                                                                                                              
if
Actor.Dead(1@)
else_jump @not_in_sphere_check
jump @TestMiss_fail_1

:not_in_sphere_check
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
actor.DestroyInstantly(1@)
jump @teleport_to_terrorist_house

:teleport_to_terrorist_house
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @teleport_to_terrorist_house  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 766.5538 -555.8936 18.0129 radius 2.0 2.0 2.0 on_foot    //done
else_jump @teleport_to_terrorist_house
0164: disable_marker $terroristhouse
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 1
04E4: unknown_refresh_game_renderer_at 223.1581 1289.0724
03CB: set_rendering_origin_at 223.1581 1289.0724 1082.1328
0860: link_actor $PLAYER_ACTOR to_interior 1
00A1: put_actor $PLAYER_ACTOR at 223.1581 1289.0724 1082.1328
0173: set_actor $PLAYER_ACTOR Z_angle_to 6.9519
0001: wait 500 ms
016A: fade 1 time 1000

:intel_pickup
0213: $PICKUP_INTEL_BM = create_pickup #BRIEFCASE type 3 at 232.0651 1287.4071 1082.1406
wait 0
if
0214:   pickup $PICKUP_INTEL_BM picked_up
else_jump @intel_pickup
00BC: show_text_highpriority GXT 'GNEWSO' time 4000 flag 1       //6 letters max in name
wait 4100
jump @tele_out

:tele_out
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 0
04E4: unknown_refresh_game_renderer_at 766.5538 -555.8936
03CB: set_rendering_origin_at 766.5538 -555.8936 18.0129
0860: link_actor $PLAYER_ACTOR to_interior 0
00A1: put_actor $PLAYER_ACTOR at 766.5538 -555.8936 18.0129
0173: set_actor $PLAYER_ACTOR Z_angle_to 358.6452
0001: wait 500 ms
016A: fade 1 time 1000

:bad_guy
wait 1000
if
  Model.Available(#WMYPLT)
else_jump @bad_guy
0860: link_actor $PLAYER_ACTOR to_interior 0
2@ = Actor.Create(Mission1, #WMYPLT, 768.6641, -543.2671, 16.5837)    // done
0860: link_actor $PLAYER_ACTOR to_interior 0
Actor.Angle(2@) = 165.4577
Actor.WeaponAccuracy(2@) = 100
0446: set_actor 2@ immune_to_headshots 1
07DD: set_actor 2@ temper_to 100 // see pedstats.dat  
03FE: set_actor 2@ money 0
01B2: give_actor 2@ weapon 28 ammo 30000 // Load the weapon model before using this
Actor.Health(2@) = 400  
Model.Destroy(#WMYPLT)
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
00BC: show_text_highpriority GXT 'KLLTO' time 7000 flag 1       //6 letters max in name

:dead_check2
wait 0                                                                                                                              
if
Actor.Dead(2@)
else_jump @dead_check2
actor.RemoveReferences(2@)
00BC: show_text_highpriority GXT 'GTORT' time 7000 flag 1       //6 letters max in name
player.ClearWantedLevel($PLAYER_CHAR)
02A8: $btoport = create_marker 0 at 240.6784 57.4507 2.5064
jump @load_army_guytalk2

:load_army_guytalk2
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk2  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk2
jump @army_guy_talker2

:army_guy_talker2
wait 0
if
  Model.Available(#ARMY)
else_jump @army_guy_talker2
3@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(3@) = 173.9185
Actor.WeaponAccuracy(3@) = 100
0446: set_actor 3@ immune_to_headshots 0
07DD: set_actor 3@ temper_to 100 // see pedstats.dat  
03FE: set_actor 3@ money 0
01B2: give_actor 3@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(3@) = 1100  
Model.Destroy(#ARMY)

:go_back_to_report
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @go_back_to_report  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 2.0 2.0 2.0 on_foot    //done
else_jump @go_back_to_report
Player.CanMove($PLAYER_CHAR, false)
0164: disable_marker $btoport
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJFMON' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 3@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIH' time 7000 flag 1       //6 letters max in name
wait 7100
jump @TestMiss_pass_1

:TestMiss_pass_1
0394: play_music 1
player.ClearWantedLevel($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR, true)
0998: add_respect 10
00BA: text_styled 'MBPASS'  1000 ms  2
03E5: show_text_box 'BINFOF'
jump @TestMiss_clep_1

:TestMiss_fail_1
00BA: text_styled 'MBFAIL'  1000 ms  1
jump @TestMiss_clep_1

:TestMiss_clep_1
0004: $ONMISSION =  0
00D8: mission_cleanup
0051: return
//////////////////////next///////////////////////////////
{$CLEO .cs}

:Test_M_Start_1
03A4: name_thread 'Mission1starter'

:Start_load
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @Start_load  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0       //done
else_jump @Start_load
Model.Load(#ARMY)

:army_guy1
wait 0
if
  Model.Available(#ARMY)
else_jump @army_guy1
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //done      //Cutscene talking guy
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 1
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this  
Actor.Health(1@) = 600
Model.Destroy(#ARMY)

:not_base_sphere
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
wait 0
actor.DestroyInstantly(1@)
03BD: destroy_sphere 2@
jump @Start_load

:dead_check
wait 0
if
Actor.Dead(1@)
jf @Test_M_Start_2
jump @end_all

:end_all
actor.DestroyInstantly(1@)
jump @Start_load

:Test_M_Start_2
03BD: destroy_sphere 2@
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Test_M_Start_2
00D6: if  0
0038:   $ONMISSION ==  0  // integer values
004D: jump_if_false @Test_M_Start_2

:Test_M_Start_6
03BC: 2@ = create_sphere_at 240.6784 57.4507 2.5064 radius 2.0
00D6: if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 1.0 1.0 1.0 on_foot
004D: jump_if_false @not_base_sphere
00BA: text_styled 'MSAB'  1000 ms  2
actor.DestroyInstantly(1@)
0004: $ONMISSION =  1  // integer values
0A94: start_custom_mission "Mission1"  
jump @Test_M_Start_2




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users