Guest User

nazi zombie tower.gsc

a guest
Jul 14th, 2010
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.97 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. // Must Change These To Your Maps
  28. level.DLC3.createArt = maps\createart\nazi_zombie_tower_art::main;
  29. level.DLC3.createFX = maps\createfx\nazi_zombie_tower_fx::main;
  30. // level.DLC3.myFX = ::preCacheMyFX;
  31.  
  32. /*--------------------
  33. FX
  34. ----------------------*/
  35. DLC3_FX();
  36.  
  37. /*--------------------
  38. LEVEL VARIABLES
  39. ----------------------*/
  40.  
  41. // Variable Containing Helpful Text For Modders -- Don't Remove
  42. level.modderHelpText = [];
  43.  
  44. //
  45. // Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
  46. //
  47.  
  48. // Edit The Value In Mod.STR For Your Level Introscreen Place
  49. level.DLC3.introString = &"nazi zombie tes";
  50.  
  51. // Weapons. Pointer function automatically loads weapons used in Der Riese.
  52. level.DLC3.weapons = maps\dlc3_code::include_weapons;
  53.  
  54. // Power Ups. Pointer function automatically loads power ups used in Der Riese.
  55. level.DLC3.powerUps = maps\dlc3_code::include_powerups;
  56.  
  57. // Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
  58. level.DLC3.perk_altMeleeDamage = 1000;
  59.  
  60. // Adjusts barrier search override. Stock is 400.
  61. level.DLC3.barrierSearchOverride = 400;
  62.  
  63. // Adjusts power up drop max per round. Stock is 3.
  64. level.DLC3.powerUpDropMax = 3;
  65.  
  66. // _loadout Variables
  67. level.DLC3.useCoopHeroes = true;
  68.  
  69. // Bridge Feature
  70. level.DLC3.useBridge = false;
  71.  
  72. // Hell Hounds
  73. level.DLC3.useHellHounds = false;
  74.  
  75. // Mixed Rounds
  76. level.DLC3.useMixedRounds = true;
  77.  
  78. // Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
  79. boxArray = [];
  80. boxArray[ boxArray.size ] = "start_chest";
  81. boxArray[ boxArray.size ] = "chest1";
  82. boxArray[ boxArray.size ] = "chest2";
  83. boxArray[ boxArray.size ] = "chest3";
  84. boxArray[ boxArray.size ] = "chest4";
  85. boxArray[ boxArray.size ] = "chest5";
  86. level.DLC3.PandoraBoxes = boxArray;
  87.  
  88. // Initial Zone(s) -- Zone(s) You Want Activated At Map Start
  89. zones = [];
  90. zones[ zones.size ] = "start_zone";
  91. level.DLC3.initialZones = zones;
  92.  
  93. // Electricity Switch -- If False Map Will Start With Power On
  94. level.DLC3.useElectricSwitch = false;
  95.  
  96. // Electric Traps
  97. level.DLC3.useElectricTraps = true;
  98.  
  99. // _zombiemode_weapons Variables
  100. level.DLC3.usePandoraBoxLight = true;
  101. level.DLC3.useChestPulls = true;
  102. level.DLC3.useChestMoves = true;
  103. level.DLC3.useWeaponSpawn = true;
  104. level.DLC3.useGiveWeapon = true;
  105.  
  106. // _zombiemode_spawner Varibles
  107. level.DLC3.riserZombiesGoToDoorsFirst = true;
  108. level.DLC3.riserZombiesInActiveZonesOnly = true;
  109. level.DLC3.assureNodes = true;
  110.  
  111. // _zombiemode_perks Variables
  112. level.DLC3.perksNeedPowerOn = true;
  113.  
  114. // _zombiemode_devgui Variables
  115. level.DLC3.powerSwitch = true;
  116.  
  117. // Ammo Pile
  118. level.give_ammo = 0;
  119. ammo_trigs = getentarray("give_ammo","targetname");
  120. array_thread(ammo_trigs,::give_ammo);
  121.  
  122. /*--------------------
  123. FUNCTION CALLS - PRE _Load
  124. ----------------------*/
  125. level thread DLC3_threadCalls();
  126. // END GAME
  127. level.tom_victory = false;
  128. end_trig = getentarray( "end_game","targetname" );
  129. array_thread( end_trig,::end_game );
  130. /*--------------------
  131. ZOMBIE MODE
  132. ----------------------*/
  133. [[level.DLC3.weapons]]();
  134. [[level.DLC3.powerUps]]();
  135. maps\_zombiemode::main();
  136.  
  137. /*--------------------
  138. FUNCTION CALLS - POST _Load
  139. ----------------------*/
  140. level.zone_manager_init_func = ::dlc3_zone_init;
  141. level thread DLC3_threadCalls2();
  142. level thread maps\dlc2_zipline::initZipline();
  143. }
  144.  
  145. dlc3_zone_init()
  146. {
  147.  
  148. add_adjacent_zone( "start_zone", "zone1", "enter_zone1" );
  149. /*
  150. =============
  151. ///ScriptDocBegin
  152. "Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )"
  153. "Summary: Sets up adjacent zones."
  154. "MandatoryArg: <zone_1>: Name of first Info_Volume"
  155. "MandatoryArg: <zone_2>: Name of second Info_Volume"
  156. "MandatoryArg: <flag>: Flag to be set to initiate zones"
  157. "OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false."
  158. "Example: add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );"
  159. ///ScriptDocEnd
  160. =============
  161. */
  162.  
  163. // Outside East Door
  164. //add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );
  165. }
  166.  
  167. end_game()
  168. {
  169. user = undefined;
  170. cost = 20000; //change to cost that you want
  171.  
  172. self setCursorHint("HINT_NOICON");
  173. self UseTriggerRequireLookAt();
  174. // self setHintString("The power must be activated first"); //remove line if you want it to work without power
  175.  
  176. // flag_wait( "electricity_on" ); //remove line if you want it to work without power
  177.  
  178. self setHintString("press &&1 to End the Game [Cost: "+cost+"]"); //text hint trigger
  179.  
  180. while(1)
  181. {
  182. self waittill("trigger", user);
  183. if( is_player_valid(user) && user.score >= cost )
  184. {
  185. play_sound_at_pos( "cha_ching", self.origin );
  186. user thread maps\_zombiemode_score::minus_to_player_score( cost );
  187. self delete();
  188.  
  189. level notify( "end_game" );
  190. level notify("tom_planes");
  191. level.tom_victory = true;
  192. }
  193. else
  194. {
  195. play_sound_at_pos( "no_cha_ching", self.origin );
  196. }
  197. wait(0.05);
  198. }
  199. }
  200.  
  201. give_ammo()
  202. {
  203. while(1)
  204. {
  205. who = undefined;
  206. cost = 1250;
  207.  
  208. string = "Press &&1 to buy ammo [Cost: " + cost + "]";
  209.  
  210. self sethintstring( string );
  211. self SetCursorHint( "HINT_NOICON" );
  212. self UseTriggerRequireLookAt();
  213. self waittill( "trigger", who );
  214.  
  215. weapon = who GetCurrentWeapon();
  216. ammocount = who getammocount(weapon);
  217. clipcount = who getweaponammoclip(weapon);
  218. maxammo = weaponmaxammo(weapon);
  219.  
  220. // UNCOMMENT TO MAKE RAY GUN & WUNDERWAFFE AMMO UNBUYABLE
  221. //if( weapon == "tesla_gun" || weapon == "ray_gun" )
  222. //{
  223. // who iprintln( "You cannot buy ammo for this weapon" );
  224. // level.give_ammo = 0;
  225. //}
  226. // UNCOMMENT TO MAKE RAY GUN & WUNDERWAFFE AMMO UNBUYABLE
  227.  
  228. if( maxammo <= ammocount - clipcount )
  229. {
  230. continue;
  231. }
  232.  
  233. if ( weapon != "fraggrenade" && weapon!= "stielhandgranate" && weapon != "molotov" && weapon != "mine_bouncing_betty" && weapon != "mortar_round" && weapon != "satchel_charge_new")
  234. {
  235. if( who.score > cost )
  236. {
  237. level.give_ammo = 1;
  238. }
  239. else
  240. {
  241. level.give_ammo = 0;
  242. }
  243. }
  244.  
  245. if( level.give_ammo > 0 )
  246. {
  247. who givemaxammo( who GetCurrentWeapon() );
  248. who maps\_zombiemode_score::minus_to_player_score( cost );
  249. who playsound( "cha_ching" );
  250. }
  251. else
  252. {
  253. who playsound( "no_cha_ching" );
  254. }
  255. wait(0.05);
  256. }
  257. }
Advertisement
Add Comment
Please, Sign In to add comment