home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 54 / ClassicFond54.iso / games / stars.rar / multiplayer / DM_Lunacy.cs < prev    next >
Text File  |  1999-02-19  |  6KB  |  220 lines

  1. // FILENAME:    DM_Lunacy.cs
  2. //
  3. // AUTHORS:      Chupie Doll & Youth in Asia
  4. //------------------------------------------------------------------------------
  5.  
  6. $missionName = "DM_Lunacy";
  7.  
  8. exec("multiplayerStdLib.cs");
  9. exec("DMstdLib.cs");
  10.  
  11. function setDefaultMissionOptions()
  12. {
  13.     $server::TeamPlay = false;
  14.     $server::AllowDeathmatch = true;
  15.     $server::AllowTeamPlay = true;    
  16.     
  17.     $server::AllowTeamRed = true;
  18.     $server::AllowTeamBlue = true;
  19.     $server::AllowTeamYellow = true;
  20.     $server::AllowTeamPurple = true;
  21. }
  22.  
  23. function onMissionStart()
  24. {
  25.     $healRate = 100;   
  26.     $ammoRate = 3;
  27.        $padWaitTime = 45;
  28.       $zenWaitTime = 90;
  29.        $instantPadWaitTime = 120;
  30.     
  31.     moonSounds();
  32.  
  33.        $specialHealRate = 1500;   // special pads
  34.        $specialAmmoRate = 25;
  35.    
  36.        $blastRadiusSmall = 50;   // for ammo boxes and special pads
  37.        $blastDamageSmall = 4000;
  38.  
  39.        $blastRadiusLarge = 100;  // for fuel tanks
  40.        $blastDamageLarge = 8000;
  41.    
  42.     cdAudioCycle("Watching", "Terror", "Mechsoul"); 
  43. }
  44.  
  45. function onMissionLoad(){
  46.    cdAudioCycle("Watching", "Terror", "Mechsoul"); 
  47. }
  48.  
  49. // Healing Pad Functionality
  50. //------------------------------------------------------------------------------
  51. function ZenHeal::trigger::onEnter(%this, %object)
  52. {
  53.        Zen::onEnter(%this, %object, *IDMULT_CHAT_HEALPAD, true, true);  
  54. }
  55. function ZenHeal::trigger::onContact(%this, %object)
  56. {
  57.        Zen::work(%this, %object, $healRate, 0, $padWaitTime, true); 
  58. }
  59.  
  60. // Ammo Pad Functionality
  61. //------------------------------------------------------------------------------
  62. function ZenAmmo::trigger::onEnter(%this, %object)
  63. {
  64.        Zen::onEnter(%this, %object, *IDMULT_CHAT_AMMOPAD, true, true);  
  65. }
  66.  
  67. function ZenAmmo::trigger::onContact(%this, %object)
  68. {
  69.        Zen::work(%this, %object, 0, $ammoRate, $padWaitTime, true); 
  70. }
  71.  
  72. // ZenAll Pad Functionality
  73. //------------------------------------------------------------------------------
  74. function ZenAll::trigger::onEnter(%this, %object)
  75. {
  76.        Zen::onEnter(%this, %object, *IDMULT_CHAT_ALLPAD, true, true);  
  77. }
  78. function ZenAll::trigger::onContact(%this, %object)
  79. {
  80.        Zen::work(%this, %object, $healRate, $ammoRate, $padWaitTime, true); 
  81. }
  82.  
  83. // Instant Pad stuff
  84. //------------------------------------------------------------------------------
  85. function ZenInstant::trigger::onEnter(%this, %object)
  86. {
  87.    Zen::onEnter(%this, %object, *IDMULT_CHAT_ALLPAD, true, true);  
  88. }
  89. function ZenInstant::trigger::onContact(%this, %object)
  90. {
  91.    // completely heal and reload instantly -- no reset time
  92.    // shutdown necessary
  93.    Zen::work(%this, %object, 10000, 100, $instantPadWaitTime, true); 
  94. }
  95. function ZenInstant::trigger::onLeave(%this, %object)
  96. {
  97.    Zen::onLeave(%this, %object);
  98. }
  99.  
  100. // Special pads
  101. // no message, no shutdown, no reset
  102. function ZenAll1::trigger::onEnter(%this, %object)
  103. {
  104.    // instant work, no shutdown, no reset
  105.     Zen::onEnter(%this, %object, "", false, false);  
  106.     if(%this.wait != true){
  107.         Zen::work(%this, %object, $specialHealRate, $specialAmmoRate, 20 , false);
  108.        // damage everyone else within %blastRadiusSmall meters
  109.            blast(%this, $blastRadiusSmall, $blastDamageSmall, %object);
  110.         explosion1();
  111.     }
  112. }
  113.  
  114. function ZenAll2::trigger::onEnter(%this, %object)
  115. {
  116.    // instant work, no shutdown, no reset
  117.     Zen::onEnter(%this, %object, "", false, false);  
  118.     if(%this.wait != true){
  119.         Zen::work(%this, %object, $specialHealRate, $specialAmmoRate, 20 , false);
  120.        // damage everyone else within %blastRadiusSmall meters
  121.            blast(%this, $blastRadiusSmall, $blastDamageSmall, %object);
  122.         explosion2();
  123.     }
  124. }
  125.  
  126. function ZenAll3::trigger::onEnter(%this, %object)
  127. {
  128.    // instant work, no shutdown, no reset
  129.     Zen::onEnter(%this, %object, "", false, false);  
  130.     if(%this.wait != true){
  131.         Zen::work(%this, %object, $specialHealRate, $specialAmmoRate, 20 , false);
  132.        // damage everyone else within %blastRadiusSmall meters
  133.            blast(%this, $blastRadiusSmall, $blastDamageSmall, %object);
  134.         explosion3();
  135.     }
  136. }
  137.  
  138. function ZenAll4::trigger::onEnter(%this, %object)
  139. {
  140.    // instant work, no shutdown, no reset
  141.     Zen::onEnter(%this, %object, "", false, false);  
  142.     if(%this.wait != true){
  143.         Zen::work(%this, %object, $specialHealRate, $specialAmmoRate, 20 , false);
  144.        // damage everyone else within %blastRadiusSmall meters
  145.            blast(%this, $blastRadiusSmall, $blastDamageSmall, %object);
  146.         explosion4();
  147.     }
  148. function ZenAll1::trigger::onLeave(%this, %object)
  149. {
  150.    Zen::onLeave(%this, %object);
  151. }
  152. function ZenAll2::trigger::onLeave(%this, %object)
  153. {
  154.    Zen::onLeave(%this, %object);
  155. }
  156. function ZenAll3::trigger::onLeave(%this, %object)
  157. {
  158.    Zen::onLeave(%this, %object);
  159. }
  160. function ZenAll4::trigger::onLeave(%this, %object)
  161. {
  162.    Zen::onLeave(%this, %object);
  163. }
  164.  
  165. function explosion1()
  166. {
  167.     dropPod(-686, 688, 117, -759, 688, 117);
  168.     dropPod(-759, 688, 117, -686, 688, 117);
  169. }
  170. function explosion2()
  171. {
  172.     dropPod(-686, 720, 117, -759, 720, 117);
  173.     dropPod(-759, 720, 117, -686, 720, 117);
  174. }
  175. function explosion3()
  176. {
  177.     dropPod(-686, 752, 117, -759, 752, 117);
  178.     dropPod(-759, 752, 117, -686, 752, 117);
  179. }
  180. function explosion4()
  181. {
  182.     dropPod(-686, 784, 117, -759, 784, 117);
  183.     dropPod(-759, 784, 117, -686, 784, 117);
  184. }
  185.  
  186.  
  187. // Ammo boxes and special pads
  188. //--------------------------------------------------------------------------------
  189. function BlastDamageSmall::structure::onDestroyed(%this, %object)
  190. {
  191.    // blast everyone around
  192.    // exclude nobody
  193.    blast(%this, $blastRadiusSmall, $blastDamageSmall, 0);
  194. }
  195.  
  196. // fuel tanks
  197. //--------------------------------------------------------------------------------
  198. function BlastDamageLarge::structure::onDestroyed(%this, %object)
  199. {
  200.    // blast everyone around
  201.    // exclude nobody
  202.    blast(%this, $blastRadiusLarge, $blastDamageLarge, 0);
  203. }
  204.  
  205.  
  206. // Easter Egg
  207. //--------------------------------------------------------------------------------
  208. function EasterEgg::trigger::onEnter(%this, %object)
  209. {
  210.     Say(playerManager::vehicleIdToPlayerNum(%object), %object, *IDMULT_MOON_LANDER_FOUND);
  211. }
  212. function EasterEgg::trigger::onContact(%this, %object)
  213. {
  214.     damageObject(%object, 250);
  215. }
  216.  
  217.  
  218.  
  219.