Guest User

bo3 problem GSC

a guest
Jun 1st, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.48 KB | None | 0 0
  1. #using scripts\codescripts\struct;
  2.  
  3. #using scripts\shared\array_shared;
  4. #using scripts\shared\callbacks_shared;
  5. #using scripts\shared\clientfield_shared;
  6. #using scripts\shared\compass;
  7. #using scripts\shared\exploder_shared;
  8. #using scripts\shared\flag_shared;
  9. #using scripts\shared\laststand_shared;
  10. #using scripts\shared\math_shared;
  11. #using scripts\shared\scene_shared;
  12. #using scripts\shared\util_shared;
  13.  
  14. #insert scripts\shared\shared.gsh;
  15. #insert scripts\shared\version.gsh;
  16.  
  17. #insert scripts\zm\_zm_utility.gsh;
  18.  
  19. #using scripts\zm\_load;
  20. #using scripts\zm\_zm;
  21. #using scripts\zm\_zm_audio;
  22. #using scripts\zm\_zm_powerups;
  23. #using scripts\zm\_zm_utility;
  24. #using scripts\zm\_zm_weapons;
  25. #using scripts\zm\_zm_zonemgr;
  26.  
  27. #using scripts\shared\ai\zombie_utility;
  28.  
  29. //Perks
  30. #using scripts\zm\_zm_pack_a_punch;
  31. #using scripts\zm\_zm_pack_a_punch_util;
  32. #using scripts\zm\_zm_perk_additionalprimaryweapon;
  33. #using scripts\zm\_zm_perk_doubletap2;
  34. #using scripts\zm\_zm_perk_deadshot;
  35. #using scripts\zm\_zm_perk_juggernaut;
  36. #using scripts\zm\_zm_perk_quick_revive;
  37. #using scripts\zm\_zm_perk_sleight_of_hand;
  38. #using scripts\zm\_zm_perk_staminup;
  39.  
  40. // HB21 AI
  41. #using scripts\zm\_zm_ai_quad;
  42.  
  43. // HB21 PERKS
  44. #using scripts\zm\_zm_perk_electric_cherry;
  45. #using scripts\zm\_zm_perk_widows_wine;
  46. #using scripts\zm\_zm_perk_whoswho;
  47. #using scripts\zm\_zm_perk_tombstone;
  48. #using scripts\zm\_zm_perk_phdflopper;
  49.  
  50. //Powerups
  51. #using scripts\zm\_zm_powerup_double_points;
  52. #using scripts\zm\_zm_powerup_carpenter;
  53. #using scripts\zm\_zm_powerup_fire_sale;
  54. #using scripts\zm\_zm_powerup_free_perk;
  55. #using scripts\zm\_zm_powerup_full_ammo;
  56. #using scripts\zm\_zm_powerup_insta_kill;
  57. #using scripts\zm\_zm_powerup_nuke;
  58. //#using scripts\zm\_zm_powerup_weapon_minigun;
  59.  
  60. //Traps
  61. #using scripts\zm\_zm_trap_electric;
  62.  
  63. #using scripts\zm\zm_usermap;
  64.  
  65. // Timed Gameplay
  66. #using scripts\zm\ugxmods_timedgp;
  67.    
  68. // Buyable Ending
  69. #using scripts\zm\zm_v7_buyable_ending;
  70.  
  71. // NSZ Hitmarkers
  72. #using scripts\_NSZ\nsz_hitmarkers;
  73.  
  74. // NSZ Time Warp Powerup
  75. #using scripts\_NSZ\nsz_powerup_time_warp;
  76.  
  77. // NSZ Zombie Blood Powerup
  78. #using scripts\_NSZ\nsz_powerup_zombie_blood;
  79.  
  80. //ammomatic
  81. #using scripts\zm\_zm_score;
  82.  
  83. // Jukebox
  84. #using scripts\zm\jukebox;
  85.  
  86.  
  87. //*****************************************************************************
  88. // MAIN
  89. //*****************************************************************************
  90.  
  91. function main()
  92. {
  93.     level.dog_rounds_allowed = false;
  94.    
  95.     callback::on_spawned( &give_player_character );
  96.    
  97.     zm_usermap::main();
  98.    
  99.     thread new_zombie_speed();
  100.    
  101.     level._zombie_custom_add_weapons =&custom_add_weapons;
  102.     level.pack_a_punch_camo_index = 75;
  103.     level.pack_a_punch_camo_index_number_variants = 51;
  104.  
  105.     // Start + Last Stand Weapon
  106.     level.default_laststandpistol = GetWeapon( "s2_win_1897" );
  107.     level.default_solo_laststandpistol = GetWeapon( "s2_win_1897_up" );
  108.     level.laststandpistol = level.default_laststandpistol;
  109.     level.start_weapon = level.default_laststandpistol;
  110.  
  111.    
  112.     level.perk_purchase_limit = 6;
  113.    
  114.     level util::set_lighting_state(0);
  115.    
  116.     // Init power
  117.     thread init_power();
  118.    
  119.     // easter egg
  120.     thread easteregg();
  121.    
  122.     // Max Ammo
  123.     thread MaxAmmo();
  124.    
  125.     //Setup the levels Zombie Zone Volumes
  126.     level.zones = [];
  127.     level.zone_manager_init_func =&usermap_test_zone_init;
  128.     init_zones[0] = "start_zone";
  129.     level thread zm_zonemgr::manage_zones( init_zones );
  130.  
  131.     // player vox
  132.     level thread add_zm_vox();
  133.  
  134.     level.pathdist_type = PATHDIST_ORIGINAL;
  135. }
  136.  
  137. function usermap_test_zone_init()
  138. {  
  139.     zm_zonemgr::add_adjacent_zone( "start_zone", "other_zone", "one");
  140.     zm_zonemgr::add_adjacent_zone( "other_zone", "pap_zone", "pap");
  141.     level flag::init( "always_on" );
  142.     level flag::set( "always_on" );
  143. }
  144.  
  145. // CUSTOM WEAPONS
  146.  
  147. function custom_add_weapons()
  148. {
  149.     zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
  150. }
  151.  
  152. // INIT POWER
  153.  
  154. function init_power()
  155. {
  156.     level flag::wait_till("power_on");
  157.     //level util::set_lighting_state(2);
  158.    
  159.     p_switch = GetEnt("use_elec_switch", "targetname");
  160.     p_switch waittill("trigger");
  161.     exploder::exploder ("ammo_light");
  162. }
  163.  
  164.  
  165. // EASTER EGG
  166.  
  167. function easteregg()
  168. {
  169.     trigger = GetEnt("easteregg", "targetname");
  170.     trigger SetHintString("");
  171.     trigger SetCursorHint("HINT_NOICON");
  172.    
  173.     while(1)
  174.     {
  175.     trigger waittill("trigger", player);
  176.     IPrintLnBold("Zombie Kenny is awesome!");
  177.     wait(5);
  178.     }
  179. }
  180.  
  181. // ZOMBIE SPEED
  182.  
  183. function new_zombie_speed()
  184. {
  185.     level flag::wait_till( "initial_blackscreen_passed" );
  186.     zombie_utility::set_zombie_var( "zombie_move_speed_multiplier",       75,   false );    //  Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint
  187.     zombie_utility::set_zombie_var( "zombie_move_speed_multiplier_easy",  75,   false );    //  Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint
  188.     level.zombie_move_speed         = level.round_number * level.zombie_vars["zombie_move_speed_multiplier"];
  189. }
  190.  
  191. // MAX AMMO
  192.  
  193. function MaxAmmo()
  194. {
  195.     trigger = GetEnt("maxammo_trigger", "targetname");
  196.     trigger SetHintString("Press ^3&&1^7 to buy max ammo. Cost [7000]"); // Changes the string that shows when looking at the trigger.
  197.     trigger SetCursorHint("HINT_NOICON"); // Changes the icon that shows when looking at the trigger.
  198.     trigger1cost = 7000;
  199.  
  200.     while(1)
  201.     {
  202.         while(1)
  203.         {
  204.             trigger waittill("trigger", player);
  205.                  
  206.             if(player.score >= trigger1cost)
  207.             {
  208.                 player zm_score::minus_to_player_score(trigger1cost);
  209.                 IPrintLnBold("MAX AMMO!");
  210.                 trigger PlayLocalSound( "ammomatic" );
  211.                 break;
  212.             }
  213.             else
  214.             {
  215.                 trigger PlayLocalSound( "evt_perk_deny" );
  216.             }
  217.         }
  218.        
  219.         players = GetPlayers();
  220.  
  221.         for (i = 0; i < players.size; i++)
  222.         {
  223.             primaryWeapons = players[i] GetWeaponsList();
  224.             players[i] PlayLocalSound( "ammomatic" );  
  225.             players[i] notify( "ammomatic" );
  226.  
  227.             for( x = 0; x < primaryWeapons.size; x++ )
  228.             {
  229.  
  230.                 players[i] GiveMaxAmmo( primaryWeapons[x] );
  231.             }
  232.         }
  233.         wait(5);
  234.     }
  235. }
  236.  
  237. // ADD VOX
  238.  
  239. function add_zm_vox()
  240. {
  241.     zm_audio::loadPlayerVoiceCategories("gamedata/audio/zm/zm_zod_vox.csv");
  242. }
  243.  
  244. // ZC CHARS
  245.  
  246. function give_player_character()
  247. {
  248.     self SetCharacterBodyType( self.characterIndex + 5);
  249.     self SetCharacterBodyStyle( 0 );
  250.     self SetCharacterHelmetStyle( 0 );
  251. }
Add Comment
Please, Sign In to add comment