Guest User

map.gsc

a guest
Aug 7th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.90 KB | None | 0 0
  1. /*
  2. Der Frost / Nazi Zombie Sniperbolt Tutorial Version 2.0
  3. Scripter: Sparks
  4. Tutorial: Sniperbolt
  5.  
  6. Version 1.0 (9/24/2009 7:51:18 PM)
  7. -- Initial Release Of Source Files
  8. */
  9.  
  10. // Tutorial From Sniperbolt!
  11.  
  12. // Utilities
  13. #include common_scripts\utility;
  14. #include maps\_utility;
  15. #include maps\_zombiemode_utility;
  16. #include maps\_zombiemode_zone_manager;
  17. #include maps\_music;
  18.  
  19. // DLC3 Utilities
  20. #include maps\dlc3_code;
  21. #include maps\dlc3_teleporter;
  22.  
  23. main()
  24. {
  25. level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
  26.  
  27. thread zombiesleft_hud();
  28.  
  29. // Must Change These To Your Maps
  30. level.DLC3.createArt = maps\createart\nazi_zombie_Suburb_art::main;
  31. level.DLC3.createFX = maps\createfx\nazi_zombie_Suburb_fx::main;
  32. // level.DLC3.myFX = ::preCacheMyFX;
  33.  
  34. /*--------------------
  35. FX
  36. ----------------------*/
  37. DLC3_FX();
  38.  
  39. /*--------------------
  40. LEVEL VARIABLES
  41. ----------------------*/
  42.  
  43. // Variable Containing Helpful Text For Modders -- Don't Remove
  44. level.modderHelpText = [];
  45.  
  46. //
  47. // Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
  48. //
  49.  
  50. // Edit The Value In Mod.STR For Your Level Introscreen Place
  51. level.DLC3.introString = &"nazi zombie tes";
  52.  
  53. // Weapons. Pointer function automatically loads weapons used in Der Riese.
  54. level.DLC3.weapons = maps\dlc3_code::include_weapons;
  55.  
  56. // Power Ups. Pointer function automatically loads power ups used in Der Riese.
  57. level.DLC3.powerUps = maps\dlc3_code::include_powerups;
  58.  
  59. // Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
  60. level.DLC3.perk_altMeleeDamage = 1000;
  61.  
  62. // Adjusts barrier search override. Stock is 400.
  63. level.DLC3.barrierSearchOverride = 400;
  64.  
  65. // Adjusts power up drop max per round. Stock is 3.
  66. level.DLC3.powerUpDropMax = 3;
  67.  
  68. // _loadout Variables
  69. level.DLC3.useCoopHeroes = true;
  70.  
  71. // Bridge Feature
  72. level.DLC3.useBridge = false;
  73.  
  74. // Hell Hounds
  75. level.DLC3.useHellHounds = true;
  76.  
  77. // Mixed Rounds
  78. level.DLC3.useMixedRounds = true;
  79.  
  80. // Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
  81. boxArray = [];
  82. boxArray[ boxArray.size ] = "start_chest";
  83. boxArray[ boxArray.size ] = "chest1";
  84. boxArray[ boxArray.size ] = "chest2";
  85. boxArray[ boxArray.size ] = "chest3";
  86. boxArray[ boxArray.size ] = "chest4";
  87. boxArray[ boxArray.size ] = "chest5";
  88. level.DLC3.PandoraBoxes = boxArray;
  89.  
  90. // Initial Zone(s) -- Zone(s) You Want Activated At Map Start
  91. zones = [];
  92. zones[ zones.size ] = "start_zone";
  93. level.DLC3.initialZones = zones;
  94.  
  95. // Electricity Switch -- If False Map Will Start With Power On
  96. level.DLC3.useElectricSwitch = true;
  97.  
  98. // Electric Traps
  99. level.DLC3.useElectricTraps = true;
  100.  
  101. // _zombiemode_weapons Variables
  102. level.DLC3.usePandoraBoxLight = true;
  103. level.DLC3.useChestPulls = true;
  104. level.DLC3.useChestMoves = true;
  105. level.DLC3.useWeaponSpawn = true;
  106. level.DLC3.useGiveWeapon = true;
  107.  
  108. // _zombiemode_spawner Varibles
  109. level.DLC3.riserZombiesGoToDoorsFirst = true;
  110. level.DLC3.riserZombiesInActiveZonesOnly = true;
  111. level.DLC3.assureNodes = true;
  112.  
  113. // _zombiemode_perks Variables
  114. level.DLC3.perksNeedPowerOn = true;
  115.  
  116. // _zombiemode_devgui Variables
  117. level.DLC3.powerSwitch = true;
  118.  
  119. /*--------------------
  120. FUNCTION CALLS - PRE _Load
  121. ----------------------*/
  122. level thread DLC3_threadCalls();
  123.  
  124. /*--------------------
  125. ZOMBIE MODE
  126. ----------------------*/
  127. [[level.DLC3.weapons]]();
  128. [[level.DLC3.powerUps]]();
  129. level.tom_victory = false;
  130. end_trig = getentarray( "end_game","targetname" );
  131. array_thread( end_trig,::end_game );
  132. maps\_zombiemode::main();
  133.  
  134. /*--------------------
  135. FUNCTION CALLS - POST _Load
  136. ----------------------*/
  137. level.zone_manager_init_func = ::dlc3_zone_init;
  138. level thread DLC3_threadCalls2();
  139. }
  140.  
  141. dlc3_zone_init()
  142. {
  143.  
  144. add_adjacent_zone( "initial_zone", "zone1", "enter_zone1" );
  145. add_adjacent_zone( "zone1", "zone2", "enter_zone2" );
  146. /*
  147. =============
  148. ///ScriptDocBegin
  149. "Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )"
  150. "Summary: Sets up adjacent zones."
  151. "MandatoryArg: <zone_1>: Name of first Info_Volume"
  152. "MandatoryArg: <zone_2>: Name of second Info_Volume"
  153. "MandatoryArg: <flag>: Flag to be set to initiate zones"
  154. "OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false."
  155. "Example: add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );"
  156. ///ScriptDocEnd
  157. =============
  158. */
  159.  
  160. // Outside East Door
  161. //add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );
  162. }
  163. zombiesleft_hud()
  164. {
  165. Remaining = create_simple_hud();
  166. Remaining.horzAlign = "center";
  167. Remaining.vertAlign = "middle";
  168. Remaining.alignX = "Left";
  169. Remaining.alignY = "middle";
  170. Remaining.y = 230;
  171. Remaining.x = 60;
  172. Remaining.foreground = 1;
  173. Remaining.fontscale = 8.0;
  174. Remaining.alpha = 1;
  175. Remaining.color = ( 0.423, 0.004, 0 );
  176.  
  177.  
  178. ZombiesLeft = create_simple_hud();
  179. ZombiesLeft.horzAlign = "center";
  180. ZombiesLeft.vertAlign = "middle";
  181. ZombiesLeft.alignX = "center";
  182. ZombiesLeft.alignY = "middle";
  183. ZombiesLeft.y = 230;
  184. ZombiesLeft.x = -1;
  185. ZombiesLeft.foreground = 1;
  186. ZombiesLeft.fontscale = 8.0;
  187. ZombiesLeft.alpha = 1;
  188. ZombiesLeft.color = ( 0.423, 0.004, 0 );
  189. ZombiesLeft SetText("Zombies Left: ");
  190.  
  191.  
  192. while(1)
  193. {
  194. remainingZombies = get_enemy_count() + level.zombie_total;
  195. Remaining SetValue(remainingZombies);
  196.  
  197. if(remainingZombies == 0 )
  198. {
  199. Remaining.alpha = 0;
  200. while(1)
  201. {
  202. remainingZombies = get_enemy_count() + level.zombie_total;
  203. if(remainingZombies != 0 )
  204. {
  205. Remaining.alpha = 1;
  206. break;
  207. }
  208. wait 0.5;
  209. }
  210. }
  211. wait 0.5;
  212. }
  213. }
  214.  
  215. end_game()
  216. {
  217. user = undefined;
  218. cost = 25000; //change to cost that you want
  219.  
  220. self setCursorHint("HINT_NOICON");
  221. self UseTriggerRequireLookAt();
  222. self setHintString("The power must be activated first"); //remove line if you want it to work without power
  223.  
  224. flag_wait( "electricity_on" ); //remove line if you want it to work without power
  225.  
  226. self setHintString("press &&1 to End the Game [Cost: "+cost+"]"); //text hint trigger
  227.  
  228. while(1)
  229. {
  230. self waittill("trigger", user);
  231. if( is_player_valid(user) && user.score >= cost )
  232. {
  233. play_sound_at_pos( "cha_ching", self.origin );
  234. user thread maps\_zombiemode_score::minus_to_player_score( cost );
  235. self delete();
  236.  
  237. level notify( "end_game" );
  238. level notify("tom_planes");
  239. level.tom_victory = true;
  240. }
  241. else
  242. {
  243. play_sound_at_pos( "no_cha_ching", self.origin );
  244. }
  245. }
  246. }
Advertisement
Add Comment
Please, Sign In to add comment