burc_2004

zm_alcatraz_weap_quest.gsc

Oct 21st, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 18.49 KB | None | 0 0
  1. #include maps/mp/zombies/_zm_powerups;
  2. #include maps/mp/zombies/_zm_score;
  3. #include maps/mp/zombies/_zm_zonemgr;
  4. #include maps/mp/zombies/_zm_audio;
  5. #include maps/mp/animscripts/shared;
  6. #include maps/mp/zombies/_zm_spawner;
  7. #include maps/mp/zombies/_zm_net;
  8. #include maps/mp/zombies/_zm_utility;
  9. #include maps/mp/_utility;
  10. #include common_scripts/utility;
  11.  
  12. #using_animtree( "fxanim_props" );
  13.  
  14. init()
  15. {
  16.     flag_init( "soul_catchers_charged" );
  17.     level.soul_catchers = [];
  18.     level.soul_catchers_vol = [];
  19.     level.no_gib_in_wolf_area = ::check_for_zombie_in_wolf_area;
  20.     level.soul_catcher_clip[ "rune_2" ] = getent( "wolf_clip_docks", "targetname" );
  21.     level.soul_catcher_clip[ "rune_3" ] = getent( "wolf_clip_infirmary", "targetname" );
  22.     _a24 = level.soul_catcher_clip;
  23.     _k24 = getFirstArrayKey( _a24 );
  24.     while ( isDefined( _k24 ) )
  25.     {
  26.         e_clip = _a24[ _k24 ];
  27.         e_clip setinvisibletoall();
  28.         _k24 = getNextArrayKey( _a24, _k24 );
  29.     }
  30.     level thread create_anim_references_on_server();
  31.     registerclientfield( "actor", "make_client_clone", 9000, 4, "int" );
  32.     onplayerconnect_callback( ::toggle_redeemer_trigger );
  33.     onplayerconnect_callback( ::hellhole_projectile_watch );
  34.     onplayerconnect_callback( ::hellhole_tomahawk_watch );
  35.     level.a_wolf_structs = getstructarray( "wolf_position", "targetname" );
  36.     i = 0;
  37.     while ( i < level.a_wolf_structs.size )
  38.     {
  39.         registerclientfield( "world", level.a_wolf_structs[ i ].script_parameters, 9000, 3, "int" );
  40.         level.soul_catchers[ i ] = level.a_wolf_structs[ i ];
  41.         level.soul_catchers_vol[ i ] = getent( level.a_wolf_structs[ i ].target, "targetname" );
  42.         i++;
  43.     }
  44.     i = 0;
  45.     while ( i < level.soul_catchers.size )
  46.     {
  47.         level.soul_catchers[ i ].souls_received = 0;
  48.         level.soul_catchers[ i ].is_eating = 0;
  49.         level.soul_catchers[ i ] thread soul_catcher_check();
  50.         if ( is_classic() )
  51.         {
  52.             level.soul_catchers[ i ] thread soul_catcher_state_manager();
  53.         }
  54.         else
  55.         {
  56.             level.soul_catchers[ i ] thread grief_soul_catcher_state_manager();
  57.         }
  58.         level.soul_catchers[ i ] thread wolf_head_removal( "tomahawk_door_sign_" + ( i + 1 ) );
  59.         level.soul_catchers_vol[ i ] = getent( level.soul_catchers[ i ].target, "targetname" );
  60.         i++;
  61.     }
  62.     level.soul_catchers_charged = 0;
  63.     level thread soul_catchers_charged();
  64.     array_thread( level.zombie_spawners, ::add_spawn_function, ::zombie_spawn_func );
  65. }
  66.  
  67. create_anim_references_on_server()
  68. {
  69.     root = %root;
  70.     wolfhead_intro_anim = %o_zombie_dreamcatcher_intro;
  71.     wolfhead_outtro_anim = %o_zombie_dreamcatcher_outtro;
  72.     woflhead_idle_anims = [];
  73.     wolfhead_idle_anim[ 0 ] = %o_zombie_dreamcatcher_idle;
  74.     wolfhead_idle_anim[ 1 ] = %o_zombie_dreamcatcher_idle_twitch_scan;
  75.     wolfhead_idle_anim[ 2 ] = %o_zombie_dreamcatcher_idle_twitch_shake;
  76.     wolfhead_idle_anim[ 3 ] = %o_zombie_dreamcatcher_idle_twitch_yawn;
  77.     wolfhead_body_death = %ai_zombie_dreamcatch_impact;
  78.     wolfhead_body_float = %ai_zombie_dreamcatch_rise;
  79.     wolfhead_body_shrink = %ai_zombie_dreamcatch_shrink_a;
  80.     wolfhead_pre_eat_anims = [];
  81.     wolfhead_pre_eat_anims[ "right" ] = %o_zombie_dreamcatcher_wallconsume_pre_eat_r;
  82.     wolfhead_pre_eat_anims[ "left" ] = %o_zombie_dreamcatcher_wallconsume_pre_eat_l;
  83.     wolfhead_pre_eat_anims[ "front" ] = %o_zombie_dreamcatcher_wallconsume_pre_eat_f;
  84.     wolfhead_eat_anims[ "right" ] = %o_zombie_dreamcatcher_wallconsume_align_r;
  85.     wolfhead_eat_anims[ "left" ] = %o_zombie_dreamcatcher_wallconsume_align_l;
  86.     wolfhead_eat_anims[ "front" ] = %o_zombie_dreamcatcher_wallconsume_align_f;
  87.     wolfhead_body_anims[ "right" ] = %ai_zombie_dreamcatcher_wallconsume_align_r;
  88.     wolfhead_body_anims[ "left" ] = %ai_zombie_dreamcatcher_wallconsume_align_l;
  89.     wolfhead_body_anims[ "front" ] = %ai_zombie_dreamcatcher_wallconsume_align_f;
  90. }
  91.  
  92. soul_catcher_state_manager()
  93. {
  94.     wait 1;
  95.     if ( self.script_noteworthy == "rune_3" )
  96.     {
  97.         trigger = getent( "wolf_hurt_trigger", "targetname" );
  98.         trigger hide();
  99.     }
  100.     else
  101.     {
  102.         if ( self.script_noteworthy == "rune_2" )
  103.         {
  104.             trigger = getent( "wolf_hurt_trigger_docks", "targetname" );
  105.             trigger hide();
  106.         }
  107.     }
  108.     level setclientfield( self.script_parameters, 0 );
  109.     self waittill( "first_zombie_killed_in_zone" );
  110.     if ( self.script_noteworthy == "rune_3" )
  111.     {
  112.         trigger = getent( "wolf_hurt_trigger", "targetname" );
  113.         trigger show();
  114.     }
  115.     else
  116.     {
  117.         if ( self.script_noteworthy == "rune_2" )
  118.         {
  119.             trigger = getent( "wolf_hurt_trigger_docks", "targetname" );
  120.             trigger show();
  121.         }
  122.     }
  123.     if ( isDefined( level.soul_catcher_clip[ self.script_noteworthy ] ) )
  124.     {
  125.         level.soul_catcher_clip[ self.script_noteworthy ] setvisibletoall();
  126.     }
  127.     level setclientfield( self.script_parameters, 1 );
  128.     anim_length = getanimlength( %o_zombie_dreamcatcher_intro );
  129.     wait anim_length;
  130.     while ( !self.is_charged )
  131.     {
  132.         level setclientfield( self.script_parameters, 2 );
  133.         self waittill_either( "fully_charged", "finished_eating" );
  134.     }
  135.     level setclientfield( self.script_parameters, 6 );
  136.     anim_length = getanimlength( %o_zombie_dreamcatcher_outtro );
  137.     wait anim_length;
  138.     if ( isDefined( level.soul_catcher_clip[ self.script_noteworthy ] ) )
  139.     {
  140.         level.soul_catcher_clip[ self.script_noteworthy ] delete();
  141.     }
  142.     if ( self.script_noteworthy == "rune_3" )
  143.     {
  144.         trigger = getent( "wolf_hurt_trigger", "targetname" );
  145.         trigger delete();
  146.     }
  147.     else
  148.     {
  149.         if ( self.script_noteworthy == "rune_2" )
  150.         {
  151.             trigger = getent( "wolf_hurt_trigger_docks", "targetname" );
  152.             trigger delete();
  153.         }
  154.     }
  155.     level setclientfield( self.script_parameters, 7 );
  156. }
  157.  
  158. grief_soul_catcher_state_manager()
  159. {
  160.     wait 1;
  161.     while ( 1 )
  162.     {
  163.         level setclientfield( self.script_parameters, 0 );
  164.         self waittill( "first_zombie_killed_in_zone" );
  165.         if ( isDefined( level.soul_catcher_clip[ self.script_noteworthy ] ) )
  166.         {
  167.             level.soul_catcher_clip[ self.script_noteworthy ] setvisibletoall();
  168.         }
  169.         level setclientfield( self.script_parameters, 1 );
  170.         anim_length = getanimlength( %o_zombie_dreamcatcher_intro );
  171.         wait anim_length;
  172.         while ( !self.is_charged )
  173.         {
  174.             level setclientfield( self.script_parameters, 2 );
  175.             self waittill_either( "fully_charged", "finished_eating" );
  176.         }
  177.         level setclientfield( self.script_parameters, 6 );
  178.         anim_length = getanimlength( %o_zombie_dreamcatcher_outtro );
  179.         wait anim_length;
  180.         if ( isDefined( level.soul_catcher_clip[ self.script_noteworthy ] ) )
  181.         {
  182.             level.soul_catcher_clip[ self.script_noteworthy ] delete();
  183.         }
  184.         self.souls_received = 0;
  185.         level thread wolf_spit_out_powerup();
  186.         wait 20;
  187.         self thread soul_catcher_check();
  188.     }
  189. }
  190.  
  191. wolf_spit_out_powerup()
  192. {
  193.     if ( isDefined( level.enable_magic ) && !level.enable_magic )
  194.     {
  195.         return;
  196.     }
  197.     power_origin_struct = getstruct( "wolf_puke_powerup_origin", "targetname" );
  198.     if ( randomint( 100 ) < 20 )
  199.     {
  200.         i = 0;
  201.         while ( i < level.zombie_powerup_array.size )
  202.         {
  203.             if ( level.zombie_powerup_array[ i ] == "meat_stink" )
  204.             {
  205.                 level.zombie_powerup_index = i;
  206.                 found = 1;
  207.                 break;
  208.             }
  209.             else
  210.             {
  211.                 i++;
  212.             }
  213.         }
  214.     }
  215.     else while ( 1 )
  216.     {
  217.         level.zombie_powerup_index = randomint( level.zombie_powerup_array.size );
  218.         while ( level.zombie_powerup_array[ level.zombie_powerup_index ] == "nuke" )
  219.         {
  220.             wait 0,05;
  221.         }
  222.     }
  223.     spawn_infinite_powerup_drop( power_origin_struct.origin, level.zombie_powerup_array[ level.zombie_powerup_index ] );
  224.     power_ups = get_array_of_closest( power_origin_struct.origin, level.active_powerups, undefined, undefined, 100 );
  225.     if ( isDefined( power_ups[ 0 ] ) )
  226.     {
  227.         power_ups[ 0 ] movez( 120, 4 );
  228.     }
  229. }
  230.  
  231. zombie_spawn_func()
  232. {
  233.     self.actor_killed_override = ::zombie_killed_override;
  234. }
  235.  
  236. zombie_killed_override( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shitloc, psoffsettime )
  237. {
  238.     if ( !is_true( self.has_legs ) )
  239.     {
  240.         return;
  241.     }
  242.     while ( isplayer( attacker ) )
  243.     {
  244.         i = 0;
  245.         while ( i < level.soul_catchers.size )
  246.         {
  247.             if ( self istouching( level.soul_catchers_vol[ i ] ) )
  248.             {
  249.                 if ( !level.soul_catchers[ i ].is_charged )
  250.                 {
  251.                     self.deathfunction = ::zombie_soul_catcher_death;
  252.                     self.my_soul_catcher = level.soul_catchers[ i ];
  253.                 }
  254.             }
  255.             i++;
  256.         }
  257.     }
  258. }
  259.  
  260. check_for_zombie_in_wolf_area()
  261. {
  262.     i = 0;
  263.     while ( i < level.soul_catchers.size )
  264.     {
  265.         if ( self istouching( level.soul_catchers_vol[ i ] ) )
  266.         {
  267.             if ( !level.soul_catchers[ i ].is_charged && !level.soul_catchers[ i ].is_eating )
  268.             {
  269.                 return 1;
  270.             }
  271.         }
  272.         i++;
  273.     }
  274.     return 0;
  275. }
  276.  
  277. zombie_soul_catcher_death()
  278. {
  279.     self thread maps/mp/zombies/_zm_spawner::zombie_death_animscript();
  280.     if ( isDefined( self._race_team ) )
  281.     {
  282.         team = self._race_team;
  283.     }
  284.     level maps/mp/zombies/_zm_spawner::zombie_death_points( self.origin, self.damagemod, self.damagelocation, self.attacker, self, team );
  285.     if ( self.my_soul_catcher.is_eating )
  286.     {
  287.         return 0;
  288.     }
  289.     if ( self.my_soul_catcher.souls_received >= 6 )
  290.     {
  291.         return 0;
  292.     }
  293.     self.my_soul_catcher.is_eating = 1;
  294.     if ( self.my_soul_catcher.souls_received == 0 )
  295.     {
  296.         self.my_soul_catcher notify( "first_zombie_killed_in_zone" );
  297.         self thread notify_wolf_intro_anim_complete();
  298.     }
  299.     client_notify_value = self get_correct_model_array();
  300.     self setclientfield( "make_client_clone", client_notify_value );
  301.     self setanimstatefromasd( "zm_portal_death" );
  302.     self maps/mp/animscripts/shared::donotetracks( "portal_death" );
  303.     if ( self.my_soul_catcher.souls_received == 0 )
  304.     {
  305.         self waittill( "wolf_intro_anim_complete" );
  306.     }
  307.     n_eating_anim = self which_eating_anim();
  308.     self ghost();
  309.     level setclientfield( self.my_soul_catcher.script_parameters, n_eating_anim );
  310.     if ( n_eating_anim == 3 )
  311.     {
  312.         total_wait_time = 3 + getanimlength( %ai_zombie_dreamcatcher_wallconsume_align_f );
  313.     }
  314.     else if ( n_eating_anim == 4 )
  315.     {
  316.         total_wait_time = 3 + getanimlength( %ai_zombie_dreamcatcher_wallconsume_align_r );
  317.     }
  318.     else
  319.     {
  320.         total_wait_time = 3 + getanimlength( %ai_zombie_dreamcatcher_wallconsume_align_l );
  321.     }
  322.     wait ( total_wait_time - 0,5 );
  323.     self.my_soul_catcher.souls_received++;
  324.     wait 0,5;
  325.     self.my_soul_catcher notify( "finished_eating" );
  326.     self.my_soul_catcher.is_eating = 0;
  327.     self delete();
  328.     return 1;
  329. }
  330.  
  331. get_correct_model_array()
  332. {
  333.     mod = 0;
  334.     if ( self.model == "c_zom_guard_body" && isDefined( self.hatmodel ) && self.hatmodel == "c_zom_guard_hat" )
  335.     {
  336.         mod = 4;
  337.     }
  338.     if ( self.headmodel == "c_zom_zombie_barbwire_head" )
  339.     {
  340.         return 1 + mod;
  341.     }
  342.     if ( self.headmodel == "c_zom_zombie_hellcatraz_head" )
  343.     {
  344.         return 2 + mod;
  345.     }
  346.     if ( self.headmodel == "c_zom_zombie_mask_head" )
  347.     {
  348.         return 3 + mod;
  349.     }
  350.     if ( self.headmodel == "c_zom_zombie_slackjaw_head" )
  351.     {
  352.         return 4 + mod;
  353.     }
  354.     return 5;
  355. }
  356.  
  357. notify_wolf_intro_anim_complete()
  358. {
  359.     anim_length = getanimlength( %o_zombie_dreamcatcher_intro );
  360.     wait anim_length;
  361.     self notify( "wolf_intro_anim_complete" );
  362. }
  363.  
  364. which_eating_anim()
  365. {
  366.     soul_catcher = self.my_soul_catcher;
  367.     forward_dot = vectordot( anglesToForward( soul_catcher.angles ), vectornormalize( self.origin - soul_catcher.origin ) );
  368.     if ( forward_dot > 0,85 )
  369.     {
  370.         return 3;
  371.     }
  372.     else
  373.     {
  374.         right_dot = vectordot( anglesToRight( soul_catcher.angles ), self.origin - soul_catcher.origin );
  375.         if ( right_dot > 0 )
  376.         {
  377.             return 4;
  378.         }
  379.         else
  380.         {
  381.             return 5;
  382.         }
  383.     }
  384. }
  385.  
  386. soul_catcher_check()
  387. {
  388.     self.is_charged = 0;
  389.     while ( 1 )
  390.     {
  391.         if ( self.souls_received >= 6 )
  392.         {
  393.             level.soul_catchers_charged++;
  394.             level thread maps/mp/zombies/_zm_audio::sndmusicstingerevent( "tomahawk_" + level.soul_catchers_charged );
  395.             self.is_charged = 1;
  396.             self notify( "fully_charged" );
  397.             break;
  398.         }
  399.         else
  400.         {
  401.             wait 0,05;
  402.         }
  403.     }
  404.     if ( level.soul_catchers_charged == 1 )
  405.     {
  406.         self thread first_wolf_complete_vo();
  407.     }
  408.     else
  409.     {
  410.         if ( level.soul_catchers_charged >= level.soul_catchers.size )
  411.         {
  412.             self thread final_wolf_complete_vo();
  413.         }
  414.     }
  415. }
  416.  
  417. wolf_head_removal( wolf_head_model_string )
  418. {
  419.     wolf_head_model = getent( wolf_head_model_string, "targetname" );
  420.     wolf_head_model setmodel( "p6_zm_al_dream_catcher_off" );
  421.     self waittill( "fully_charged" );
  422.     wolf_head_model setmodel( "p6_zm_al_dream_catcher" );
  423. }
  424.  
  425. soul_catchers_charged()
  426. {
  427.     while ( 1 )
  428.     {
  429.         if ( level.soul_catchers_charged >= level.soul_catchers.size )
  430.         {
  431.             flag_set( "soul_catchers_charged" );
  432.             level notify( "soul_catchers_charged" );
  433.             return;
  434.         }
  435.         else
  436.         {
  437.             wait 1;
  438.         }
  439.     }
  440. }
  441.  
  442. first_wolf_encounter_vo()
  443. {
  444.     if ( !is_classic() )
  445.     {
  446.         return;
  447.     }
  448.     wait 2;
  449.     a_players = getplayers();
  450.     a_closest = get_array_of_closest( self.origin, a_players );
  451.     i = 0;
  452.     while ( i < a_closest.size )
  453.     {
  454.         if ( isDefined( a_closest[ i ].dontspeak ) && !a_closest[ i ].dontspeak )
  455.         {
  456.             a_closest[ i ] thread do_player_general_vox( "general", "wolf_encounter" );
  457.             level.wolf_encounter_vo_played = 1;
  458.             return;
  459.         }
  460.         else
  461.         {
  462.             i++;
  463.         }
  464.     }
  465. }
  466.  
  467. first_wolf_complete_vo()
  468. {
  469.     if ( !is_classic() )
  470.     {
  471.         return;
  472.     }
  473.     wait 3,5;
  474.     a_players = getplayers();
  475.     a_closest = get_array_of_closest( self.origin, a_players );
  476.     i = 0;
  477.     while ( i < a_closest.size )
  478.     {
  479.         if ( isDefined( a_closest[ i ].dontspeak ) && !a_closest[ i ].dontspeak )
  480.         {
  481.             a_closest[ i ] thread do_player_general_vox( "general", "wolf_complete" );
  482.             return;
  483.         }
  484.         else
  485.         {
  486.             i++;
  487.         }
  488.     }
  489. }
  490.  
  491. final_wolf_complete_vo()
  492. {
  493.     if ( !is_classic() )
  494.     {
  495.         return;
  496.     }
  497.     wait 3,5;
  498.     a_players = getplayers();
  499.     a_closest = get_array_of_closest( self.origin, a_players );
  500.     i = 0;
  501.     while ( i < a_closest.size )
  502.     {
  503.         if ( isDefined( a_closest[ i ].dontspeak ) && !a_closest[ i ].dontspeak )
  504.         {
  505.             a_closest[ i ] thread do_player_general_vox( "general", "wolf_final" );
  506.             return;
  507.         }
  508.         else
  509.         {
  510.             i++;
  511.         }
  512.     }
  513. }
  514.  
  515. tomahawk_upgrade_quest()
  516. {
  517.     if ( isDefined( level.gamedifficulty ) && level.gamedifficulty == 0 )
  518.     {
  519.         return;
  520.     }
  521.     self endon( "disconnect" );
  522.     self.tomahawk_upgrade_kills = 0;
  523.     while ( self.tomahawk_upgrade_kills < 15 )
  524.     {
  525.         self waittill( "got_a_tomahawk_kill" );
  526.         self.tomahawk_upgrade_kills++;
  527.     }
  528.     wait 1;
  529.     level thread maps/mp/zombies/_zm_audio::sndmusicstingerevent( "quest_generic" );
  530.     e_org = spawn( "script_origin", self.origin + vectorScale( ( 0, 0, 1 ), 64 ) );
  531.     e_org playsoundwithnotify( "zmb_easteregg_scream", "easteregg_scream_complete" );
  532.     e_org waittill( "easteregg_scream_complete" );
  533.     e_org delete();
  534.     while ( level.round_number < 10 )
  535.     {
  536.         wait 0,5;
  537.     }
  538.     self ent_flag_init( "gg_round_done" );
  539.     while ( !self ent_flag( "gg_round_done" ) )
  540.     {
  541.         level waittill( "between_round_over" );
  542.         self.killed_with_only_tomahawk = 1;
  543.         self.killed_something_thq = 0;
  544.         while ( !self maps/mp/zombies/_zm_zonemgr::is_player_in_zone( "zone_golden_gate_bridge" ) )
  545.         {
  546.             continue;
  547.         }
  548.         level waittill( "end_of_round" );
  549.         if ( !self.killed_with_only_tomahawk || !self.killed_something_thq )
  550.         {
  551.             continue;
  552.         }
  553.         while ( !self maps/mp/zombies/_zm_zonemgr::is_player_in_zone( "zone_golden_gate_bridge" ) )
  554.         {
  555.             continue;
  556.         }
  557.         self ent_flag_set( "gg_round_done" );
  558.     }
  559.     level thread maps/mp/zombies/_zm_audio::sndmusicstingerevent( "quest_generic" );
  560.     e_org = spawn( "script_origin", self.origin + vectorScale( ( 0, 0, 1 ), 64 ) );
  561.     e_org playsoundwithnotify( "zmb_easteregg_scream", "easteregg_scream_complete" );
  562.     e_org waittill( "easteregg_scream_complete" );
  563.     e_org delete();
  564.     self notify( "hellhole_time" );
  565.     self waittill( "tomahawk_in_hellhole" );
  566.     if ( isDefined( self.retriever_trigger ) )
  567.     {
  568.         self.retriever_trigger setinvisibletoplayer( self );
  569.     }
  570.     else
  571.     {
  572.         trigger = getent( "retriever_pickup_trigger", "script_noteworthy" );
  573.         self.retriever_trigger = trigger;
  574.         self.retriever_trigger setinvisibletoplayer( self );
  575.     }
  576.     self takeweapon( "bouncing_tomahawk_zm" );
  577.     self set_player_tactical_grenade( "none" );
  578.     self notify( "tomahawk_upgraded_swap" );
  579.     level thread maps/mp/zombies/_zm_audio::sndmusicstingerevent( "quest_generic" );
  580.     e_org = spawn( "script_origin", self.origin + vectorScale( ( 0, 0, 1 ), 64 ) );
  581.     e_org playsoundwithnotify( "zmb_easteregg_scream", "easteregg_scream_complete" );
  582.     e_org waittill( "easteregg_scream_complete" );
  583.     e_org delete();
  584.     level waittill( "end_of_round" );
  585.     tomahawk_pick = getent( "spinning_tomahawk_pickup", "targetname" );
  586.     tomahawk_pick setclientfield( "play_tomahawk_fx", 2 );
  587.     self.current_tomahawk_weapon = "upgraded_tomahawk_zm";
  588. }
  589.  
  590. toggle_redeemer_trigger()
  591. {
  592.     self endon( "disconnect" );
  593.     flag_wait( "tomahawk_pickup_complete" );
  594.     upgraded_tomahawk_trigger = getent( "redeemer_pickup_trigger", "script_noteworthy" );
  595.     upgraded_tomahawk_trigger setinvisibletoplayer( self );
  596.     tomahawk_model = getent( "spinning_tomahawk_pickup", "targetname" );
  597.     while ( 1 )
  598.     {
  599.         if ( isDefined( self.current_tomahawk_weapon ) && self.current_tomahawk_weapon == "upgraded_tomahawk_zm" )
  600.         {
  601.             break;
  602.         }
  603.         else wait 1;
  604.     }
  605.     while ( 1 )
  606.     {
  607.         if ( isDefined( self.afterlife ) && self.afterlife )
  608.         {
  609.             upgraded_tomahawk_trigger setvisibletoplayer( self );
  610.             tomahawk_model setvisibletoplayer( self );
  611.         }
  612.         else
  613.         {
  614.             upgraded_tomahawk_trigger setinvisibletoplayer( self );
  615.             tomahawk_model setinvisibletoplayer( self );
  616.         }
  617.         wait 1;
  618.     }
  619. }
  620.  
  621. hellhole_projectile_watch()
  622. {
  623.     self endon( "disconnect" );
  624.     while ( 1 )
  625.     {
  626.         self waittill( "grenade_fire", grenade, weapname );
  627.         if ( weapname == "frag_grenade_zm" )
  628.         {
  629.             self thread hellhole_grenades( grenade );
  630.         }
  631.     }
  632. }
  633.  
  634. hellhole_tomahawk_watch()
  635. {
  636.     self endon( "disconnect" );
  637.     self waittill( "hellhole_time" );
  638.     while ( 1 )
  639.     {
  640.         self waittill( "grenade_fire", grenade, weapname );
  641.         if ( weapname == "bouncing_tomahawk_zm" )
  642.         {
  643.             self thread hellhole_tomahawk( grenade );
  644.         }
  645.     }
  646. }
  647.  
  648. hellhole_grenades( grenade )
  649. {
  650.     grenade endon( "death" );
  651.     trig_hellhole = getent( "trig_cellblock_hellhole", "targetname" );
  652.     while ( !grenade istouching( trig_hellhole ) )
  653.     {
  654.         wait 0,05;
  655.     }
  656.     self maps/mp/zombies/_zm_score::add_to_player_score( 20 );
  657.     playfx( level._effect[ "tomahawk_hellhole" ], grenade.origin );
  658.     playsoundatposition( "wpn_grenade_poof", grenade.origin );
  659.     grenade delete();
  660. }
  661.  
  662. hellhole_tomahawk( grenade )
  663. {
  664.     grenade endon( "death" );
  665.     trig_hellhole = getent( "trig_cellblock_hellhole", "targetname" );
  666.     while ( !grenade istouching( trig_hellhole ) )
  667.     {
  668.         wait 0,05;
  669.     }
  670.     self notify( "tomahawk_in_hellhole" );
  671.     grenade notify( "in_hellhole" );
  672.     playfx( level._effect[ "tomahawk_hellhole" ], grenade.origin );
  673.     playsoundatposition( "wpn_grenade_poof", grenade.origin );
  674.     grenade delete();
  675. }
  676.  
  677. spawn_infinite_powerup_drop( v_origin, str_type )
  678. {
  679.     if ( isDefined( str_type ) )
  680.     {
  681.         intro_powerup = maps/mp/zombies/_zm_powerups::specific_powerup_drop( str_type, v_origin );
  682.     }
  683.     else
  684.     {
  685.         intro_powerup = maps/mp/zombies/_zm_powerups::powerup_drop( v_origin );
  686.     }
  687. }
Advertisement
Add Comment
Please, Sign In to add comment