Advertisement
Guest User

Untitled

a guest
Jan 15th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 16.26 KB | None | 0 0
  1. #include maps\_utility;
  2. #include common_scripts\utility;
  3. #include maps\_zombiemode_utility;
  4.  
  5. /*
  6. ================================= CREDITS =================================
  7. HyperFirez - Made the script.
  8. Riptide1106 - Scripting support.
  9. Idogftw - Scripting support.
  10. BluntStuffy - Help with action slots & setting gumball use limit.
  11. F3ARxREAPER666 - Help with "Anywhere But Here" Gobblegum.
  12. Rollonmath42 - Help with animating in Maya & animations in general.
  13. Dr.LilRobot - Bo2 anim rig.
  14. DTZxPorter - Wraith & support with multiple things.
  15. Aidan Shafran, Ray1235 (Maciej Zaremba), and Scobalula - CoD Maya Tools.
  16. Tom Bmx - Maya tools & programs.
  17. ================================= CREDITS =================================
  18. */
  19.  
  20. /*==Text Formatting Colors==*\
  21.         ^0 = Black
  22.         ^1 = Red
  23.         ^2 = Green
  24.         ^3 = Yellow
  25.         ^4 = Blue
  26.         ^5 = Light Blue
  27.         ^6 = Gold
  28.         ^7 = White
  29. /*===========================*/
  30.  
  31. init()
  32. {  
  33.     level thread anywhere_but_here_init();
  34.     level thread gumball_machine_trigger();
  35. }
  36.  
  37. gumball_machine_trigger()
  38. {
  39.     gumball_machine = getEnt("gumball_machine","targetname");
  40.     gumball_machine setCursorHint("HINT_NOICON");
  41.     gumball_machine UseTriggerRequireLookAt();
  42.     gumball_machine setHintString("Hold ^6&&1^7 to dispense Gobblegum [Cost: 500]");
  43.    
  44.     while(1)
  45.     {
  46.         gumball_machine waittill("trigger", player);
  47.         {
  48.             if(player.score >= 500)
  49.             {
  50.                 //iprintln("Paid for Gum");
  51.                 player maps\_zombiemode_score::minus_to_player_score(500);
  52.                 wait(0.1);
  53.                 player thread gumball();
  54.             }    
  55.            
  56.             if(player.score < 500)
  57.             {
  58.                 //iprintln("Not Enough Points");
  59.                 player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
  60.                 player playsound("deny");
  61.             }
  62.         }
  63.     }
  64. }
  65.  
  66.  
  67. gumball()
  68. {
  69.     gum = RandomIntRange( 0,0 ); // <min value>, <max value> | zero counts as a number!
  70.    
  71.     switch( gum )
  72.     {
  73.  
  74.         case 0:
  75.             iprintln("Kill Joy");
  76.             level.player SetWeaponAmmoClip( "zombie_gumball", 2 );
  77.             self maps\_gumball_flourish::gum_think();
  78.             break;
  79.         /*
  80.         case 1:
  81.             iprintln("Case 1");
  82.             self thread dead_of_nuclear_winter();
  83.             break;
  84.            
  85.         case 2:
  86.             iprintln("Case 2");
  87.             self thread cache_back();
  88.             break;
  89.            
  90.         case 3:
  91.             iprintln("Case 3");
  92.             self thread anywhere_but_here();
  93.             break;
  94.         */
  95.         default:
  96.             break;
  97.     }
  98. }
  99.  
  100. /*================================= GUMBALL FUNCTIONS BEGIN =================================*/
  101.  
  102. // CLASSIC:
  103. /*
  104. always_done_swiftly()
  105. {
  106.     iprintln("SCRIPT IT!");
  107.     wait(0.5);
  108.     iprintln("Always Done Swiftly - (Activates Immediately, Lasts 3 Rounds) Walk faster when aiming. Raise and lower your weapon to aim more quickly.");
  109. }
  110.  
  111. arms_grace()
  112. {
  113.     iprintln("SCRIPT IT!");
  114.     wait(0.5);
  115.     iprintln("Arms Grace - (Activates Immediately, Lasts until next respawn) Respawn with the guns the player had when they bled out.");
  116. }
  117.  
  118. coagulant()
  119. {
  120.     self endon ("player_revived");
  121.     self endon ("disconnect");
  122.    
  123.     setClientSysState("lsm", "1", self);
  124.  
  125.     self.bleedout_time = delay;
  126.  
  127.     while ( self.bleedout_time > Int( delay * 0.5 ) )
  128.     {
  129.         self.bleedout_time -= 1;
  130.         wait( 1 );
  131.     }
  132.  
  133.     self VisionSetLastStand( "death", delay * 0.5 );
  134.  
  135.     while ( self.bleedout_time > 0 )
  136.     {
  137.         self.bleedout_time -= 1;
  138.         wait( 1 );
  139.     }
  140. }
  141.  
  142. in_plain_sight()
  143. {
  144.     iprintln("in_plain_sight function activated");
  145.     ips_distractor = GetEntArray("ips","targetname");
  146.     distractor = [];
  147.     for( i = 0; i < ips.size; i++ )
  148.     {
  149.         distractor[distractor.size] = ips_distractor[i];
  150.     }
  151.        
  152.     if(isdefined(distractor) && distractor.size > 0)
  153.         tele_point = distractor[RandomInt( distractor.size )];
  154.    
  155.     self SetOrigin(tele_point.origin);
  156. }
  157.  
  158. stock_option()
  159. {
  160.     iprintln("SCRIPT IT!");
  161.     wait(0.5);
  162.     iprintln("Stock Option - (Activates Immediately, Last 2.5 minutes) Ammo is taken from the player's stockpile instead of their weapon's magazine.");
  163. }
  164. */
  165. // NORMAL:
  166. /*
  167. impatient()
  168. {
  169.     iprintln("SCRIPT IT!");
  170.     wait(0.5);
  171.     iprintln("Impatient - (Activates Immediately, Lasts until bleedout) Respawn near the end of the current round instead of at the start of the next round.");
  172. }
  173.  
  174. sword_flay()
  175. {
  176.     iprintln("SCRIPT IT!");
  177.     wait(0.5);
  178.     iprintln("Sword Flay - (Activates Immediately, Lasts 2.5 minutes) Melee attacks and any melee weapon will inflict 5x more damage on zombies.");
  179. }
  180. */
  181.  
  182. anywhere_but_here()
  183. {
  184.     //iprintln("anywhere_but_here function activated");
  185.     abh_tele = GetEntArray("abh_tele","targetname");
  186.     teleport_points = [];
  187.     //if no telepoints are active, teleport to own location to avoid errors
  188.     tele_point = self.origin;
  189.     //filter out undiscovered telepoints
  190.     for( i = 0; i < abh_tele.size; i++ )
  191.     {
  192.         if(isdefined(abh_tele[i].is_activated) && abh_tele[i].is_activated)
  193.             teleport_points[teleport_points.size] = abh_tele[i];
  194.     }
  195.        
  196.     if(isdefined(teleport_points) && teleport_points.size > 0)
  197.         tele_point = teleport_points[RandomInt( teleport_points.size )];
  198.     wait(1);
  199.    
  200.     self SetOrigin(tele_point.origin);
  201. }
  202.  
  203. anywhere_but_here_init() // Init "Anywhere But Here"
  204. {
  205.     abh_tele = GetEntArray("abh_tele","targetname");
  206.     for( i = 0; i < abh_tele.size; i++ )
  207.     {
  208.         abh_tele[i].is_activated = false;
  209.         abh_tele[i] thread anywhere_but_here_activate();
  210.     }
  211. }
  212.  
  213. anywhere_but_here_activate() // Activates teleporters that the player runs past. (Player won't spawn in un-opened parts of the map with this.)
  214. {
  215.     while(1)
  216.     {
  217.         players = get_players();
  218.         for( i = 0; i < players.size; i++ )
  219.         if(distance(players[i].origin, self.origin) < 64)
  220.         {
  221.             self.is_activated = true;
  222.             break;
  223.         }
  224.         wait .1;
  225.     }
  226. }
  227.  
  228. /*
  229. danger_closest()
  230. {
  231.     iprintln("SCRIPT IT!");
  232.     wait(0.5);
  233.     iprintln("Danger Closest - (Activates Immediately, Lasts 3 full rounds) Zero explosive damage. Damage can still be taken by Insanity Elementals.");
  234. }
  235.  
  236. armamental_accomplishment()
  237. {
  238.     iprintln("SCRIPT IT!");
  239.     wait(0.5);
  240.     iprintln("Armamental Accomplishment - (Activates Immediately, Lasts 3 full rounds) Switch weapons and recover from performing melee attacks faster. Reload and use items more quickly.");
  241. }
  242.  
  243. firing_on_all_cylinders()
  244. {
  245.     iprintln("SCRIPT IT!");
  246.     wait(0.5);
  247.     iprintln("Firing On All Cylinders - (Activates Immediately, Lasts 3 full rounds) Can fire while sprinting.");
  248. }
  249.  
  250. arsenal_accelerator()
  251. {
  252.     iprintln("SCRIPT IT!");
  253.     wait(0.5);
  254.     iprintln("Arsenal Accelerator - (Activates Immediately, Lasts 10 minutes) Charge the player's special weapon faster.");
  255. }
  256.  
  257. lucky_crit()
  258. {
  259.     iprintln("SCRIPT IT!");
  260.     wait(0.5);
  261.     iprintln("Lucky Crit - (Activates Immediately, Lasts 1 full round) Improves your chances of activating an Alternate Ammo Type.");
  262. }
  263.  
  264. now_you_see_me()
  265. {
  266.     iprintln("SCRIPT IT!");
  267.     wait(0.5);
  268.     iprintln("Now You See Me - (Activated, 2x Activation) All zombies will chase the player for 10 seconds.");
  269. }
  270. */
  271. /*
  272. alchemical_antithesis()
  273. {
  274.     index = maps\_zombiemode_weapons::get_player_index( player );
  275.     iprintln("Alchemical Antithesis - (Activated, 2x Activations, 60 seconds each) Every 10 points earned is instead awarded 1 ammo in the stock of the current weapon. Affects all weapons. Any points gained including points from power ups will give the player one round in their reserve ammunition for every 10 points earned.")
  276. }
  277. */
  278. // WHIMSICAL:
  279. /*
  280. projectile_vomiting()
  281. {
  282.     iprintln("SCRIPT IT!");
  283.     wait(0.5);
  284.     iprintln("Projectile Vomiting - (Activates Immediately, Lasts 5 full rounds) Zombies you kill with grenades or other large projectiles vomit uncontrollably.");
  285. }
  286.  
  287. newtonian_negation()
  288. {
  289.     iprintln("SCRIPT IT!");
  290.     wait(0.5);
  291.     iprintln("Newtonian Negation - (Activates Immediately, Lasts 25 minutes) Zombies killed fall straight up.");
  292. }
  293. */
  294. // MEGA:
  295. /*
  296. aftertaste()
  297. {
  298.     iprintln("SCRIPT IT!");
  299.     wait(0.5);
  300.     iprintln("Aftertaste - (Activates Immediately, Lasts 3 Rounds) Keep all Perks after being revived.");
  301. }
  302.  
  303. burned_out()
  304. {
  305.     iprintln("SCRIPT IT!");
  306.     wait(0.5);
  307.     iprintln("Burned Out - (Activates Immediately, Lasts 2 Hits) The next time the player takes damage, nearby zombies burst into fire.");
  308. }
  309. */
  310. dead_of_nuclear_winter()
  311. {
  312.     //iprintln("dead_of_nuclear_winter function activated");
  313.     for ( i = 0; i < level.zombie_powerup_array.size; i++ )
  314.     {
  315.         if ( level.zombie_powerup_array[i] == "nuke" )
  316.         {
  317.             level.zombie_powerup_index = i;
  318.             break;
  319.         }
  320.     }
  321.     level.zombie_vars["zombie_drop_item"] = 1;
  322.     level.powerup_drop_count = 0;
  323.     wait(1);
  324.     level thread maps\_zombiemode_powerups::powerup_drop(self.origin + (100, 0, 10));
  325. }
  326. /*
  327. ephemeral_enhancement()
  328. {
  329.     iprintln("SCRIPT IT!");
  330.     wait(0.5);
  331.     iprintln("Ephemeral Enhancement - (2x Activations, 60 Seconds Each) Turns the weapon in the player's hands into the Pack-A-Punched version.");
  332. }
  333.  
  334. im_feeling_lucky()
  335. {
  336.     iprintln("SCRIPT IT!");
  337.     wait(0.5);
  338.     iprintln("I'm Feeling Lucky - (2x Activations) Spawns a random Power-Up.");
  339. }
  340.  
  341. immolation_luquidation()
  342. {
  343.     iprintln("SCRIPT IT!");
  344.     wait(0.5);
  345.     iprintln("Immolation Liquidation - (3x Activations) Spawns a Fire Sale Power-Up.");
  346. }
  347. */
  348. licensed_contractor()
  349. {
  350.     iprintln("licensed_contractor function activated");
  351.     iprintln("Disabled because it gives a max ammo for some odd reason...");
  352.     /*
  353.     for ( i = 0; i < level.zombie_powerup_array.size; i++ )
  354.     {
  355.         if ( level.zombie_powerup_array[i] == "carpenter" )
  356.         {
  357.             level.zombie_powerup_index = i;
  358.             break;
  359.         }
  360.     }
  361.    
  362.     player = getplayers();
  363.     level.zombie_vars["zombie_drop_item"] = 1;
  364.     level.powerup_drop_count = 0;
  365.     wait(1);
  366.     level thread maps\_zombiemode_powerups::powerup_drop(player.origin + (100, 0, 10));
  367.     */
  368. }
  369. /*
  370. phoneix_up()
  371. {
  372.     iprintln("SCRIPT IT!");
  373.     wait(0.5);
  374.     iprintln("Phoenix Up - (1x Activation) Revives all teammates. Teammates keep all of their Perks.");
  375. }
  376.  
  377. pop_shocks()
  378. {
  379.     iprintln("SCRIPT IT!");
  380.     wait(0.5);
  381.     iprintln("Pop Shocks - (Auto-Activates when attacking Zombies, 5x Activations) Melee attacks trigger an electrostatic discharge, electrocuting nearby Zombies.");
  382. }
  383.  
  384. respin_cycle()
  385. {
  386.     iprintln("SCRIPT IT!");
  387.     wait(0.5);
  388.     iprintln("Respin Cycle - (2x Activations) Re-spins the weapons in the Mystery tele after it has been activated.");
  389. }
  390.  
  391. unquenchable()
  392. {
  393.     iprintln("SCRIPT IT!");
  394.     wait(0.5);
  395.     iprintln("Unquenchable - (Auto-Activates when the player has 4 Maximum Perks) Can buy an extra Perk-a-Cola.");
  396. }
  397.  
  398. whos_keeping_score()
  399. {
  400.     iprintln("SCRIPT IT!");
  401.     wait(0.5);
  402.     iprintln("Who's Keeping Score? - (2x Activations) Spawns a Double Points Power-Up.");
  403. }
  404.  
  405. fatal_contraption()
  406. {
  407.     iprintln("SCRIPT IT!");
  408.     wait(0.5);
  409.     iprintln("Fatal Contraption - (2x Activations) Spawns a Death Machine Power-Up.");
  410. }
  411.  
  412. crawl_space()
  413. {
  414.     iprintln("SCRIPT IT!");
  415.     wait(0.5);
  416.     iprintln("Crawl Space - (5x Activations) All nearby zombies become crawlers.");
  417. }
  418.  
  419. unbearable()
  420. {
  421.     iprintln("SCRIPT IT!");
  422.     wait(0.5);
  423.     iprintln("Unbearable - Auto-activates when a teddy bear appears in the Mystery tele. The Mystery tele re-spins automatically. The Mystery tele will not move for several uses.");
  424. }
  425.  
  426. disorderly_combat()
  427. {
  428.     iprintln("SCRIPT IT!");
  429.     wait(0.5);
  430.     iprintln("Disorderly Combat - (Activates Immediately, Last for 5 minutes) Gives a random gun every 10 seconds.");
  431. }
  432.  
  433. slaughter_slide()
  434. {
  435.     iprintln("SCRIPT IT!");
  436.     wait(0.5);
  437.     iprintln("Slaughter Slide - (Auto-activates when sliding, 6x Activations) Create 2 lethal explosions by sliding.");
  438. }
  439.  
  440. mind_blown()
  441. {
  442.     iprintln("SCRIPT IT!");
  443.     wait(0.5);
  444.     iprintln("Mind Blown - (3x Activations) Gib the heads of all the zombies you can see, killing them.");
  445. }
  446. */
  447. // RARE:
  448.  
  449. cache_back()
  450. {
  451.     //iprintln("cache_back function activated");
  452.     for ( i = 0; i < level.zombie_powerup_array.size; i++ )
  453.     {
  454.         if ( level.zombie_powerup_array[i] == "full_ammo" )
  455.         {
  456.             level.zombie_powerup_index = i;
  457.             break;
  458.         }
  459.     }
  460.     level.zombie_vars["zombie_drop_item"] = 1;
  461.     level.powerup_drop_count = 0;
  462.     wait(1);
  463.     level thread maps\_zombiemode_powerups::powerup_drop(self.origin + (100, 0, 10));
  464. }
  465.  
  466. kill_joy()
  467. {
  468.     //iprintln("kill_joy function activated");
  469.     for ( i = 0; i < level.zombie_powerup_array.size; i++ )
  470.     {
  471.         if ( level.zombie_powerup_array[i] == "insta_kill" )
  472.         {
  473.             level.zombie_powerup_index = i;
  474.             break;
  475.         }
  476.     }
  477.     level.zombie_vars["zombie_drop_item"] = 1;
  478.     level.powerup_drop_count = 0;
  479.     wait(1);
  480.     level thread maps\_zombiemode_powerups::powerup_drop(self.origin + (100, 0, 10));
  481.     /*
  482.     iprintln("Gives instakill (no powerup spawn)");
  483.     maps\_zombiemode_powerups::insta_kill_powerup( self );
  484.     maps\_zombiemode_powerups::powerup_vo("insta_kill");
  485.  
  486.     level.zombie_vars["zombie_insta_kill"] = 1;
  487.     wait( 30 );
  488.     level.zombie_vars["zombie_insta_kill"] = 0;
  489.     players = get_players();
  490.     for(i = 0; i < players.size; i++)
  491.     {
  492.         players[i] notify("insta_kill_over");
  493.     }
  494.     */
  495. }
  496. /*
  497. on_the_house()
  498. {
  499.     iprintln("SCRIPT IT!");
  500.     wait(0.5);
  501.     iprintln("On the House - (1x Activation) Spawns a Random Perk Bottle Power Up.");
  502. }
  503.  
  504. wall_power()
  505. {
  506.     iprintln("SCRIPT IT!");
  507.     wait(0.5);
  508.     iprintln("Wall Power - (Activates Immediately) The next wall weapon purchased becomes Pack-a-Punched.");
  509. }
  510.  
  511. undead_man_walking()
  512. {
  513.     iprintln("SCRIPT IT!");
  514.     wait(0.5);
  515.     iprintln("Undead Man Walking - (Activates Immediately, Last 4 minutes) Slow down all zombies to shambling speed.");
  516. }
  517.  
  518. fear_in_headlights()
  519. {
  520.     iprintln("SCRIPT IT!");
  521.     wait(0.5);
  522.     iprintln("Fear in Headlights - (1x Activation, 2 minutes) Zombies seen by the player will not move.");
  523. }
  524.  
  525. temporal_gift()
  526. {
  527.     iprintln("SCRIPT IT!");
  528.     wait(0.5);
  529.     iprintln("Temporal Gift - (Activates Immediately, Last 1 round) Power ups last longer.");
  530. }
  531.  
  532. crate_power()
  533. {
  534.     iprintln("SCRIPT IT!");
  535.     wait(0.5);
  536.     iprintln("Crate Power - (Auto-activates) The next gun taken from the magic tele becomes Pack-a-Punched.");
  537. }
  538.  
  539. bullet_boost()
  540. {
  541.     iprintln("SCRIPT IT!");
  542.     wait(0.5);
  543.     iprintln("Bullet Boost - (2x Activation) Re-Pack your current Pack-a-Punched gun (if supported).");
  544. }
  545. */
  546. // ULTRA-RARE:
  547. /*
  548. killing_time()
  549. {
  550.     iprintln("SCRIPT IT!");
  551.     wait(0.5);
  552.     iprintln("Killing Time - (1x Activation) All zombies freeze in place for 20 seconds. If they are shot they will be annihilated when the time is up.");
  553. }
  554.  
  555. perkaholic()
  556. {
  557.     perk = self.script_noteworthy;
  558.    
  559.    
  560. }
  561.  
  562. head_drama()
  563. {
  564.     iprintln("SCRIPT IT!");
  565.     wait(0.5);
  566.     iprintln("Head Drama - (Activates Immediately, Lasts for the Remainder of the Round) Any bullet which hits a zombie will damage its head.");
  567. }
  568.  
  569. secret_shopper()
  570. {
  571.     iprintln("SCRIPT IT!");
  572.     wait(0.5);
  573.     iprintln("Secret Shopper - (Activated Immediately, Lasts 10 minutes) Any gun wall-buy can be used to buy ammo for any gun.");
  574. }
  575.  
  576. shopping_free()
  577. {
  578.     iprintln("SCRIPT IT!");
  579.     wait(0.5);
  580.     iprintln("Shopping Free - (Activates Immediately, Lasts 1 minute) All purchases are free.");
  581. }
  582.  
  583. near_death_experience()
  584. {
  585.     iprintln("SCRIPT IT!");
  586.     wait(0.5);
  587.     iprintln("Near Death Experience - (Activates Immediately, Lasts 3 full rounds) Revive, or be revived simply by being near other players. Revived players keep all their perks.");
  588. }
  589.  
  590. profit_sharing()
  591. {
  592.     iprintln("SCRIPT IT!");
  593.     wait(0.5);
  594.     iprintln("Profit Sharing - (Activates Immediately, Lasts 10 minutes) Points you earn are also recieved by nearby players and vice versa.");
  595. }
  596.  
  597. round_robbin()
  598. {
  599.     iprintln("SCRIPT IT!");
  600.     wait(0.5);
  601.     iprintln("Round Robbin' - (1x Activation) Ends the current round. All players gain 1600 points.");
  602. }
  603.  
  604. self_medication()
  605. {
  606.     iprintln("SCRIPT IT!");
  607.     wait(0.5);
  608.     iprintln("Self Medication - (Auto-activates by getting a kill in last stand, 3x Activations) Auto revive yourself. Keep all your perks.");
  609. }
  610. */
  611. // CUSTOM:
  612. /*
  613. here_they_rise()
  614. {
  615.     iprintln("SCRIPT IT!");
  616.     wait(0.5);
  617.     iprintln("Here They Rise - (x1 Use) Spawns an Extra 25 zombies (walkers).");
  618. }
  619.  
  620. pain_killer()
  621. {
  622.     iprintln("SCRIPT IT!");
  623.     wait(0.5);
  624.     iprintln("Pain Killer - (x1 Use) God Mode for 10 seconds.");
  625. }
  626.  
  627. guns_blazing()
  628. {
  629.     iprintln("SCRIPT IT!");
  630.     wait(0.5);
  631.     iprintln("Guns Blazing - (x2 Use) Unlimited Ammo (Bullet weapons only) for 90 seconds.");
  632. }
  633.  
  634. power_surge()
  635. {
  636.     iprintln("SCRIPT IT!");
  637.     wait(0.5);
  638.     iprintln("Power Surge - (Activates immediately - Lasts for 2.5 min or till the power is turned on.) Activates everything that requires power. Perks purchased will not deactivate when effect is over. ");
  639. }
  640.  
  641. dead_cheap()
  642. {
  643.     iprintln("SCRIPT IT!");
  644.     wait(0.5);
  645.     iprintln("Dead Cheap - (Activates immediately) Makes everything on the map half price.");
  646. }
  647. */
  648. /*================================= GUMBALL FUNCTIONS END =================================*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement