Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.76 KB | None | 0 0
  1. #using scripts\codescripts\struct;
  2.  
  3. #using scripts\shared\array_shared;
  4. #using scripts\custom\zombie_debris_trigger;
  5. #using scripts\custom\zombie_trigger_2;
  6. #using scripts\custom\zm_trigger_door_tower_floor_1_debris;
  7. #using scripts\custom\zm_trigger_stair;
  8. #using scripts\custom\locus_wallbuy;
  9. #using scripts\shared\callbacks_shared;
  10. #using scripts\shared\clientfield_shared;
  11. #using scripts\shared\compass;
  12. #using scripts\shared\exploder_shared;
  13. #using scripts\shared\flag_shared;
  14. #using scripts\shared\laststand_shared;
  15. #using scripts\shared\math_shared;
  16. #using scripts\shared\scene_shared;
  17. #using scripts\shared\util_shared;
  18.  
  19. #insert scripts\shared\shared.gsh;
  20. #insert scripts\shared\version.gsh;
  21.  
  22. #insert scripts\zm\_zm_utility.gsh;
  23.  
  24. #using scripts\zm\_load;
  25. #using scripts\zm\_zm_power;
  26. #using scripts\zm\_zm;
  27. #using scripts\zm\_zm_score;
  28. #using scripts\zm\_zm_audio;
  29. #using scripts\zm\_zm_powerups;
  30. #using scripts\zm\_zm_utility;
  31. #using scripts\zm\_zm_weapons;
  32. #using scripts\zm\_zm_zonemgr;
  33.  
  34. #using scripts\shared\ai\zombie_utility;
  35.  
  36. //Perks
  37. #using scripts\zm\_zm_pack_a_punch;
  38. #using scripts\zm\_zm_pack_a_punch_util;
  39. #using scripts\zm\_zm_perk_additionalprimaryweapon;
  40. #using scripts\zm\_zm_perk_doubletap2;
  41. #using scripts\zm\_zm_perk_deadshot;
  42. #using scripts\zm\_zm_perk_juggernaut;
  43. #using scripts\zm\_zm_perk_quick_revive;
  44. #using scripts\zm\_zm_perk_sleight_of_hand;
  45. #using scripts\zm\_zm_perk_staminup;
  46. #using scripts\zm\_zm_weap_staff_revive;
  47. #using scripts\zm\_zm_weap_staff_fire;
  48. #using scripts\zm\_zm_weap_staff_air;
  49. #using scripts\zm\_zm_weap_staff_lightning;
  50. #using scripts\zm\_zm_weap_staff_water;
  51. #using scripts\zm\_zm_weap_beacon;
  52. #using scripts\zm\_zm_weap_blundersplat;
  53. #using scripts\zm\_zm_weap_galvaknuckles;
  54. #using scripts\zm\_zm_weap_tomahawk;
  55. #using scripts\zm\_zm_perks;
  56. #insert scripts\zm\_zm_perks.gsh;
  57.  
  58. //Powerups
  59. #using scripts\zm\_zm_powerup_double_points;
  60. #using scripts\zm\_zm_powerup_carpenter;
  61. #using scripts\zm\_zm_powerup_fire_sale;
  62. #using scripts\zm\_zm_powerup_free_perk;
  63. #using scripts\zm\_zm_powerup_full_ammo;
  64. #using scripts\zm\_zm_powerup_insta_kill;
  65. #using scripts\zm\_zm_powerup_nuke;
  66. #using scripts\zm\_zm_powerup_weapon_minigun;
  67.  
  68. //Traps
  69. #using scripts\zm\_zm_trap_electric;
  70.  
  71. #using scripts\zm\zm_usermap;
  72.  
  73. //*****************************************************************************
  74. // MAIN
  75. //*****************************************************************************
  76.  
  77. function main()
  78. {
  79. zm_usermap::main();
  80.  
  81. level._zombie_custom_add_weapons =&custom_add_weapons;
  82.  
  83. //Setup the levels Zombie Zone Volumes
  84. level.zones = [];
  85. level.zone_manager_init_func =&usermap_test_zone_init;
  86. init_zones[0] = "start_zone";
  87. init_zones[1] = "boss_zone";
  88. level thread zm_zonemgr::manage_zones( init_zones );
  89.  
  90. level.pathdist_type = PATHDIST_ORIGINAL;
  91. level zm_perks::spare_change();
  92.  
  93.  
  94. startingweapon = "pistol_standard";
  95. weapon = GetWeapon(startingweapon);
  96. level.start_weapon = (weapon);
  97. level.player_starting_points = 1000;
  98. for( i = 0; i < GetPlayers().size; i++ ) GetPlayers()[i]
  99.  
  100. thread zombiespeed();
  101. thread power_trigger();
  102. thread tp();
  103. thread bossfight_portal();
  104. thread bossfight();
  105. thread setup_vars();
  106. thread idgun_quest();
  107. thread pillar_1();
  108. thread pillar_2();
  109. thread upgrade_process();
  110. thread idgun_2_quest_1();
  111. thread idgun_2_quest_2();
  112. thread idgun_2_quest_3();
  113. thread idgun_2_upgrade();
  114. thread Arena_nuke();
  115. thread portal();
  116. thread zombie_debris_trigger::init();
  117. thread zombie_trigger_2::init();
  118. thread zm_trigger_stair::init();
  119. thread zm_trigger_door_tower_floor_1_debris::init();
  120. thread locus_wallbuy::init();
  121. }
  122. function usermap_test_zone_init()
  123. {
  124. zm_zonemgr::add_adjacent_zone("start_zone", "zone_2", "enter_zone_2");
  125. level flag::init( "always_on" );
  126. level flag::set( "always_on" );
  127.  
  128. function custom_add_weapons()
  129. {
  130. zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
  131. }
  132. function zombiespeed(){
  133. while(1)
  134. {
  135. self.zombie_move_speed = "sprint";
  136. wait 5;
  137. }
  138. }
  139. function money_trigger()
  140. {
  141. trigger = GetEnt("money_trigger", "targetname");
  142. trigger SetHintString("");
  143. trigger SetCursorHint("HINT_NOICON");
  144. trigger waittill("trigger", player);
  145. player.score += 1000000;
  146. }
  147. function power_trigger()
  148. {
  149.  
  150. trigger = GetEnt("power_trigger", "targetname");
  151. trigger SetHintString("Press &&1 to turn power on");
  152. trigger SetCursorHint("HINT_NOICON");
  153. trigger waittill("trigger", player);
  154. trigger SetHintString("");
  155. trigger playsound("power_on");
  156. level flag::set( "power_on" );
  157.  
  158. }
  159. function Arena_nuke( max_zombies, range )
  160. {
  161. zombies = getaispeciesarray( level.zombie_team );
  162.  
  163. zombies = util::get_array_of_closest( self.origin, zombies, undefined, max_zombies, range );
  164.  
  165. for (i = 0; i < zombies.size; i++)
  166. {
  167. wait (randomfloatrange(0.2, 0.3));
  168. if( !IsDefined( zombies[i] ) )
  169. {
  170. continue;
  171. }
  172.  
  173. if( zm_utility::is_magic_bullet_shield_enabled( zombies[i] ) )
  174. {
  175. continue;
  176. }
  177.  
  178. if( !( zombies[i].isdog ) )
  179. {
  180. zombies[i] zombie_utility::zombie_head_gib();
  181. }
  182.  
  183. zombies[i] dodamage( 10000, zombies[i].origin );
  184. playsoundatposition( "nuked", zombies[i].origin );
  185. }
  186. }
  187. function tp()
  188. {
  189. trigger = GetEnt("tp_trigger", "targetname");
  190. trigger SetHintString("Press &&1 to teleport to Pack-a-Punch");
  191. trigger SetCursorHint("HINT_NOICON");
  192. trigger waittill("trigger", player);
  193. trig SetHintString("Out of order");
  194.  
  195. player SetOrigin((520.75 , 1468.5 , 658.75));
  196. wait 25;
  197. IPrintLnBold("Teleporting in 5...");
  198. wait 1;
  199. IPrintLnBold("4...");
  200. wait 1;
  201. IPrintLnBold("3...");
  202. wait 1;
  203. IPrintLnBold("2...");
  204. wait 1;
  205. IPrintLnBold("1...");
  206. wait 1;
  207. IPrintLnBold("Teleport complete");
  208. player SetOrigin((100.5 , -118.5 , 41.25));
  209. wait 30;
  210. level thread tp();
  211. }
  212. function bossfight_portal()
  213. {
  214.  
  215. trigger = GetEnt("bossfight_portal_trigger", "targetname");
  216. trigger SetHintString("");
  217. trigger SetCursorHint("HINT_NOICON");
  218. trigger waittill("trigger", player);
  219. IPrintLnBold("Teleporting in 5...");
  220. wait 1;
  221. IPrintLnBold("4...");
  222. wait 1;
  223. IPrintLnBold("3...");
  224. wait 1;
  225. IPrintLnBold("2...");
  226. wait 1;
  227. IPrintLnBold("1...");
  228. wait 1;
  229. IPrintLnBold("Teleport complete, bossfight initiated");
  230.  
  231. trigger SetHintString("");
  232. player SetOrigin((1878.5 , -597.5 , -1249));
  233. Arena_nuke(100000, 10000000);
  234. }
  235. function bossfight()
  236. {
  237. level.margwa_1_true = true;
  238. level.margwa_2_true = false;
  239. level.margwa_3_true = false;
  240. desiredweapon = getWeapon("idgun_1"); desiredweapon = getWeapon("idgun_upgraded_0");// Weapon you want the player to have when shot
  241.  
  242. while(level.margwa_1_true == true){
  243. IPrintLnBold("First Margwa head initiated");
  244. trigger = GetEnt ("margwa_1", "targetname");
  245. trigger waittill ("trigger", player);
  246. current_weapon = player getCurrentWeapon();
  247.  
  248. if (current_weapon == desiredweapon)
  249. {
  250. level.margwa_2_true = true;
  251. trigger playsound("zmb_perks_packa_ready");
  252. IPrintLnBold("First head complete!");
  253. wait 10;
  254. break;
  255. }
  256. else
  257. {
  258. trigger playsound("zmb_perks_packa_deny");
  259. IPrintLnBold("Incomplete, restarting cycle");
  260. wait 15;
  261. }
  262. }
  263.  
  264. while(level.margwa_2_true == true){
  265.  
  266. IPrintLnBold("Second Margwa head initiated");
  267. trigger = GetEnt ("margwa_2", "targetname");
  268. trigger waittill ("trigger", player);
  269. current_weapon = player getCurrentWeapon();
  270.  
  271. if (current_weapon == desiredweapon)
  272. {
  273. level.margwa_3_true = true;
  274. trigger playsound("zmb_perks_packa_ready");
  275. IPrintLnBold("Second head complete!");
  276. wait 10;
  277. break;
  278. }
  279. else
  280. {
  281. trigger playsound("zmb_perks_packa_deny");
  282. IPrintLnBold("Incomplete, restarting cycle");
  283. wait 15;
  284. }
  285. }
  286.  
  287. while (level.margwa_3_true == true){
  288.  
  289. IPrintLnBold("Third Margwa head initiated");
  290. trigger = GetEnt ("margwa_3", "targetname");
  291. trigger waittill ("trigger", player);
  292. current_weapon = player getCurrentWeapon();
  293.  
  294. if (current_weapon == desiredweapon)
  295. {
  296. IPrintLnBold("All heads complete!");
  297. trigger playsound("zmb_perks_packa_ready");
  298. wait 1;
  299. trigger playsound("zmb_perks_packa_ready");
  300. wait 1;
  301. trigger playsound("zmb_perks_packa_ready");
  302. wait 1;
  303. IPrintLnBold("Returning in 10...");
  304. wait 1;
  305. IPrintLnBold("9...");
  306. wait 1;
  307. IPrintLnBold("8...");
  308. wait 1;
  309. IPrintLnBold("7...");
  310. wait 1;
  311. IPrintLnBold("6...");
  312. wait 1;
  313. IPrintLnBold("5...");
  314. wait 1;
  315. IPrintLnBold("4...");
  316. wait 1;
  317. IPrintLnBold("3...");
  318. wait 1;
  319. IPrintLnBold("2...");
  320. wait 1;
  321. IPrintLnBold("1...");
  322. wait 1;
  323. IPrintLnBold("Teleport complete");
  324.  
  325. player SetOrigin((100.5 , -118.5 , 41.25));
  326. Arena_nuke(100000000, 100000000);
  327. break;
  328. }
  329. else
  330. {
  331. trigger playsound("zmb_perks_packa_deny");
  332. IPrintLnBold("Incomplete, restarting cycle");
  333. wait 30;
  334. }
  335. }
  336. }
  337. function setup_vars ()
  338. {
  339. level.pillar_1_trigger = GetEnt("level.pillar_1_trigger", "targetname");
  340. level.pillar_2_trigger = GetEnt("level.pillar_2_trigger", "targetname");
  341. level.idgun_get = GetEnt("idgun_get", "targetname");
  342. level.idgun = GetEnt("idgun", "targetname");
  343. level.idgun_2_trigger = GetEnt("idgun_2_trigger", "targetname");
  344. level.idgun_2_get = GetEnt("idgun_2_get", "targetname");
  345. level.idgun_2_rock = GetEnt("idgun_2_rock", "targetname");
  346. level.idgun_2_upgrade_trigger = GetEnt("idgun_2_upgrade_trigger", "targetname");
  347. level.idgun_2_upgrade = GetEnt("idgun_2_upgrade", "targetname");
  348. level.trigger_1_active = false;
  349. level.trigger_2_active = false;
  350. level.idgun_2_active = false;
  351. level.idgun_2_upgrade_active = false;
  352. level.portal_true = false;
  353. }
  354. function idgun_quest()
  355. {
  356. level.idgun_get SetHintString("");
  357. level.idgun_get SetCursorHint("HINT_NOICON");
  358. level.idgun_2_get SetHintString("");
  359. level.idgun_2_get SetCursorHint("HINT_NOICON");
  360.  
  361.  
  362.  
  363. level.idgun_get setorigin (level.idgun_get.origin - (0,0,1000));
  364.  
  365. while(level.trigger_1_active == false || level.trigger_2_active == false)
  366. {
  367. wait 1;
  368. }
  369.  
  370.  
  371. level.idgun_get SetHintString("");
  372. level.idgun_get SetCursorHint("HINT_NOICON");
  373. level.idgun_get waittill("trigger", player);
  374. level.idgun_get SetHintString("");
  375. level.portal_true = true;
  376. level.idgun delete();
  377.  
  378. weaponname = "idgun_0";
  379. weapon = getWeapon(weaponname);
  380. player zm_weapons::weapon_give(weapon);
  381. player zm_weapons::ammo_give(weapon);
  382. player SwitchToWeapon(weapon);
  383. }
  384. function pillar_1()
  385. {
  386. level.pillar_1_trigger SetHintString("We were unable to keep it in its deep slumber...");
  387. level.pillar_1_trigger SetCursorHint("HINT_NOICON");
  388. level.pillar_1_trigger waittill("trigger", player);
  389. level.pillar_1_trigger SetHintString("We were unable to keep it in its deep slumber...");
  390. level.trigger_1_active = true;
  391.  
  392. }
  393. function pillar_2()
  394. {
  395. level.pillar_2_trigger SetHintString("It escaped as we were bringing it into the lab for testing...");
  396. level.pillar_2_trigger SetCursorHint("HINT_NOICON");
  397. level.pillar_2_trigger waittill("trigger", player);
  398. level.pillar_2_trigger SetHintString("It escaped as we were bringing it into the lab for testing...");
  399. level.trigger_2_active = true;
  400. }
  401. function upgrade_process()
  402. {
  403. desiredweapon = getWeapon("idgun_0"); // Weapon you want the player to have when shot
  404.  
  405. trig = GetEnt("idgun_upgrade", "targetname");
  406. trig waittill( "trigger", player );
  407. rock = GetEnt("idgun_upgrade_rock", "targetname");
  408. current_weapon = player getCurrentWeapon();
  409. while(1)
  410. {
  411. if( current_weapon == desiredweapon )
  412. {
  413. trig Delete();
  414. rock Delete();
  415. weaponname = "idgun_upgraded_0";
  416. weapon = getWeapon(weaponname);
  417. player zm_weapons::weapon_give(weapon);
  418. player zm_weapons::ammo_give(weapon);
  419. player SwitchToWeapon(weapon);
  420. }
  421. else
  422. {
  423. level thread upgrade_process();
  424. }
  425.  
  426. break;
  427. }
  428. }
  429. function idgun_2_quest_1()
  430. {
  431. while(level.idgun_2_active == false)
  432. {
  433. wait 1;
  434. }
  435.  
  436.  
  437. level.idgun_2_get SetHintString("");
  438. level.idgun_2_get SetCursorHint("HINT_NOICON");
  439. level.idgun_2_get waittill("trigger", player);
  440. level.idgun_2_get SetHintString("");
  441.  
  442. weaponname = "idgun_1";
  443. weapon = getWeapon(weaponname);
  444. player zm_weapons::weapon_give(weapon);
  445. player zm_weapons::ammo_give(weapon);
  446. player SwitchToWeapon(weapon);
  447. }
  448. function idgun_2_upgrade(){
  449. while(level.idgun_2_upgrade_active == false)
  450. {
  451. wait 1;
  452. }
  453. level.idgun_2_get SetHintString("");
  454. level.idgun_2_get SetCursorHint("HINT_NOICON");
  455. level.idgun_2_get waittill("trigger", player);
  456. level.idgun_2_get SetHintString("");
  457.  
  458. weaponname = "idgun_upgraded_1";
  459. weapon = getWeapon(weaponname);
  460. player zm_weapons::weapon_give(weapon);
  461. player zm_weapons::ammo_give(weapon);
  462. player SwitchToWeapon(weapon);
  463. }
  464. function idgun_2_quest_2()
  465. {
  466. desiredweapon = getWeapon("idgun_upgraded_0"); // Weapon you want the player to have when shot
  467.  
  468. trig = GetEnt("idgun_2_trigger", "targetname");
  469. trig waittill( "trigger", player );
  470. rock = GetEnt("level.idgun_2_rock", "targetname");
  471. current_weapon = player getCurrentWeapon();
  472. while(1)
  473. {
  474. if( current_weapon == desiredweapon )
  475. {
  476. trig Delete();
  477. rock Delete();
  478. level.idgun_2_active = true;
  479. }
  480. else
  481. {
  482. level thread idgun_2_quest_2();
  483. }
  484.  
  485. break;
  486. }
  487. }
  488. function idgun_2_quest_3()
  489. {
  490. desiredweapon = getWeapon("idgun_1"); // Weapon you want the player to have when shot
  491.  
  492. trig = GetEnt("level.idgun_2_upgrade_trigger", "targetname");
  493. trig waittill( "trigger", player );
  494. rock = GetEnt("level.idgun_2_upgrade", "targetname");
  495. current_weapon = player getCurrentWeapon();
  496. while(1)
  497. {
  498. if( current_weapon == desiredweapon )
  499. {
  500. trig Delete();
  501. rock Delete();
  502. level.idgun_2_upgrade_active = true;
  503. }
  504. else
  505. {
  506. level thread idgun_2_quest_3();
  507. }
  508.  
  509. break;
  510. }
  511. }
  512. function portal()
  513. {
  514. trig = GetEnt("portal", "targetname");
  515. trig SetHintString("");
  516. trig SetCursorHint("HINT_NOICON");
  517. trig waittill("trigger", player);
  518. trig SetHintString("");
  519. player SetOrigin((100.5 , -118.5 , 41.25));
  520. level thread portal();
  521. }
  522. function amm_o_matic()
  523. {
  524. level.buyable_powerup_trigger = GetEnt("buyable_powerup_trig", "targetname");
  525. level.buyable_powerup_trigger SetHintString( &"ZOMBIE_NEED_POWER");
  526. level.buyable_powerup_trigger SetCursorHint("HINT_NOICON");
  527. level flag::wait_till("power_on");
  528. level.buyable_powerup_cost = 5000;
  529. while(1)
  530. {
  531. level.buyable_powerup_trigger ("buyable_powerup_trig", "targetname");
  532. level.buyable_powerup_trigger SetHintString("Press ^3[{+activate}]^7 for Amm-O-Matic [Cost: " + level.buyable_powerup_cost + "]");
  533. level.buyable_powerup_trigger SetCursorHint("HINT_NOICON");
  534. buyable_powerup_spawner = struct::get( "powerup_spawn", "targetname" );
  535. level.buyable_powerup_trigger waittill("trigger", player);
  536.  
  537. if(player.score >= level.buyable_powerup_cost)
  538. {
  539. player zm_score::minus_to_player_score(level.buyable_powerup_cost);
  540. buyable_powerup_spawn thread zm_powerups::specific_powerup_drop("full_ammo", buyable_powerup_spawn.origin);
  541. break;
  542. }
  543. else
  544. {
  545. level.buyable_powerup_trigger SetHintString("Not enough points");
  546. wait 1;
  547. level thread amm_o_matic
  548. }
  549. }
  550. }
  551. function ritual()
  552. {
  553. trig = GetEnt("ritual_trigger", "targetname");
  554. trig SetHintString("");
  555. trig SetCursorHint("HINT_NOICON");
  556. trig waittill("trigger", player);
  557. trig SetHintString("");
  558. IPrintLnBold("60 second ritual");
  559. wait 5;
  560. zm_powerups::specific_powerup_drop("full_ammo", ((134 , 1564.5 , 24)));
  561. level thread ritual();
  562. }
  563. /*function ammo_matic()
  564. {
  565. cost = 5000;
  566. trigs = GetEntArray( "ammo_matic", "targetname" );
  567. foreach( trig in trigs )
  568. {
  569. trig thread ammo_matic_think( cost );
  570. trig SetCursorHint( "HINT_NOICON" );
  571. trig SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
  572. }
  573. }
  574. function ammo_matic_think( cost )
  575. {
  576. while(1)
  577. {
  578. self waittill( "trigger", player );
  579. if( player.score >= cost )
  580. {
  581. weapon = player GetCurrentWeapon();
  582. player zm_weapons::weapon_give( weapon );
  583. PlaySoundAtPosition( "zmb_cha_ching", self.origin );
  584. player zm_score::minus_to_player_score( cost );
  585. self SetHintString("");
  586. wait(3);
  587. }
  588. else
  589. {
  590. self SetHintString( "You Do Not Have Enough Money" );
  591. wait(3);
  592. }
  593. self SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
  594. break;
  595. }
  596. }*/
  597.  
  598. ==================================================
  599.  
  600. ^1}*/
  601. ^1--^
  602. ^1ERR(0) scripts/zm/zm_rlyeh.gsc (596,3) : syntax error, unexpected $end, expecting TOKEN_RIGHT_CURLY : }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement