############ ### MAIN ### ############ func void main(void) { gl_fog_red = 0 gl_fog_blue = 0 gl_fog_green = 0 gl_fog_start = .995 gs_farclipplane_set 5000 ui_suppress_prompt = 1 chr_auto_aim_dist = 0 start } ############# ### START ### ############# func void start(string ai_name) { fork deactivate_stuff if(save_point eq 0) save_point = 1 if(save_point eq 1) fork intro if(save_point eq 2) fork load_s2 if(save_point eq 3) fork load_s3 if(save_point eq 4) fork load_s4_all sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable trigger_volume_02 0 trigvolume_enable trigger_volume_03 0 trigvolume_enable trigger_volume_04 0 trigvolume_enable trigger_volume_04_copy 0 trigvolume_enable trigger_volume_05 0 trigvolume_enable trigger_volume_06 0 trigvolume_enable trigger_volume_07 0 trigvolume_enable trigger_volume_07_copy 0 trigvolume_enable trigger_volume_08 0 trigvolume_enable trigger_volume_08_copy2 0 trigvolume_enable trigger_volume_08_copy2_copy 0 trigvolume_enable trigger_volume_08_copy2_copy_copy 0 trigvolume_enable trigger_volume_10_copy 0 trigvolume_enable trigger_volume_10_copy_copy 0 trigvolume_enable trigger_volume_11 0 trigvolume_enable trigger_volume_23 0 trigvolume_enable trigger_volume_23_copy 0 trigvolume_enable trigger_volume_26 0 trigvolume_enable trigger_volume_29_copy 0 trigvolume_enable trigger_volume_30 0 trigvolume_enable trigger_volume_31 0 trigvolume_enable trigger_volume_32 0 trigvolume_enable trigger_volume_33 0 trigvolume_enable trigger_volume_35 0 trigvolume_enable trigger_volume_44 0 trigvolume_enable trigger_volume_46 0 trigvolume_enable trigger_volume_46_copy 0 trigvolume_enable trigger_volume_46_copy2 0 trigvolume_enable trigger_volume_46_copy3 0 trigvolume_enable trigger_volume_46_copy_copy 0 trigvolume_enable trigger_volume_46_copy4 0 trigvolume_enable trigger_volume_46_copy4_copy 0 trigvolume_enable trigger_volume_52 0 trigvolume_enable trigger_volume_56 0 trigvolume_enable trigger_volume_60 0 trigvolume_enable trigger_volume_61 0 trigvolume_enable trigger_volume_65 0 trigvolume_enable trigger_volume_77 0 trigvolume_enable trigger_volume_78 0 trigvolume_enable trigger_volume_80 0 trigvolume_enable trigger_volume_83 0 trigvolume_enable trigger_volume_84 0 #used env_show 31 0 env_show 41 0 env_shade 1500 1501 .9 .8 .9 } func void you_lose(string ai_name) { fade_out 0 0 0 30 sleep 30 lose } #################################### ### SEVERAL TIMES USED FUNCTIONS ### #################################### func void sp_all(void) { co_message_display = 0 if(save_point eq 1) save_game 1 autosave if(save_point eq 2) save_game 2 autosave if(save_point eq 3) save_game 3 autosave if(save_point eq 4) save_game 4 autosave sleep 180 co_message_display = 1 } func void remove_ai(void) { ai2_kill sleep 60 powerup_reset weapon_reset sleep 240 corpse_reset } func void music_stop(void) { sound_music_stop mus_cool19 sound_music_stop mus_atm_cl12lp sound_music_stop mus_low1 sound_music_stop mus_fitec } #tv63 to tv73 func void deathfall(void) { sleep 30 cm_detach sleep 30 chr_set_health 0 0 } ########## ### SP1 ### ########## ### 1ST ROOF ### func void intro(void) { playback 0 IntroKonoko if(save_point ne 1) save_game 1 autosave chr_envanim_stop IntroNinja chr_teleport IntroNinja 600 chr_facetoflag IntroNinja 600 chr_animate IntroNinja NINCOMcrouch_idle ai2_passive IntroNinja 1 ai2_setmovementmode IntroNinja creep sleep 40 playback_block IntroNinja IntroNinja ai2_passive IntroNinja 0 ai2_attack IntroNinja 0 ai2_setalert A_Sr9 combat ai2_setjobstate A_Sr9 objective_set 1 silent target_set 7006 0 } #tv29 - crossing point to the lower floor func void t22(string ai_name) { ai2_dopath IntroNinja patrol_39 ai2_setjobstate IntroNinja } #tv32 - box on the right side (enter func: t33in, levae func: t33out); I've disabled it #tv31 - box on the left side (enter func: t32in, levae func: t32out); I've disabled it #tv1 - above the abyss func void t1(string ai_name) { ai2_dopath IntroNinja patrol_40 ai2_setjobstate IntroNinja ai2_dopath A_N1 patrol_02 ai2_setjobstate A_N1 ai2_dopath A_Sr9 patrol_09 ai2_setjobstate A_Sr9 ai2_spawn A_N7 ai2_spawn A_N8 } func void patrolscript0001(string ai_name) { playback_block IntroNinja ninja_jump5 interp 30 } func void patrolscript0022(string ai_name) { playback_block IntroNinja ninja_jump4 interp 20 } func void patrolscript0002(string ai_name) { playback_block A_N1 ninja_jump interp 30 } func void patrolscript0005(string ai_name) { playback_block A_T4 tanker1 interp 20 } func void patrolscript0004(string ai_name) { playback_block A_T6 tanker2 interp 20 } ### 2ND ROOF ### #tv55 - after the abyss, at the beginning of the 2nd roof (enter func: t57, leave func: t57b); I've disabled it ### 3RD ROOF ### #tv56 - after the abyss, at the beginning of the 3rd roof func void t58(string ai_name) { sound_music_start mus_cool19 0.0 sound_music_volume mus_cool19 0.75 3.0 ai2_dopath IntroNinja patrol_51 ai2_setjobstate IntroNinja ai2_dopath A_N1 patrol_50 ai2_setjobstate A_N1 ai2_dopath A_Sr9 patrol_49 ai2_setjobstate A_Sr9 ai2_spawn A_C5 ai2_spawn A_Sr3 ai2_spawn A_T4 ai2_spawn A_T6 particle b01_rain1 do start particle b01_rain2 do start particle b01_rain3 do start } #tv35 - after tv56 (func: rain1); I've disabled it ### 4TH ROOF ### #tv4 - at the right side of the mast (func: t3); I've disabled it #tv2 - at the left side of the mast (func: t2); I've disabled it ### 5TH ROOF ### #tv57 - after the abyss, at the beginning of the 5th roof (enter func: t59, leave func: t59b); I've disabled it #tv5 - on the right side after tv59 (func: t5); I've disabled it #tv4 - on the left side after tv59 (func: t4); I've disabled it #lose func of A_T4 and A_T6: music_stop #tv6 - around the place, where you find the hypo (func: t6); I've disabled it #tv7 - in front of the staircase to the higher floor (funnc: b01); not used #tv30 - under the passageway; near the place, where you find the shield (func: t31); I've disabled it #tv33 - after tv7 (func: t7); I've disabled it #tv34 - after tv33, on the right side after the staircase (func: b02); not used #tv8 - in front of tv38 (func: rain1); I've disabled it #tv37 - in front of tv38 (func: rain2); I've disabled it #tv36 - in front of the passage, from the left side to the right side func void t8(string ai_name) { music_stop chr_delete IntroNinja chr_delete A_N1 chr_delete A_Sr9 ai2_spawn B_Sr10 ai2_spawn B_Sr10a ai2_spawn B_R11 ai2_spawn B_R12a ai2_spawn B_Sr12 ai2_spawn B_T13 ai2_dopath A_T6 patrol_42 ai2_setjobstate A_T6 ai2_dopath A_T4 patrol_42 ai2_setjobstate A_T4 ai2_setjobstate A_Sr3 ai2_setjobstate A_C5 ai2_dopath A_N7 patrol_45 ai2_setjobstate A_N7 ai2_dopath A_N8 patrol_45 ai2_setjobstate A_N8 } func void patrolscript0011(string ai_name) { playback_block B_T13 tanker_jump interp 30 } #tv39 - in the middle of the passage, from the left side to the right side (func: rain2); I've disabled it) #tv38 - in the middle of the passage, after tv39, from the left side to the right side (func: rain3); I've disabled it) #tv80 - after the passage, from the left side to the right side func void runup(void) { ai2_dopath B_Sr10 patrol_10z ai2_setjobstate B_Sr10 particle b02_rain1 do start particle b02_rain2 do start particle b02_rain3 do start } ### 6TH ROOF ### #tv9 - at the beginning of the 6th roof, from the left side to the right side func void t10(string ai_name) { sound_dialog_play c11_39_03konoko ai2_spawn B_SuperNinja chr_boss_shield B_SuperNinja chr_unstoppable B_SuperNinja 1 chr_neutral B_SuperNinja 1 playback_block B_SuperNinja superninja1 interp 20 sleep 60 chr_delete B_SuperNinja } #tv85 - at the same place as tv9 (enter func: t83, leave func: t83b); I've disabled it #tv41 - after tv85, from the left side to the right side (func: rain4); I've disabled it #tv40 - in some distance after tv 85, from the left side to the right side (enter func: rain5, leave func: t77); I've disabled it #tv58 - at the end of the 6th roof, where you can jump to the 7th roof (eneter func: t60, leave func: t60b); I've disabled it ### 7TH ROOF ### #t42 - at the beginning of the 7th roof func void t11(string ai_name) { ai2_spawn C_N17 ai2_spawn C_N18 ai2_dopath B_T13 patrol_41 ai2_setjobstate B_T13 particle el1_locklight01 do start particle b03_rain1 do start particle b03_rain2 do start particle b03_rain3 do start } #tv10 - after tv42 (func: rain6); I've disabled it #tv74 - around the entrance of the elavator and in the elevator; used to count the enemies inside it; see next func #tv11 - in the middle of the elevator func void t12(string ai_name) { trigvolume_enable trigger_volume_12 0 if(trigvolume_count(62) eq 0) Elevator else { sleep 60 trigvolume_enable trigger_volume_12 1 } } ########## ### SP2 ### ########## func void Elevator(void) { sound_dialog_play c11_39_02konoko fade_out 0 0 0 30 sleep 30 load_s2 chr_facetoflag 0 44 chr_teleport 0 44 fade_in 30 } func void load_s2(void) { fork remove_ai if(save_point eq 2) restore_game ai2_spawn C_Sr15 ai2_spawn C_T16 ai2_spawn C_R55 ai2_spawn C_N57 ai2_spawn D_C19 ai2_spawn D_Sb20 ai2_spawn D_R21 env_show 31 1 objective_set 1 silent target_set 47 0 } ### 1ST ROOF ### func void patrolscript0077(string ai_name) { ai2_dopath D_R21 patrol_21 ai2_setjobstate D_R21 } #tv12 - after door 3 func void s2(string ai_name) { if(save_point eq 2) { particle b03_rain1 do start particle b03_rain2 do start particle b03_rain3 do start } else { save_game 2 autosave particle b01_rain1 do stop particle b01_rain2 do stop particle b01_rain3 do stop particle b02_rain1 do stop particle b02_rain2 do stop particle b02_rain3 do stop } } #tv75 - after the stairs to the higher floor (func: t65); I've disabled it ### 2ND ROOF ### #tv43 - complete 2nd roof (func: rain7); I've disabled it #tv48 - above the abyss, crossing from the 2nd roof to the 3rd roof (func: rain9); I've disabled it ### 3RD ROOF ### #tv17 - at the beginning of the 3rd roof func void t18(string ai_name) { sound_music_start mus_atm_cl12lp 0.0 sound_music_volume mus_atm_cl12lp 0.75 3.0 particle b04_rain1 do start particle b04_rain2 do start particle b04_rain3 do start particle b04_rain4 do start particle b04_rain5 do start particle b04_rain6 do start } #tv48 - at the same place as tv17 (func: rain9); I've disabled it #tv45 - in some distance after tv48 (func: rain10); I've disabled it #tv46 - in some distance after tv45 (func: rain11); I've disabled it #tv47 - in some distance after tv46 (func: rain12); I've disabled it #tv53 - in some distance after tv47 (func: rain12); I've disabled it #tv49 - in some distance after tv53 (func: rain13); I've disabled it #tv76 - in some distance in front of of the end of the right "colonnade" (func: t77); I've disabled it #tv77 - at the end of the left "colonnade" (func: t78); I've disabled it #tv13 - at the end of the 3rd roof func void t14(string ai_name) { music_stop ai2_spawn D_Sb22 ai2_spawn D_Sb23 ai2_spawn D_Sr24 ai2_spawn D_Sr38 ai2_spawn D_C60 ai2_dopath D_Sb20 patrol_35 target_set 1 0 particle b06_rain1 do start particle b06_rain2 do start particle b06_rain3 do start particle b06_rain4 do start particle b06_rain5 do start particle b06_rain6 do start } ### 4TH ROOF ### func void patrolscript0014(string ai_name) { playback_block D_Sb20 striker_jump interp 20 } #tv27 - ground floor, left passage, some distance after the beginning of the 2nd "block" (func: t30); I've disabled it #after the beginning of the center passage func void t19(string ai_name) { sound_music_start mus_low1 0.0 sound_music_start mus_low1 0.75 3 ai2_spawn D_N25 ai2_spawn C_R61 } #t19 - at the end of the center passage, after the left corner func void t20(string ai_name) { music_stop ai2_spawn D_Sr26 ai2_spawn D_Sr27 ai2_spawn D_T28 } #tv54 - at the beginning of the stairs, where the tanker waits (func: cloudkiller); not used #t14 - next to last floor of the stairs func void t15(string ai_name) { powerup_spawn lsi 605 ai2_spawn E_N14 ai2_spawn E_N14a ai2_passive E_N14 1 ai2_spawn NinjaZip ai2_passive NinjaZip 1 chr_unstoppable NinjaZip 1 playback NinjaZip NinjaZipSet playback E_N14 Ninja02Set } #tv15 - after the stairs func void NinjaZip(void) { chr_envanim NinjaZip ZipNinjaBipBox norotation chr_animate NinjaZip NINJAlev12_zip obj_create 72 env_anim 72 sleep 60 playback E_N14 Ninja02Jump sleep 80 ai2_passive E_N14 0 sleep 100 playback NinjaZip NinjaZipLeave sleep 120 chr_delete NinjaZip objective_set 2 silent target_set 7006 0 } #tv84 - around the place, where you find the zipline rider func void t28(string ai_name) { chr_wait_animtype char_0 Pickup_Object particle obj_zip create } #tv87 - at the end of the secret way func void t85(string ai_name) { ai2_spawn sbg_ninja } #tv16 - at the place with the yellow flashing circle func void t17(string ai_name) { if(chr_has_lsi(0)) KonokoZip } func void KonokoZip(void) { particle obj_zip kill chr_envanim 0 ZipKonBipBox norotation chr_animate 0 KONOKOlev12_zip obj_create 71 env_anim 71 sleep 55 sound_ambient_start c08_11_19zip sleep 235 obj_kill 72 chr_peace 0 objective_set 3 silent target_set 7006 0 chr_delete D_C19 chr_delete D_C60 chr_delete D_N25 chr_delete D_R21 chr_delete D_Sb20 chr_delete D_Sb22 chr_delete D_Sb23 chr_delete D_Sr24 chr_delete D_Sr26 chr_delete D_Sr27 chr_delete D_Sr38 particle b04_rain1 do stop particle b04_rain2 do stop particle b04_rain3 do stop particle b04_rain4 do stop particle b04_rain5 do stop particle b04_rain6 do stop } func void load_s3(void) { restore_game particle b06_rain1 do start zip_rider } func void zip_rider(void) { ai2_spawn E_N14 ai2_spawn E_N14a obj_create 71 env_anim 71 chr_envanim_block E_N14a ZipKonBipBox norotation chr_animate_block E_N14a KONOKOlev12_zip sleep 60 obj_create 72 env_anim 72 chr_envanim_block E_N14 ZipKonBipBox norotation chr_animate_block E_N14 KONOKOlev12_zip sleep 230 ai2_attack E_N14a char_0 sleep 60 obj_kill 71 ai2_attack E_N14 char_0 } ########## ### SP3 ### ########## ### 1ST ROOF ### #tv59 - the place, where you arrive with your zip rider (func: set_objective_2); I've disabled it #tv78 - after tv59 func void s3(string ai_name) { if(save_point ne 3) { save_game 3 autosave zip_rider } objective_set 3 silent target_set 7006 0 } #tv24 - in some distance after tv59 (func: rain17); I've disabled it #tv28 - at the beginning of the passageway func void t9(string ai_name) { ai2_spawn E_C62 playback E_C62 com ai2_spawn E_N37 ai2_makeignoreplayer E_N37 1 playback_block E_N37 ninja_jump2 ai2_makeignoreplayer E_N37 0 ai2_attack E_N37 char_0 } #tv50 - at the beginning of the passageway (func: rain18); I've disabled it #tv20 - at the same place as tv50 func void t21(string ai_name) { sound_dialog_play c11_39_04konoko ai2_spawn E_N29 ai2_spawn E_Sb31 ai2_spawn E_Sr63 ai2_spawn E_Sr64 ai2_spawn E_R65 ai2_spawn E_SuperNinja chr_boss_shield E_SuperNinja chr_unstoppable E_SuperNinja playback_block E_SuperNinja superninja2 interp 20 sleep 60 chr_delete E_SuperNinja } #tv79 - around the place, where you find the hypo (func: t80); I've disabled it ### 2ND ROOF ### #tv26 - on the next to last floor func void t29(string ai_name) { sound_dialog_play c11_39_05konoko } #tv86 - at the beginning of the highest floor (enter func: t84, leave func: t84b); I've disabled it #tv51 - at the same place as tv86 (func: rain19); I've disabled it #tv83 - after the beginning of the stairs func void t95(string ai_name) { sound_dialog_play c11_39_06konoko ai2_spawn E_Sr30 } #tv52 - at the end of the small passage after the end of the stairs (func: rain20); I've disabled it #tv21 - after tv52 (func: t23); I've disabled it #tv83 - at the 1st corner (beside the "block", where the sniper with the mercury bow stands on) func void t96(string ai_name) { sound_dialog_play c11_39_07konoko } #tv23 - at the 2nd corner func void t25(string ai_name) { ai2_spawn E_Sr33 ai2_dopath E_Sr30 patrol_34 ai2_setjobstate E_Sr30 } #tv22 - at the 3rd corner func void t24(string ai_name) { sound_dialog_play c11_39_08konoko ai2_spawn E_R32 ai2_dopath E_Sr33 patrol_34 ai2_setjobstate E_Sr33 door_lock 6 } #tv61 - complete area between the 3rd corner and the 4th corner; used to count the enemies inside it; see next func #tv60 - in front of the doors of the elevator func void t63(string ai_name) { trigvolume_enable trigger_volume_63 0 if (trigvolume_count(64) eq 0) door_unlock 6 else { sleep 60 trigvolume_enable trigger_volume_63 1 } } #tv25 - in the middle of the elevator func void ninja(void) { fade_out 0 0 0 30 sleep 30 sound_dialog_play c11_39_09konoko chr_facetoflag 0 9523 chr_teleport 0 9523 obj_kill 72 door_lock 2 load_s4_part1 fade_in 30 load_s4_part2 } ########## ### SP4 ### ########## func void load_s4_all(void) { load_s4_part1 load_s4_part2 } func void load_s4_part1(void) { fork remove_ai particle wind do start ai2_spawn OutroNinja chr_boss_shield OutroNinja chr_nocollision OutroNinja 1 playback OutroNinja SuperNinjaSet } func void load_s4_part2(void) { if(save_point eq 4) { restore_game particle b06_rain6 do start objective_set 3 silent } else { particle b06_rain1 do stop particle b06_rain2 do stop particle b06_rain3 do stop particle b06_rain4 do stop particle b06_rain5 do stop save_game 4 autosave } sleep 1 sound_music_start mus_fitec chr_animate OutroNinja NINCOMteleport_in 47 sleep 40 playback OutroNinja SuperNinjaDone chr_animate OutroNinja NINCOMteleport_out 31 chr_nocollision OutroNinja 0 } func void outro(void) { fade_out 0 0 0 30 sleep 30 win }