Advertisement
ijontichy

a_clssc.c

Apr 19th, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 50.19 KB | None | 0 0
  1. // All Out War 2 Class purchase scripts
  2. // Credit to VoltlocK for originally creating the engine
  3. // With modifications by Eruanna, Dusk and the Omega Team
  4.  
  5. // You may use portions of this script in your project as long as you give credit where credit is
  6. // due. Please don't be lame and just copy-paste any of this and call it your own. Thanks!
  7.  
  8. //---------------------------GUNMAN
  9. script 20 (int Team) {
  10.     int cost = 0; int speed = 1.0;
  11.     if (MitigateDoublePress()) terminate;
  12.     if (!IsResigned()) terminate;
  13.     if (!IsSecondPress("CLSS01", cost)) terminate;
  14.  
  15.     TakeInventory("PurchaseToken",1);
  16.     DisplayTick();
  17.     SpendCredits(Credits[PlayerNumber()+1], 0);
  18.     SETFONT("BigFont");
  19.     HudMessage(s:"You are a \cfgunman!";
  20.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  21.    
  22.     //Set Statistics
  23.     SetActorProperty(0,APROP_SPEED,speed);
  24.     GiveInventory("HasClass",1);
  25.     GiveInventory("NewClipAmmo",160);
  26.     GiveInventory("Handgun",1);
  27.     GiveInventory ("TimedC4", 1);
  28.     GiveInventory ("TimedC4Count", 1);
  29.     SetFragGrenades (1);
  30.     GiveInventory("SubMachineGun",1);
  31.     SetWeapon("SubMachineGun");
  32.     ACS_ExecuteAlways(91, 0);
  33.    
  34.     GiveInventory("SpawnInvulnerability",1);
  35.     GiveInventory ("ClassID", CLASS_GUNMAN);
  36.    
  37.     ACS_ExecuteAlways (961, 0, Team);
  38.     PlayerSpeeds[PlayerNumber()] = speed;
  39.     Log(n:0, s:" becomes Gunman.");
  40. }
  41.  
  42. //---------------------------ENGINEER
  43. script 21 (int Team) {
  44.     int cost = 0; int speed = 0.8;
  45.     if (MitigateDoublePress()) terminate;
  46.     if (!IsResigned()) terminate;
  47.     if (!IsSecondPress("CLSS02", cost)) terminate;
  48.    
  49.     TakeInventory("PurchaseToken",1);
  50.     DisplayTick();
  51.     SpendCredits(Credits[PlayerNumber()+1], 0);
  52.     SETFONT("BigFont");
  53.     HudMessage(s:"You are an \cfEngineer!";
  54.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  55.    
  56.     //Set Statistics
  57.     SetActorProperty(0,APROP_SPEED,speed);
  58.     GiveInventory("HasClass",1);
  59.     GiveInventory("NewClipAmmo",120);
  60.     GiveInventory("Handgun",1);
  61.     SetFragGrenades (1);
  62.     GiveInventory ("EnhancedTimedC4",1);
  63.     GiveInventory ("TimedC4",1);
  64.     GiveInventory ("TimedC4Count",1);
  65.     GiveInventory("RepairGun",1);
  66.     SetWeapon("RepairGun");
  67.     ACS_ExecuteAlways(91, 0);
  68.    
  69.     GiveInventory("SpawnInvulnerability",1);
  70.     GiveInventory ("ClassID", CLASS_ENGINEER);
  71.    
  72.     ACS_ExecuteAlways (961, 0, Team);
  73.     PlayerSpeeds[PlayerNumber()] = speed;
  74.     Log(n:0, s:" becomes Engineer.");
  75. }
  76.  
  77. //---------------------------MINIGUNNER
  78. script 22 (int Team) {
  79.     int cost = 400; int speed = 0.7;
  80.     if (MitigateDoublePress()) terminate;
  81.     if (!IsResigned()) terminate;
  82.     if (!IsSecondPress("CLSS03", cost)) terminate;
  83.     if (!CheckCredits(cost)) terminate;
  84.    
  85.     TakeInventory("PurchaseToken",1);
  86.     SpendCredits(Credits[PlayerNumber()+1], cost);
  87.     DisplayTick();
  88.     SETFONT("BigFont");
  89.     HudMessage(s:"You are a \cfMinigunner!"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  90.     SetFont ("SMALLFONT");
  91.     HudMessage(s:"Use \cfAlt-Fire\cd for \cjAnti-Mech attack\cd!";
  92.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 3.0, 1.0);
  93.    
  94.     //Set Statistics
  95.     SetActorProperty(0,APROP_SPEED,speed);
  96.     GiveInventory("HasClass",1);
  97.     GiveInventory("Refunds", cost/2);
  98.     SetArmorGrade (1, ARMOD_NOCHANGE);
  99.     GiveInventory("NewClipAmmo",90);
  100.     GiveInventory("Handgun",1);
  101.     GiveInventory("SubMachineGun",1);
  102.     GiveInventory("TimedC4",1);
  103.     GiveInventory("TimedC4Count",1);
  104.     SetFragGrenades (2);
  105.     GiveInventory("GatlingGun",1);
  106.     GiveInventory("MachineGunAmmo",400);
  107.     SetWeapon("GatlingGun");
  108.     ACS_ExecuteAlways(91, 0);
  109.    
  110.     GiveInventory("SpawnInvulnerability",1);
  111.     GiveInventory ("ClassID", CLASS_MINIGUNNER);
  112.    
  113.     ACS_ExecuteAlways (961, 0, Team);
  114.     PlayerSpeeds[PlayerNumber()] = speed;
  115.     Log(n:0, s:" becomes minigunner.");
  116. }
  117.  
  118. //---------------------------TECHNICIAN
  119. script 23 (int Team) {
  120.     int cost = 200; int speed = 0.8;
  121.     if (MitigateDoublePress()) terminate;
  122.     if (!IsResigned()) terminate;
  123.     if (!IsSecondPress("CLSS04", cost)) terminate;
  124.     if (!CheckCredits(cost)) terminate;
  125.  
  126.     TakeInventory("PurchaseToken",1);
  127.     SpendCredits(Credits[PlayerNumber()+1], cost);
  128.     DisplayTick();
  129.     SETFONT("BigFont");
  130.     HudMessage(s:"You are a \cfTechnician!";
  131.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  132.    
  133.     //Set Statistics
  134.     SetActorProperty(0, APROP_SPEED, 0.8);
  135.     SetArmorGrade (1, ARMOD_NOCHANGE);
  136.     GiveInventory("HasClass",1);
  137.     GiveInventory("Refunds",cost/2);
  138.     GiveInventory("NewClipAmmo",90);
  139.     GiveInventory("Handgun",1);
  140.     GiveInventory("EnhancedTimedC4",1);
  141.     GiveInventory("TimedC4",2);
  142.     GiveInventory("TimedC4Count",2);
  143.     GiveInventory ("ProxyMine", 4);
  144.     GiveInventory ("ProxyMineCount", 4);
  145.     SetFragGrenades (2);
  146.     GiveInventory("SubMachineGun",1);
  147.     GiveInventory("RepairGunUpgrade",1);
  148.     GiveInventory("RepairGun",1);
  149.     SetWeapon("RepairGun");
  150.     ACS_ExecuteAlways(91, 0);
  151.    
  152.     GiveInventory("SpawnInvulnerability",1);
  153.     GiveInventory ("ClassID", CLASS_TECHNICIAN);
  154.     ACS_ExecuteAlways (961, 0, Team);
  155.     PlayerSpeeds[PlayerNumber()] = speed;
  156.     Log(n:0, s:" becomes Technician.");
  157. }
  158.  
  159. //---------------------------FLAMER
  160. script 24 (int Team) {
  161.     int cost = 450; int speed = 0.7;
  162.     if (MitigateDoublePress()) terminate;
  163.     if (!CheckBarracks(Team)) terminate;
  164.     if (!IsResigned()) terminate;
  165.     if (!IsSecondPress("CLSS05", cost)) terminate;
  166.     if (!CheckCredits(cost)) terminate;
  167.  
  168.     TakeInventory("PurchaseToken",1);
  169.     SpendCredits(Credits[PlayerNumber()+1], 450);
  170.     DisplayTick();
  171.     SETFONT("BigFont");
  172.     HudMessage(s:"You are a \cfFlamethrower!";
  173.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  174.    
  175.     //Set Statistics
  176.     SetActorProperty(0,APROP_SPEED,speed);
  177.     SetArmorGrade (1, ARMOD_FIRE);
  178.     GiveInventory("HasClass",1);
  179.     GiveInventory("Refunds", cost/2);
  180.     GiveInventory("NewClipAmmo",120);
  181.     GiveInventory("Handgun",1);
  182.     GiveInventory("TimedC4",1);
  183.     GiveInventory("TimedC4Count",1);
  184.     SetFragGrenades (2);
  185.     GiveInventory("Flamer",1);
  186.     GiveInventory("FlamerAmmo",400);
  187.     GiveInventory("PhosphorusGrenadeAmmo",4);
  188.     SetWeapon("Flamer");
  189.     ACS_ExecuteAlways(91, 0);
  190.    
  191.     GiveInventory("SpawnInvulnerability",1);
  192.     GiveInventory ("ClassID", CLASS_FLAMER);
  193.                
  194.     ACS_ExecuteAlways (961, 0, Team);
  195.     PlayerSpeeds[PlayerNumber()] = speed;
  196.     Log(n:0, s:" becomes Flamethrower.");
  197. }
  198.  
  199. //---------------------------RIFLEMAN
  200. script 25 (int Team) {
  201.     int cost = 200; int speed = 0.9;
  202.     if (MitigateDoublePress()) terminate;
  203.     if (!IsResigned()) terminate;
  204.     if (!IsSecondPress("CLSS06", cost)) terminate;
  205.     if (!CheckCredits(cost)) terminate;
  206.    
  207.     TakeInventory("PurchaseToken",1);
  208.     SpendCredits(Credits[PlayerNumber()+1], cost);
  209.     DisplayTick();
  210.     SETFONT("BigFont");
  211.     HudMessage(s:"You are a \cfRifleman!";
  212.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  213.    
  214.     //Set Statistics
  215.     SetActorProperty(0,APROP_SPEED,speed);
  216.     SetArmorGrade (1, ARMOD_NOCHANGE);
  217.     GiveInventory("HasClass",1);
  218.     GiveInventory("Refunds",cost/2);
  219.     GiveInventory("NewClipAmmo", 90);
  220.     GiveInventory("Handgun", 1);
  221.     GiveInventory("TimedC4", 1);
  222.     GiveInventory("TimedC4Count", 1);
  223.     GiveInventory("FragGrenade", 1);
  224.     GiveInventory("FragGrenadeAmmo", 1);
  225.     ACS_ExecuteAlways(91, 0);
  226.     GiveInventory("Rifle", 1);
  227.     GiveInventory("RifleAmmo", 30);
  228.     GiveInventory("RifleGrenadeAmmo", 4);
  229.     SetWeapon("Rifle");
  230.    
  231.     GiveInventory("SpawnInvulnerability",1);
  232.     GiveInventory ("ClassID", CLASS_RIFLEMAN);
  233.    
  234.     ACS_ExecuteAlways (961, 0, Team);
  235.     PlayerSpeeds[PlayerNumber()] = speed;
  236.     Log(n:0, s:" becomes Rifleman.");
  237. }
  238.  
  239. //---------------------------SUPPORT / MACHINE GUNNER
  240. script 26 (int Team) {
  241.     int cost = 300; int speed = 0.9;
  242.     if (MitigateDoublePress()) terminate;
  243.     if (!IsResigned()) terminate;
  244.     if (!IsSecondPress("CLSS07", cost)) terminate;
  245.     if (!CheckCredits(cost)) terminate;
  246.  
  247.     TakeInventory("PurchaseToken",1);
  248.     SpendCredits(Credits[PlayerNumber()+1], cost);
  249.     DisplayTick();
  250.     SETFONT("BigFont");
  251.     HudMessage(s:"You are \cfMachine Gunner!";
  252.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  253.    
  254.     //Set Statistics
  255.     SetActorProperty(0,APROP_SPEED,speed);
  256.     SetArmorGrade (1, ARMOD_NOCHANGE);
  257.     GiveInventory("HasClass", 1);
  258.     GiveInventory("Refunds", cost/2);
  259.     GiveInventory("NewClipAmmo", 90);
  260.     GiveInventory("Handgun", 1);
  261.     GiveInventory("SubMachineGun", 1);
  262.     GiveInventory("TimedC4", 1);
  263.     GiveInventory("TimedC4Count", 1);
  264.     GiveInventory("MachineGunAmmo", 160);
  265.     GiveInventory("FragGrenade", 1);
  266.     SetAmmoCapacity("FragGrenadeAmmo", 2);
  267.     GiveInventory("FragGrenadeAmmo", 2);
  268.     ACS_ExecuteAlways(91, 0);
  269.     GiveInventory("MachineGun", 1);
  270.     SetWeapon("MachineGun");
  271.    
  272.     GiveInventory("SpawnInvulnerability", 1);
  273.     GiveInventory ("ClassID", CLASS_MACHINEGUNNER);
  274.    
  275.     ACS_ExecuteAlways (961, 0, Team);
  276.     PlayerSpeeds[PlayerNumber()] = speed;
  277.     Log(n:0, s:" becomes machine gunner.");
  278. }
  279.  
  280. //---------------------------GRENADIER
  281. script 27 (int Team) {
  282.     int cost = 550; int speed = 0.8;
  283.     if (MitigateDoublePress()) terminate;
  284.     if (!CheckBarracks(Team)) terminate;
  285.     if (!IsResigned()) terminate;
  286.     if (!IsSecondPress("CLSS08", cost)) terminate;
  287.     if (!CheckCredits(cost)) terminate;
  288.  
  289.     TakeInventory("PurchaseToken",1);
  290.     SpendCredits(Credits[PlayerNumber()+1], cost);
  291.     DisplayTick();
  292.     SETFONT("BigFont");
  293.     HudMessage(s:"You are a \cfGrenadier!";
  294.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);   
  295.    
  296.     //Set Statistics
  297.     SetActorProperty(0,APROP_SPEED,speed);
  298.     SetArmorGrade (2, ARMOD_EXPLO);
  299.     GiveInventory("HasClass",1);
  300.     GiveInventory("Refunds", cost/2);
  301.     GiveInventory("Handgun",1);
  302.     GiveInventory("NewClipAmmo",60);
  303.     GiveInventory("TimedC4",1);
  304.     GiveInventory("TimedC4Count",1);
  305.     GiveInventory("Rifle",1);
  306.     GiveInventory("RifleAmmo",20);
  307.     GiveInventory("RifleGrenadeAmmo",2);
  308.     SetFragGrenades (4);
  309.    
  310.     GiveInventory("Grenade_Launcher",1);
  311.     GiveInventory("GrenadeAmmo",40);
  312.     SetWeapon("Grenade_Launcher");
  313.    
  314.     ACS_ExecuteAlways(91,0);
  315.        
  316.     GiveInventory("SpawnInvulnerability",1);
  317.     GiveInventory ("ClassID", CLASS_GRENADIER);
  318.    
  319.     ACS_ExecuteAlways (961, 0, Team);
  320.     PlayerSpeeds[PlayerNumber()] = speed;
  321.     Log(n:0, s:" becomes Grenadier.");
  322. }
  323.  
  324. //---------------------------ROCKET SOLDIER
  325. script 28 (int Team) {
  326.     int cost = 500; int speed = 0.75;
  327.     if (MitigateDoublePress()) terminate;
  328.     if (!CheckBarracks(Team)) terminate;
  329.     if (!IsResigned()) terminate;
  330.     if (!IsSecondPress("CLSS09", cost)) terminate;
  331.     if (!CheckCredits(cost)) terminate;
  332.  
  333.     TakeInventory("PurchaseToken",1);
  334.     SpendCredits(Credits[PlayerNumber()+1], cost);
  335.     DisplayTick();
  336.     SETFONT("BigFont");
  337.     HudMessage(s:"You are a \cfRocket Soldier!";
  338.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  339.    
  340.     //Set Statistics
  341.     SetActorProperty(0,APROP_SPEED,speed);
  342.     SetArmorGrade (2, ARMOD_EXPLO);
  343.     GiveInventory("HasClass",1);
  344.     GiveInventory("Refunds", cost/2);
  345.     GiveInventory("HighUpgrade",1);
  346.     GiveInventory("NewClipAmmo",60);
  347.     GiveInventory("Handgun",1);
  348.     GiveInventory("EnhancedTimedC4",1);
  349.     GiveInventory("TimedC4",1);
  350.     GiveInventory("TimedC4Count",1);
  351.     GiveInventory("Rifle",1);
  352.     GiveInventory("RifleAmmo",20);
  353.     GiveInventory("RifleGrenadeAmmo",2);
  354.     GiveInventory("MissileAmmo",30);
  355.     SetFragGrenades (2);
  356.     GiveInventory("MissileLauncher",1);
  357.     SetWeapon("MissileLauncher");
  358.    
  359.     ACS_ExecuteAlways(91, 0);
  360.    
  361.     GiveInventory("SpawnInvulnerability",1);
  362.     GiveInventory ("ClassID", CLASS_ROCKETEER);
  363.     PlayerSpeeds[PlayerNumber()] = speed;
  364.     Log(n:0, s:" becomes Rocket Soldier.");
  365.    
  366.     ACS_ExecuteAlways (961, 0, Team);
  367. }
  368.  
  369. //---------------------------STEALTH TROOPER
  370. script 29 (int Team) {
  371.     int cost = 600; int speed = 0.95;
  372.     if (MitigateDoublePress()) terminate;
  373.     if (!IsResigned()) terminate;
  374.     if (!IsSecondPress("CLSS10", cost)) terminate;
  375.     if (!CheckCredits(cost)) terminate;
  376.  
  377.     TakeInventory("PurchaseToken",1);
  378.     SpendCredits(Credits[PlayerNumber()+1], cost);
  379.     DisplayTick();
  380.     SETFONT("BigFont");
  381.     HudMessage(s:"You are a \cfStealth Trooper!";
  382.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  383.     HudMessage(s:"Use Alt-Fire to toggle \ccStealth.";
  384.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  385.    
  386.     //Set Statistics
  387.     SetArmorGrade (-1, ARMOD_NOCHANGE);
  388.     GiveInventory("HasClass",1);
  389.     GiveInventory("Refunds", cost/2);
  390.     SetActorProperty(0,APROP_SPEED,speed);
  391.     SetActorProperty(0,APROP_DeathSound,"stealth/death");
  392.     GiveInventory("NewClipAmmo",60);
  393.     GiveInventory("Handgun",1);
  394.     GiveInventory("TimedC4",1);
  395.     GiveInventory("TimedC4Count",1);
  396.     GiveInventory("LaserRifleAmmo",200);
  397.     GiveInventory("FragGrenade",1);
  398.     GiveInventory("FragGrenadeAmmo",1);
  399.     GiveInventory("StealthLaserRifle",1);
  400.     GiveInventory("Knife",1);
  401.     ACS_ExecuteAlways(91, 0);
  402.    
  403.     GiveInventory("SpawnInvulnerability",1);
  404.     GiveInventory ("ClassID", CLASS_STEALTH);
  405.                
  406.     ACS_ExecuteAlways (961, 0, Team);
  407.    
  408.     // [Dusk] workaround for stealth knife sound..
  409.     delay (1);
  410.     SetWeapon("StealthLaserRifle");
  411.    
  412.     PlayerSpeeds[PlayerNumber()] = speed;
  413.     Log(n:0, s:" becomes stealth trooper.");
  414.    
  415.     Delay(35*6);
  416.     ActivatorSound("misc/stealth",255);
  417. }
  418.  
  419. //---------------------------GAUSS GUNNER
  420. script 33 (int Team) {
  421.     int cost = 600; int speed = 0.8;
  422.     if (MitigateDoublePress()) terminate;
  423.     if (!CheckBarracks(Team)) terminate;
  424.     if (!IsResigned()) terminate;
  425.     if (!IsSecondPress("CLSS11", cost)) terminate;
  426.     if (!CheckCredits(cost)) terminate;
  427.    
  428.     TakeInventory("PurchaseToken",1);
  429.     SpendCredits(Credits[PlayerNumber()+1], cost);
  430.     DisplayTick();
  431.     SETFONT("BigFont");
  432.     HudMessage(s:"You are a \cfGauss Gunner!";
  433.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  434.     SetFont ("SMALLFONT");
  435.     HudMessage(s:"Use \cfAlt-Fire\cd for \cjAnti-Mech attack\cd!";
  436.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 3.0, 1.0);
  437.    
  438.     //Set Statistics
  439.     SetActorProperty(0,APROP_SPEED,speed);
  440.     SetArmorGrade (2, ARMOD_LASER);
  441.     GiveInventory("HasClass", 1);
  442.     GiveInventory("Refunds", cost/2);
  443.     GiveInventory("NewClipAmmo",60);
  444.     GiveInventory("Handgun",1);
  445.     GiveInventory("TimedC4",1);
  446.     GiveInventory("TimedC4Count",1);
  447.     GiveInventory("Rifle",1);
  448.     GiveInventory("RifleAmmo",40);
  449.     GiveInventory("RifleGrenadeAmmo",0);
  450.     GiveInventory("GaussRifleAmmo",50);
  451.     GiveInventory("FragGrenade",1);
  452.     SetAmmoCapacity("FragGrenadeAmmo",2);
  453.     GiveInventory("FragGrenadeAmmo",2);
  454.     GiveInventory("GaussRifle",1);
  455.     SetWeapon("GaussRifle");
  456.  
  457.     ACS_ExecuteAlways(91, 0);
  458.    
  459.     GiveInventory("SpawnInvulnerability",1);
  460.     GiveInventory ("ClassID", CLASS_GAUSSGUNNER);
  461.        
  462.     ACS_ExecuteAlways (961, 0, Team);
  463.    
  464.     PlayerSpeeds[PlayerNumber()] = speed;
  465.     Log(n:0, s:" becomes gauss gunner.");
  466. }
  467.  
  468. //---------------------------CHEM WARRIOR
  469. script 34 (int Team) {
  470.     int cost = 550; int speed = 0.7;
  471.     if (MitigateDoublePress()) terminate;
  472.     if (!CheckBarracks(Team)) terminate;
  473.     if (!IsResigned()) terminate;
  474.     if (!IsSecondPress("CLSS12", cost)) terminate;
  475.     if (!CheckCredits(cost)) terminate;
  476.  
  477.     GiveInventory("HasClass",1);
  478.     GiveInventory("Refunds",275);
  479.     TakeInventory("PurchaseToken",1);
  480.     SpendCredits(Credits[PlayerNumber()+1], cost);
  481.     DisplayTick();
  482.     SETFONT("BigFont");
  483.     HudMessage(s:"You are a \cfChem Warrior!";
  484.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  485.    
  486.     //Set Statistics
  487.     SetActorProperty(0,APROP_SPEED,speed);
  488.     SetArmorGrade (2, ARMOD_CHEM);
  489.     GiveInventory("NewClipAmmo",90);
  490.     GiveInventory("Handgun",1);
  491.     GiveInventory("TimedC4",1);
  492.     GiveInventory("TimedC4Count",1);
  493.     GiveInventory("SubMachineGun",1);
  494.     GiveInventory("ChemicalAmmo",200);
  495.     GiveInventory("ChemicalGrenadeAmmo",4);
  496.     GiveInventory("FragGrenade",1);
  497.     SetAmmoCapacity("FragGrenadeAmmo",2);
  498.     GiveInventory("FragGrenadeAmmo",2);
  499.     ACS_ExecuteAlways (91,0);
  500.     GiveInventory("ChemicalSprayer",1);
  501.     SetWeapon("ChemicalSprayer");
  502.    
  503.     GiveInventory("SpawnInvulnerability",1);
  504.     GiveInventory ("ClassID", CLASS_CHEMWARRIOR);
  505.    
  506.     ACS_ExecuteAlways (961, 0, Team);
  507.     PlayerSpeeds[PlayerNumber()] = speed;
  508.     Log(n:0, s:" becomes Chem warrior.");
  509.     Delay(35*6);
  510.     ActivatorSound("misc/chem",255);
  511. }
  512.  
  513. //---------------------------SHOCK TROOPER
  514. script 35 (int Team) {
  515.     int cost = 600; int speed = 0.7;
  516.     if (MitigateDoublePress()) terminate;
  517.     if (!CheckBarracks(Team)) terminate;
  518.     if (!CheckPlant(Team)) terminate;
  519.     if (!IsResigned()) terminate;
  520.     if (!IsSecondPress("CLSS13", cost)) terminate;
  521.     if (!CheckCredits(cost)) terminate;
  522.  
  523.     GiveInventory("HasClass",1);
  524.     GiveInventory("Refunds",300);
  525.     TakeInventory("PurchaseToken",1);
  526.     SpendCredits(Credits[PlayerNumber()+1], cost);
  527.    
  528.     DisplayTick();
  529.     SETFONT("BigFont");
  530.     HudMessage(s:"You are a \cfShock Trooper!";
  531.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  532.    
  533.     //Set Statistics
  534.     SetActorProperty(0,APROP_SPEED,speed);
  535.     SetArmorGrade (2, ARMOD_LASER);
  536.     GiveInventory("NewClipAmmo",60);
  537.     GiveInventory("Handgun",1);
  538.     GiveInventory("SubMachineGun",1);
  539.     GiveInventory("TimedC4",1);
  540.     GiveInventory("TimedC4Count",1);
  541.     GiveInventory("FragGrenade",1);
  542.     SetAmmoCapacity("FragGrenadeAmmo",2);
  543.     GiveInventory("FragGrenadeAmmo",2);
  544.     GiveInventory("ShockRifle",1);
  545.     GiveInventory("GeneporiumCharge",400);
  546.     SetWeapon("ShockRifle");
  547.     //Check for RANK to give awards
  548.     ACS_ExecuteAlways(91, 0);
  549.    
  550.     GiveInventory("SpawnInvulnerability",1);
  551.     GiveInventory ("ClassID", CLASS_SHOCKTROOPER);
  552.    
  553.     ACS_ExecuteAlways (961, 0, Team);
  554.     PlayerSpeeds[PlayerNumber()] = speed;
  555.     Log(n:0, s:" becomes Shock Trooper.");
  556.     Delay(35*6);
  557.     ActivatorSound("misc/volt", 255);
  558. }
  559.  
  560. //---------------------------COMMANDO
  561. script 36 (int Team) {
  562.     int cost = 1000; int speed = 0.85;
  563.     if (MitigateDoublePress()) terminate;
  564.     if (!CheckBarracks(Team)) terminate;
  565.     if (!CheckPlant(Team)) terminate;
  566.     if (!IsResigned()) terminate;
  567.     if (!IsSecondPress("CLSS14", cost)) terminate;
  568.     if (!CheckCredits(cost)) terminate;
  569.    
  570.     TakeInventory("PurchaseToken",1);
  571.     SpendCredits(Credits[PlayerNumber()+1], cost);
  572.    
  573.     DisplayTick();
  574.     SETFONT("BigFont");
  575.     HudMessage(s:"You are the \cfCommando!";
  576.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  577.    
  578.     SETFONT ("SMALLFONT");
  579.     if(Team == 0)
  580.         HudMessageBold (s:"\cGWarning: \cARed\cJ Commando in-field!";
  581.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  582.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  583.     else
  584.         HudMessageBold (s:"\cGWarning: \cNBlue\cJ Commando in-field!";
  585.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  586.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  587.    
  588.     //Set Statistics
  589.     SetActorProperty(0,APROP_SPEED,speed);
  590.     GiveInventory("HasClass",1);
  591.    
  592.     CheckAndRemove ("HasArmorUpgrade");
  593.     GiveInventory ("HighUpgrade", 1);
  594.     GiveInventory("IsCommando",1);
  595.     GiveInventory("Refunds",cost/2);
  596.     SetArmorGrade (2, ARMOD_NOCHANGE);
  597.     GiveInventory("NewClipAmmo",120);
  598.     GiveInventory("Handgun",1);
  599.     GiveInventory("EnhancedTimedC4",1);
  600.     GiveInventory("TimedC4", 2);
  601.     GiveInventory("TimedC4Count", 2);
  602.     GiveInventory("MissileLauncher",1);
  603.     GiveInventory("MissileAmmo",15);           
  604.     GiveInventory("GatlingGun",1);
  605.     GiveInventory("MachineGunAmmo",200);
  606.     GiveInventory("Rifle",1);
  607.     GiveInventory("RifleAmmo",20);         
  608.     GiveInventory("RifleGrenadeAmmo",4);
  609.     GiveInventory("GaussRifle",1);
  610.     GiveInventory("GaussRifleAmmo",15);
  611.     SetFragGrenades (4);
  612.     GiveInventory("SpawnInvulnerability",1);
  613.     GiveInventory ("ClassID", CLASS_COMMANDO);
  614.     ACS_ExecuteAlways(91,0,0,0,0);
  615.    
  616.     SetWeapon("GaussRifle");
  617.                
  618.     ACS_ExecuteAlways (961, 0, Team);
  619.    
  620.     PlayerSpeeds[PlayerNumber()] = speed;
  621.     Log(n:0, s:" becomes Commando.");
  622.     Delay(35*6);
  623.     ActivatorSound("misc/commando",255);
  624. }
  625.  
  626. //---------------------------PLASMA CANNON
  627. script 37 (int Team)
  628. {
  629.     int cost = 1500;
  630.     if (MitigateDoublePress()) terminate;
  631.     if (!CheckBarracks(Team)) terminate;
  632.     if (!CheckPlant(Team)) terminate;
  633.     if (!CheckPlasmaCooldown()) terminate;
  634.    
  635.     if(CheckInventory("PlasmaCannon")) {
  636.         DisplayCross();
  637.         SETFONT("BigFont");
  638.         HudMessage(s:"You already have a \cnPlasma Cannon\cr!";
  639.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  640.         terminate;
  641.     }
  642.    
  643.     if (NumPlasmaCannons[Team] >= MaxCannonsPerTeam && MaxCannonsPerTeam != -1) {
  644.         DisplayCross();
  645.         SETFONT("BigFont");
  646.         HudMessage(s:"Your team already has too many of those!";
  647.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  648.         terminate;
  649.     }
  650.    
  651.     if (Timer() < CannonPurchaseDelay) {
  652.         DisplayCross();
  653.         SETFONT("BigFont");
  654.         //int mins = (CannonPurchaseDelay - Timer())/(35*60);
  655.         //int secs = 59 - (Timer()/35)%60;
  656.  
  657.         HudMessage(s:"You must wait \cF", d:(CannonPurchaseDelay - Timer()) / 60,
  658.             s:" seconds\nbefore you can get one of these!";
  659.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);      
  660.         terminate;
  661.     }
  662.    
  663.     if (!IsSecondPress("WEAP01", cost)) terminate;
  664.     if (!CheckCredits(cost)) terminate;
  665.    
  666.     TakeInventory("PurchaseToken",1);
  667.     SpendCredits(Credits[PlayerNumber()+1], cost);
  668.     LastPurchasedCannon[PlayerNumber()+1] = Timer();
  669.     NumPlasmaCannons[Team]++;
  670.    
  671.     DisplayTick();
  672.     SetFont ("BIGFONT");
  673.     HudMessage(s:"You got \cnPlasma Cannon!"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  674.    
  675.     SetFont ("SMALLFONT");
  676.     if(Team == 0)
  677.         HudMessageBold (s:"\cGWarning: \cARed\cJ player has \cNPlasma Cannon!";
  678.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  679.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  680.     else
  681.         HudMessageBold (s:"\cGWarning: \cNBlue\cJ player has \cNPlasma Cannon!";
  682.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  683.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  684.    
  685.     GiveInventory("PlasmaCannon",1);
  686.     GiveInventory("PlasmaCannonAmmo",10);
  687.     SetWeapon("PlasmaCannon");
  688.     Log(n:0, s:" purchases Plasma Cannon.");
  689.     RecountPlasma();
  690. }
  691.  
  692. //---------------------------SHOTGUNNER
  693. script 38 (int Team) {
  694.     int cost = 0; int speed = 0.8;
  695.     if (MitigateDoublePress()) terminate;
  696.     if (!IsResigned()) terminate;
  697.     if (!IsSecondPress("CLSS15", cost)) terminate;
  698.    
  699.     TakeInventory("PurchaseToken",1);
  700.     SpendCredits(Credits[PlayerNumber()+1], 0);
  701.     DisplayTick();
  702.     SETFONT("BigFont");
  703.     HudMessage(s:"You are a \cfshotgunner!";
  704.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  705.    
  706.     //Set Statistics
  707.     SetActorProperty(0,APROP_SPEED,speed);
  708.     GiveInventory("HasClass",1);
  709.     GiveInventory("NewClipAmmo",60);
  710.     GiveInventory("Handgun",1);
  711.     GiveInventory("TimedC4",1);
  712.     GiveInventory("TimedC4Count",1);
  713.     GiveInventory("ShotgunAmmo",50);
  714.     SetFragGrenades (1);
  715.     ACS_ExecuteAlways(91, 0);
  716.            
  717.     GiveInventory("Boomstick",1);
  718.     SetWeapon("Boomstick");
  719.    
  720.     GiveInventory("SpawnInvulnerability",1);
  721.     GiveInventory ("ClassID", CLASS_SHOTGUNNER);
  722.    
  723.     ACS_ExecuteAlways (961, 0, Team);
  724.     PlayerSpeeds[PlayerNumber()] = speed;
  725.     Log(n:0, s:" becomes Shotgunner.");
  726. }
  727.  
  728. //---------------------------SUICIDE BOMBER
  729. script 62 (int Team) {
  730.     int cost = 1750; int speed = 1.0;
  731.     if (MitigateDoublePress()) terminate;
  732.     if (!IsResigned()) terminate;
  733.     if (!IsSecondPress("CLSS16", cost)) terminate;
  734.     if (!CheckCredits(cost)) terminate;
  735.     TakeInventory("PurchaseToken", 1);
  736.     SpendCredits(Credits[PlayerNumber()+1], cost);
  737.    
  738.     DisplayTick();
  739.     SETFONT("BigFont");
  740.     HudMessage(s:"You are a \cFSuicide Bomber!";
  741.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  742.     HudMessage(s:"Use the switch to explode violently.";
  743.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  744.    
  745.     SetFont ("SMALLFONT");
  746.     if(Team == 0)
  747.         HudMessageBold (s:"\cGWarning: \cARed\cJ Suicide Bomber in-field!";
  748.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  749.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  750.     else
  751.         HudMessageBold (s:"\cGWarning: \cNBlue\cJ Suicide Bomber in-field!";
  752.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  753.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  754.    
  755.     //Set Statistics
  756.     SetActorProperty(0,APROP_SPEED,speed);
  757.     GiveInventory("HasClass", 1);
  758.     GiveInventory("HighUpgrade", 1);
  759.     GiveInventory("Refunds",cost/2);
  760.     GiveInventory("BombPack",1);
  761.     SetWeapon("BombPack");
  762.     ACS_ExecuteAlways(91, 0);
  763.    
  764.     GiveInventory("SpawnInvulnerability",1);
  765.     GiveInventory ("ClassID", CLASS_SUICIDEBOMBER);
  766.                
  767.     ACS_ExecuteAlways (961, 0, Team);
  768.     PlayerSpeeds[PlayerNumber()] = speed;
  769.     Log(n:0, s:" goes nuts and becomes Suicide Bomber.");
  770.     // [Dusk] after two seconds, call SetWeapon() again. Lagged users with Commando
  771.     // rank may not be able to get it on the first SetWeapon().
  772.     delay(35*2);
  773.     SetWeapon("BombPack");
  774.    
  775.     delay(35*4);
  776.     ActivatorSound("misc/commando",255);
  777. }
  778.  
  779. //---------------------------SNIPER
  780. script 40 (int Team) {
  781.     int cost = 750; int speed = 0.675;
  782.     if (MitigateDoublePress()) terminate;
  783.     if (!CheckBarracks(Team)) terminate;
  784.     if (!CheckPlant(Team)) terminate;
  785.     if (!IsResigned()) terminate;
  786.     if (!IsSecondPress("CLSS17", cost)) terminate;
  787.     if (!CheckCredits(cost)) terminate;
  788.    
  789.     TakeInventory("PurchaseToken", 1);
  790.     SpendCredits(Credits[PlayerNumber()+1], 750);
  791.     DisplayTick();
  792.     SETFONT("BigFont");
  793.     HudMessage(s:"You are a \cfSniper!";
  794.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  795.    
  796.     //Set Statistics
  797.     SetActorProperty(0,APROP_SPEED,speed);
  798.     SetArmorGrade (1, ARMOD_NOCHANGE);
  799.     GiveInventory("HasClass", 1);
  800.     GiveInventory("IsSniper", 500);
  801.     GiveInventory("Refunds", cost/2);
  802.     GiveInventory("NewClipAmmo",60);
  803.     GiveInventory("Handgun",1);
  804.     GiveInventory("TimedC4",1);
  805.     GiveInventory("TimedC4Count",1);
  806.     GiveInventory("SniperAmmo",50);
  807.     SetFragGrenades (2);
  808.    
  809.     //Check for RANK to give awards
  810.     ACS_ExecuteAlways(91,0,0,0,0);
  811.    
  812.     GiveInventory("SniperRifle",1);
  813.     SetWeapon("SniperRifle");
  814.    
  815.     GiveInventory("SpawnInvulnerability",1);
  816.     GiveInventory ("ClassID", CLASS_SNIPER);
  817.                
  818.     ACS_ExecuteAlways (961, 0, Team);
  819.     PlayerSpeeds[PlayerNumber()] = speed;
  820.     Log(n:0, s:" becomes Sniper.");
  821.    
  822.     Delay(35*6);
  823.     ActivatorSound("misc/sniper",255); 
  824. }
  825.  
  826. //---------------------------UTILITY GUY
  827. script 41 (int Team) {
  828.     int cost = 650; int speed = 0.75;
  829.     if (MitigateDoublePress()) terminate;
  830.     if (!IsResigned()) terminate;
  831.     if (!IsSecondPress("CLSS18", cost)) terminate;
  832.     if (!CheckCredits(cost)) terminate;
  833.  
  834.     TakeInventory("PurchaseToken", 1);
  835.     SpendCredits(Credits[PlayerNumber()+1], cost);
  836.  
  837.     DisplayTick();
  838.     SETFONT("BigFont");
  839.     HudMessage(s:"You are an \cfUtility Guy!";
  840.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  841.     HudMessage(s:"Use \cFAlt-Fire\cD for \cNitem selection menu!";
  842.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  843.    
  844.     //Set Statistics
  845.     SetActorProperty(0,APROP_SPEED,speed);
  846.     SetArmorGrade (2, ARMOD_NOCHANGE);
  847.     GiveInventory("HasClass", 1);
  848.     GiveInventory("Refunds", cost/2);
  849.     GiveInventory("HighUpgrade",1);
  850.     GiveInventory("NewClipAmmo",60);
  851.     GiveInventory("Handgun",1);
  852.     GiveInventory("EnhancedTimedC4",1);
  853.     GiveInventory("TimedC4",1);
  854.     GiveInventory("TimedC4Count",1);
  855.     GiveInventory("RepairGun",1);
  856.     SetFragGrenades (2);
  857.     GiveInventory("UtilityGun", 1);
  858.     GiveInventory("Utility_Ammo", 75);
  859.    
  860.     //Check for RANK to give awards
  861.     ACS_ExecuteAlways(91, 0);
  862.    
  863.     GiveInventory("SpawnInvulnerability",1);
  864.     GiveInventory ("ClassID", CLASS_UTILITYGUY);
  865.                
  866.     ACS_ExecuteAlways (961, 0, Team);
  867.     PlayerSpeeds[PlayerNumber()] = speed;
  868.     Log(n:0, s:" becomes Utility Guy.");
  869.    
  870.     delay (35);
  871.     SetWeapon("UtilityGun");
  872. }
  873.  
  874. //---------------------------DEMO EXPERT
  875. script 42 (int Team) {
  876.     int cost = 550; int speed = 0.75;
  877.     if (MitigateDoublePress()) terminate;
  878.     if (!IsResigned()) terminate;
  879.     if (!IsSecondPress("CLSS19", cost)) terminate;
  880.     if (!CheckCredits(cost)) terminate;
  881.    
  882.     TakeInventory("PurchaseToken", 1);
  883.     SpendCredits(Credits[PlayerNumber()+1], cost);
  884.     DisplayTick();
  885.     SETFONT("BigFont");
  886.     HudMessage(s:"You are a \cfDemolitions Expert!";
  887.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  888.    
  889.     //Set Statistics
  890.     SetArmorGrade (2, ARMOD_EXPLO);
  891.     SetActorProperty(0,APROP_SPEED,speed);
  892.     GiveInventory("HighUpgrade",1);
  893.     GiveInventory("NewClipAmmo",60);
  894.     GiveInventory("Handgun",1);
  895.     GiveInventory("HasClass", 1);
  896.     GiveInventory("Refunds", 275);
  897.     GiveInventory ("EnhancedTimedC4", 1);
  898.     GiveInventory ("TimedC4", 4);
  899.     GiveInventory ("TimedC4Count", 4);
  900.     GiveInventory ("ProxyMine", 6);
  901.     GiveInventory ("ProxyMineCount", 6);
  902.     GiveInventory ("RemoteC4", 1);
  903.     GiveInventory ("RemoteC4Ammo", 5);
  904.     GiveInventory("Boomstick",1);
  905.     GiveInventory("ShotgunAmmo",50);
  906.     SetFragGrenades (4);
  907.     GiveInventory("BombSquadGun",1);
  908.     SetWeapon("BombSquadGun");
  909.    
  910.     GiveInventory("SpawnInvulnerability",1);
  911.     GiveInventory ("ClassID", CLASS_DEMOEXPERT);
  912.  
  913.     //Check for RANK to give awards
  914.     ACS_ExecuteAlways(91, 0);
  915.    
  916.     ACS_ExecuteAlways (961, 0, Team);
  917.     PlayerSpeeds[PlayerNumber()] = speed;
  918.     Log(n:0, s:" becomes Demo Expert.");
  919. }
  920.  
  921. // FIELD MEDIC
  922. script 43 (int Team) {
  923.     int cost = 300; int speed = 0.85;
  924.    
  925.     if (MitigateDoublePress()) terminate;
  926.     if (!IsResigned()) terminate;
  927.     if (!IsSecondPress("CLSS20", cost)) terminate;
  928.     if (!CheckCredits(cost)) terminate;
  929.    
  930.     TakeInventory("PurchaseToken",1);
  931.     SpendCredits(Credits[PlayerNumber()+1], cost);
  932.    
  933.     DisplayTick();
  934.     SETFONT("BigFont");
  935.     HudMessage(s:"You are a \cfField Medic!";
  936.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  937.     HudMessage(s:"Your regeneration will be carried to mechs.";
  938.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  939.    
  940.     //Set Statistics
  941.     SetActorProperty(0,APROP_SPEED,speed);
  942.     SetArmorGrade (2, ARMOD_CHEM);
  943.     GiveInventory("HasClass",1);
  944.     GiveInventory ("ClassID", CLASS_MEDIC);
  945.     GiveInventory("Refunds", cost/2);
  946.     GiveInventory("IsMedic",1);
  947.     GiveInventory("NewClipAmmo",60);
  948.     GiveInventory("Handgun",1);
  949.     GiveInventory ("HealingRadiusItem", 1);
  950.     GiveInventory ("HealingRadiusCount", 1);
  951.     GiveInventory("TimedC4",1);
  952.     GiveInventory("TimedC4Count",1);
  953.     GiveInventory("Boomstick",1);
  954.     GiveInventory("ShotgunAmmo",50);
  955.     SetFragGrenades (2);
  956.     ACS_ExecuteAlways(91, 0);
  957.     GiveInventory("HealGun",1);
  958.     SetWeapon("HealGun");
  959.     GiveInventory("SpawnInvulnerability",1);
  960.     // Medic regeneration
  961.     ACS_ExecuteAlways(352, 0);
  962.    
  963.     ACS_ExecuteAlways (961, 0, Team);
  964.     PlayerSpeeds[PlayerNumber()] = speed;
  965.     Log(n:0, s:" becomes Medic.");
  966. }
  967.  
  968. //---------------------------LASER CHAINGUNNER
  969. script 44 (int Team) {
  970.     int cost = 650; int speed = 0.75;
  971.     if (MitigateDoublePress()) terminate;
  972.     if (!CheckBarracks(Team)) terminate;
  973.     if (!CheckPlant(Team)) terminate;
  974.     if (!IsResigned()) terminate;
  975.     if (!IsSecondPress("CLSS21", cost)) terminate;
  976.     if (!CheckCredits(cost)) terminate;
  977.  
  978.     TakeInventory("PurchaseToken",1);
  979.     SpendCredits(Credits[PlayerNumber()+1], cost);
  980.     DisplayTick();
  981.     SETFONT("BigFont");
  982.     HudMessage(s:"You are a \cfLaser Chaingunner!";
  983.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  984.    
  985.     //Set Statistics
  986.     SetActorProperty(0,APROP_SPEED,speed);
  987.     SetArmorGrade (2, ARMOD_LASER);
  988.     GiveInventory("HasClass",1);
  989.     GiveInventory("Refunds",cost/2);
  990.     GiveInventory("HighUpgrade",1);
  991.     GiveInventory("NewClipAmmo",60);
  992.     GiveInventory("Handgun",1);
  993.     GiveInventory("TimedC4",1);
  994.     GiveInventory("TimedC4Count",1);
  995.     SetFragGrenades (2);
  996.     GiveInventory("LaserChaingun",1);
  997.     GiveInventory("LaserChaingunAmmo",400);
  998.     SetWeapon("LaserChaingun");
  999.     ACS_ExecuteAlways(91, 0);
  1000.    
  1001.     GiveInventory("SpawnInvulnerability",1);
  1002.     GiveInventory ("ClassID", CLASS_LASERCHAINGUNNER);
  1003.                
  1004.     ACS_ExecuteAlways (961, 0, Team);
  1005.     PlayerSpeeds[PlayerNumber()] = speed;
  1006.     Log(n:0, s:" becomes Laser Chaingunner.");
  1007. }
  1008.  
  1009. //---------------------------T-E 21cal RIFLE
  1010. script 49 (int Team)
  1011. {
  1012.     int cost = 300;
  1013.     if (MitigateDoublePress()) terminate;
  1014.  
  1015.     if (CheckInventory("TiberiumAutorifleWeak") || CheckInventory("TiberiumAutorifle")) {
  1016.         DisplayCross();
  1017.         SETFONT("BigFont");
  1018.         HudMessage(s:"You already have a \cdTiberium Autorifle!";
  1019.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1020.         terminate;
  1021.     }
  1022.    
  1023.     if (!IsSecondPress("WEAP02", cost)) terminate;
  1024.     if (!CheckCredits(cost)) terminate;
  1025.    
  1026.     TakeInventory("PurchaseToken",1);
  1027.     SpendCredits(Credits[PlayerNumber()+1], 300);
  1028.     DisplayTick();
  1029.    
  1030.     SETFONT("BigFont");
  1031.     HudMessage(s:"You got the \cqTiberium Autorifle!";
  1032.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1033.    
  1034.     // GiveInventory("Refunds", 100);
  1035.     GiveInventory("TiberiumAutorifleWeak", 1);
  1036.     GiveInventory("TE21CalAmmo", 200);
  1037.     SetWeapon("TiberiumAutorifleWeak");
  1038.     Log(n:0, s:" purchases Tiberium Autorifle.");
  1039. }
  1040.  
  1041. //---------------------------CHAINSAW (was flashbangs)
  1042. script 50 (int Team) {
  1043.     int cost = 250;
  1044.     if (MitigateDoublePress()) terminate;
  1045.     if (CheckInventory("EagerBeaver")) {
  1046.         DisplayCross ();
  1047.         SetFont ("BIGFONT");
  1048.         HudMessage (s:"You already have the \cfChainsaw!";
  1049.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1050.         terminate;
  1051.     }
  1052.    
  1053.     if (!IsSecondPress("WEAP03", cost)) terminate;
  1054.     if (!CheckCredits(cost)) terminate;
  1055.    
  1056.     TakeInventory ("PurchaseToken", 1);
  1057.     SpendCredits (Credits[PlayerNumber()+1], cost);
  1058.     DisplayTick ();
  1059.    
  1060.     SetFont ("BIGFONT");
  1061.     HudMessage(s:"You got the \cfChainsaw!";
  1062.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1063.     HudMessage(s:"Use Alt-Fire to throw the chainsaw!";
  1064.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  1065.    
  1066.     GiveInventory ("EagerBeaver", 1);
  1067.     SetWeapon ("EagerBeaver");
  1068.     Log (n:0, s:" purchases Chainsaw.");
  1069. }
  1070.  
  1071. // ARTILLERY CANNON
  1072. script 51 (int Team) {
  1073.     int cost = 550;
  1074.     if (MitigateDoublePress()) terminate;
  1075.     if(CheckInventory("ArtilleryCannon")) {
  1076.         DisplayCross();    
  1077.         SETFONT("BigFont");
  1078.         HudMessage(s:"You already have an \cKArtillery Cannon!";
  1079.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);      
  1080.         terminate;
  1081.     }
  1082.    
  1083.     if (!IsSecondPress("WEAP04", cost)) terminate;
  1084.     if (!CheckCredits(cost)) terminate;
  1085.     TakeInventory("PurchaseToken",1);
  1086.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1087.    
  1088.     DisplayTick();
  1089.     SETFONT("BigFont");
  1090.     HudMessage(s:"You got the \ckArtillery Cannon!";
  1091.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1092.     HudMessage(s:"Use Alt-Fire for \cFAnti-Mech shells!";
  1093.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  1094.    
  1095.     // GiveInventory("Refunds", 200);
  1096.     GiveInventory ("ArtilleryCannon", 1);
  1097.     GiveInventory ("ArtilleryShellAmmo", 40);
  1098.     SetWeapon ("ArtilleryCannon");
  1099.     Log(n:0, s:" purchases artillery cannon.");
  1100. }
  1101.  
  1102. //---------------------------JUMPJET
  1103. script 52 (int Team) {
  1104.     int cost = 600; int speed = 0.65;
  1105.     if (MitigateDoublePress()) terminate;
  1106.     if (!CheckBarracks(Team)) terminate;
  1107.     if (!IsResigned()) terminate;
  1108.     if (!IsSecondPress("CLSS23", cost)) terminate;
  1109.     if (!CheckCredits(cost)) terminate;
  1110.  
  1111.     GiveInventory("HasClass",1);
  1112.     GiveInventory("Refunds", cost/2);
  1113.     TakeInventory("PurchaseToken",1);
  1114.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1115.     DisplayTick();
  1116.    
  1117.     SETFONT("BigFont");
  1118.     HudMessage(s:"You are a \cfJumpJet Infantry!";
  1119.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1120.     HudMessage(s:"Use Alt-Fire to activate JumpJet";
  1121.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  1122.    
  1123.     //Set Statistics
  1124.     SetActorProperty(0,APROP_SPEED,speed);
  1125.     SetArmorGrade (2, ARMOD_NOCHANGE);
  1126.     GiveInventory("TimedC4",1);
  1127.     GiveInventory("TimedC4Count",1);
  1128.     GiveInventory("NewClipAmmo",90);
  1129.     GiveInventory("Handgun",1);
  1130.     SetFragGrenades (2);
  1131.     GiveInventory("MachineGunAmmo",400);
  1132.     GiveInventory("JumpJetFuel",100);
  1133.     GiveInventory("JumpJetGatlingGun",1);
  1134.     SetWeapon("JumpJetGatlingGun");
  1135.     ACS_ExecuteAlways(91, 0);
  1136.    
  1137.     GiveInventory("SpawnInvulnerability",1);
  1138.     GiveInventory ("ClassID", CLASS_JUMPJET);
  1139.    
  1140.     ACS_ExecuteAlways (961, 0, Team);
  1141.     PlayerSpeeds[PlayerNumber()] = speed;
  1142.     Log(n:0, s:" becomes jumpjet infantry.");
  1143. }
  1144.  
  1145. //---------------------------TIBERIUM AUTORIFLEMAN
  1146. script 53 (int Team) {
  1147.     int cost = 400; int speed = 0.8;
  1148.     if (MitigateDoublePress()) terminate;
  1149.     if (!CheckBarracks(Team)) terminate;
  1150.     if (!IsResigned()) terminate;
  1151.     if (!IsSecondPress("CLSS24", cost)) terminate;
  1152.     if (!CheckCredits(cost)) terminate;
  1153.  
  1154.     TakeInventory("PurchaseToken",1);
  1155.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1156.     DisplayTick();
  1157.     SETFONT("BigFont");
  1158.     HudMessage(s:"You are a \cfTiberium Autorifleman!";
  1159.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1160.    
  1161.     //Set Statistics
  1162.     SetActorProperty(0,APROP_SPEED,speed);
  1163.     SetArmorGrade (1, ARMOD_CHEM);
  1164.     GiveInventory("HasClass",1);
  1165.     GiveInventory("Refunds",cost/2);
  1166.     GiveInventory("NewClipAmmo",90);
  1167.     GiveInventory("Handgun",1);
  1168.     GiveInventory("TimedC4",1);
  1169.     GiveInventory("TimedC4Count",1);
  1170.     GiveInventory("TE21CalAmmo",200);
  1171.     SetFragGrenades (2);
  1172.     GiveInventory("TiberiumAutorifle",1);
  1173.     SetWeapon("TiberiumAutorifle");
  1174.     ACS_ExecuteAlways(91, 0);
  1175.    
  1176.     GiveInventory("SpawnInvulnerability",1);
  1177.     GiveInventory ("ClassID", CLASS_TIBRIFLE);
  1178.    
  1179.     ACS_ExecuteAlways (961, 0, Team);
  1180.     PlayerSpeeds[PlayerNumber()] = speed;
  1181.     Log(n:0, s:" becomes Tiberium autorifleman.");
  1182. }
  1183.  
  1184. //---------------------------DOUBLE SHOTGUNNER
  1185. script 54 (int Team) {
  1186.     int cost = 200; int speed = 0.8;
  1187.     if (MitigateDoublePress()) terminate;
  1188.     if (!IsResigned()) terminate;
  1189.     if (!IsSecondPress("CLSS25", cost)) terminate;
  1190.     if (!CheckCredits(cost)) terminate;
  1191.  
  1192.     TakeInventory("PurchaseToken",1);
  1193.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1194.     DisplayTick();
  1195.     SETFONT("BigFont");
  1196.     HudMessage(s:"You are a \cfSuper Shotgunner!"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1197.    
  1198.     //Set Statistics
  1199.     SetActorProperty(0,APROP_SPEED,speed);
  1200.     SetArmorGrade (1, ARMOD_NOCHANGE);
  1201.     GiveInventory("HasClass",1);
  1202.     GiveInventory("Refunds",cost/2);
  1203.     GiveInventory("NewClipAmmo",90);
  1204.     GiveInventory("Handgun",1);
  1205.     GiveInventory("ShotgunAmmo",50);
  1206.     GiveInventory("TimedC4",1);
  1207.     GiveInventory("TimedC4Count",1);
  1208.     SetFragGrenades (1);
  1209.     ACS_ExecuteAlways(91, 0);
  1210.     GiveInventory("DoubleShotgun",1);
  1211.     SetWeapon("DoubleShotgun");
  1212.    
  1213.     GiveInventory("SpawnInvulnerability",1);
  1214.     GiveInventory ("ClassID", CLASS_DOUBLESHOTGUNNER);
  1215.    
  1216.     ACS_ExecuteAlways (961, 0, Team);
  1217.     PlayerSpeeds[PlayerNumber()] = speed;
  1218.     Log(n:0, s:" becomes super shotgunner.");
  1219. }
  1220.  
  1221. //-------------------- BLUE TEAM SUPERWEAPON
  1222. //---------------------------ION CANNON BEACON
  1223. script 55 (int Team) {
  1224.     if (PlayerTeam() == TEAM_RED) {
  1225.         // [Dusk] this message should never be displayed in casual games
  1226.         DisplayCross();
  1227.         SETFONT("BigFont");
  1228.         HudMessage(s:"What the \cRfuck\c- are you doing here?";
  1229.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1230.         terminate;
  1231.     }
  1232.    
  1233.     int cost = 1750;
  1234.     if (MitigateDoublePress()) terminate;
  1235.  
  1236.     if(CheckInventory("IonCannonBeacon")) {
  1237.         DisplayCross();
  1238.         SETFONT("BigFont");
  1239.         HudMessage(s:"You already have the \cnIon Cannon Beacon\cr!";
  1240.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);      
  1241.         terminate;
  1242.     }
  1243.    
  1244.     BlueBeaconTime=BeaconPurchaseDelay-(Timer()-LastPurchasedBeacon[1])/35;
  1245.     if (BlueBeaconTime <= 0)
  1246.         BlueBeaconCooldown = false;
  1247.     else
  1248.         BlueBeaconCooldown = true;
  1249.    
  1250.     if(BlueBeaconCooldown) {
  1251.         int mins = BlueBeaconTime/60 - Timer()/(35*60);
  1252.         int secs = 59 - (Timer()/35)%60;
  1253.        
  1254.         DisplayCross();
  1255.         SETFONT("BigFont");
  1256.         HudMessage(s:"You must wait \cF", d:BlueBeaconTime, s:" seconds\nbefore you can get one of these!";
  1257.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);      
  1258.         terminate;
  1259.     }
  1260.    
  1261.     if (!IsSecondPress("WEAP05", cost)) terminate;
  1262.     if (!CheckCredits(cost)) terminate;
  1263.     LastPurchasedBeacon[1] = Timer();
  1264.     TakeInventory("PurchaseToken",1);
  1265.     SpendCredits(Credits[PlayerNumber()+1], 1750);
  1266.    
  1267.     DisplayTick();
  1268.     SETFONT("BigFont");
  1269.     HudMessage(s:"You got the \cnIon Cannon Beacon!";
  1270.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);
  1271.     SetFont ("SMALLFONT");
  1272.     HudMessage(s:"Place this in front of an \cAenemy MCT\cJ and guard";
  1273.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_WHITE, 0.5, 0.6, 5.0, 1.0);
  1274.     HudMessage(s:"it for \cU60 seconds\cJ for \cKcertain destruction!";
  1275.         HUDMSG_FADEOUT, 1880+PlayerNumber(), CR_WHITE, 0.5, 0.625, 5.0, 1.0);
  1276.    
  1277.     HudMessageBold (s:"\cGWarning: \cNBlue\cJ player has \cNIon Cannon Beacon!!";
  1278.         HUDMSG_FADEOUT, 15000, CR_WHITE,
  1279.         INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  1280.    
  1281.     GiveInventory("IonCannonBeacon",1);
  1282.     SetWeapon("IonCannonBeacon");
  1283.    
  1284.     BlueBeaconCooldown = True;
  1285.     Log(n:0, s:" purchases Ion Cannon Beacon.");
  1286. }
  1287.  
  1288. //-------------------- RED TEAM SUPERWEAPON
  1289. //---------------------------NUCLEAR STRIKE BEACON
  1290. script 56 (int Team) {
  1291.     if (PlayerTeam() == TEAM_BLUE) {
  1292.         // [Dusk] this message should never be displayed in casual games
  1293.         DisplayCross();
  1294.         SETFONT("BigFont");
  1295.         HudMessage(s:"What the fuck are you doing here?";
  1296.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1297.         terminate;
  1298.     }
  1299.    
  1300.     int cost = 1750;
  1301.     if ( MitigateDoublePress() ) terminate;
  1302.  
  1303.     RedBeaconCooldown = true;
  1304.     RedBeaconTime = BeaconPurchaseDelay-(Timer()-LastPurchasedBeacon[2])/35;
  1305.     if (RedBeaconTime <= 0)
  1306.         RedBeaconCooldown = false;
  1307.    
  1308.  
  1309.     if(CheckInventory("NuclearStrikeBeacon")) {
  1310.         DisplayCross();
  1311.         SETFONT("BigFont");
  1312.         HudMessage(s:"You already have the \ckNuclear Strike Beacon\cr!";
  1313.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1314.         terminate;
  1315.     }
  1316.    
  1317.     if(RedBeaconCooldown) {
  1318.         DisplayCross();
  1319.         SETFONT("BigFont");
  1320.         HudMessage(s:"You must wait \cF", d:RedBeaconTime, s:" seconds\nbefore you can get one of these!";
  1321.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1322.         terminate; 
  1323.     }  
  1324.    
  1325.     if (!IsSecondPress("WEAP06", cost)) terminate;
  1326.     if (!CheckCredits(cost)) terminate;
  1327.  
  1328.     LastPurchasedBeacon[2] = Timer();
  1329.     TakeInventory("PurchaseToken",1);
  1330.     SpendCredits(Credits[PlayerNumber()+1], 1750);
  1331.     DisplayTick();
  1332.    
  1333.     SETFONT("BigFont");
  1334.     HudMessage(s:"You got the \cANuclear Strike Beacon!"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);
  1335.     SetFont ("SMALLFONT");
  1336.     HudMessage(s:"Place this in front of an \cAenemy MCT\cJ and guard";
  1337.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_WHITE, 0.5, 0.6, 5.0, 1.0);
  1338.     HudMessage(s:"it for \cU60 seconds\cJ for \cKcertain destruction!";
  1339.         HUDMSG_FADEOUT, 1880+PlayerNumber(), CR_WHITE, 0.5, 0.625, 5.0, 1.0);
  1340.     HudMessageBold (s:"\cGWarning: \cARed\cJ player has \cANuclear Strike Beacon!!";
  1341.         HUDMSG_FADEOUT, 15000, CR_WHITE,
  1342.         INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  1343.    
  1344.     GiveInventory ("NuclearStrikeBeacon", 1);
  1345.     SetWeapon ("NuclearStrikeBeacon");
  1346.  
  1347.     RedBeaconCooldown = True;
  1348.     Log(n:0, s:" purchases Nuclear Strike Beacon.");
  1349. }
  1350.  
  1351. //---------------------------ARMOUR/DAMAGE UPGRADE
  1352. script 57 (int Team) {
  1353.     int cost = 250;
  1354.     if (MitigateDoublePress()) terminate;
  1355.    
  1356.     if (CheckInventory ("IsCommando")) {
  1357.         DisplayCross();
  1358.         SETFONT("BigFont");
  1359.         HudMessage (s:"no u :I";
  1360.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1361.         terminate;
  1362.     }
  1363.    
  1364.     if(CheckInventory("HasArmorUpgrade")) {
  1365.         DisplayCross();
  1366.         SETFONT("BigFont");
  1367.         HudMessage (s:"You already have this \ccupgrade!";
  1368.             HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1369.         terminate;
  1370.     }
  1371.    
  1372.     if (!IsSecondPress("UPGR01", cost)) terminate;
  1373.     if (!CheckCredits(cost)) terminate;
  1374.  
  1375.     TakeInventory("PurchaseToken",1);
  1376.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1377.  
  1378.     DisplayTick();
  1379.    
  1380.     SETFONT("BigFont");
  1381.     HudMessage(s:"You got the \ckarmor upgrade!";
  1382.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1383.     HudMessage(s:"You can no longer pilot mechs.";
  1384.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  1385.    
  1386.     GiveInventory("Refunds", 200);
  1387.     GiveInventory("HasArmorUpgrade", 1);
  1388.     GiveInventory("HighUpgrade", 1);
  1389.     SetArmorGrade (1, AGF_ADDITIVE);
  1390.     Log(n:0, s:" purchases armour/damage upgrade.");
  1391. }
  1392.  
  1393. //---------------------------PLASMA GUNNER
  1394. script 60 (int Team) {
  1395.     int cost = 800; int speed = 0.7;
  1396.     if (MitigateDoublePress()) terminate;
  1397.     if (!CheckBarracks(Team)) terminate;
  1398.     if (!CheckPlant(Team)) terminate;
  1399.     if (!IsResigned()) terminate;
  1400.     if (!IsSecondPress("CLSS26", cost)) terminate;
  1401.     if (!CheckCredits(cost)) terminate;
  1402.  
  1403.     GiveInventory("HasClass",1);
  1404.     GiveInventory("Refunds", cost/2);
  1405.     TakeInventory("PurchaseToken",1);
  1406.     SpendCredits(Credits[PlayerNumber()+1], 800);
  1407.     DisplayTick();
  1408.     SETFONT("BigFont");
  1409.     HudMessage(s:"You are a \cfPlasma Gunner!";
  1410.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1411.    
  1412.     //Set Statistics
  1413.     SetActorProperty(0,APROP_SPEED,speed);
  1414.     SetArmorGrade (2, ARMOD_LASER);
  1415.     GiveInventory("HighUpgrade",1);
  1416.     GiveInventory("NewClipAmmo",90);
  1417.     GiveInventory("Handgun",1);
  1418.     GiveInventory("PlasmaRifleAmmo",200);
  1419.     GiveInventory("EnhancedTimedC4",1);
  1420.     GiveInventory("TimedC4",1);
  1421.     GiveInventory("TimedC4Count",1);
  1422.     SetFragGrenades (2);
  1423.     GiveInventory("SpawnInvulnerability",1);
  1424.     GiveInventory ("ClassID", CLASS_PLASMAGUNNER);
  1425.     GiveInventory("PlasmaGun",1);
  1426.     SetWeapon("PlasmaGun");
  1427.    
  1428.     ACS_ExecuteAlways(91, 0);
  1429.    
  1430.     ACS_ExecuteAlways (961, 0, Team);
  1431.     PlayerSpeeds[PlayerNumber()] = speed;
  1432.     Log(n:0, s:" becomes Plasma Gunner.");
  1433. }
  1434.  
  1435. // ARTILLERY SOLDIER
  1436. script 61 (int Team) {
  1437.     int cost = 600; int speed = 0.7;
  1438.     if (MitigateDoublePress()) terminate;
  1439.     if (!CheckBarracks(Team)) terminate;
  1440.     if (!IsResigned()) terminate;
  1441.     if (!IsSecondPress("CLSS27", cost)) terminate;
  1442.     if (!CheckCredits(cost)) terminate;
  1443.    
  1444.     TakeInventory("PurchaseToken",1);
  1445.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1446.     DisplayTick();
  1447.  
  1448.     SETFONT("BigFont");
  1449.     HudMessage(s:"You are an \cfArtillery Soldier!";
  1450.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1451.     HudMessage(s:"Use Alt-Fire for \cFAnti-Mech shells!";
  1452.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);
  1453.    
  1454.     //Set Statistics
  1455.     SetActorProperty(0,APROP_SPEED,speed);
  1456.     SetArmorGrade (2, ARMOD_EXPLO);
  1457.     GiveInventory("HasClass",1);
  1458.     GiveInventory("Refunds",cost/2);
  1459.     GiveInventory("IsArtillerySoldier",1);
  1460.     GiveInventory("HighUpgrade",1);
  1461.     GiveInventory("NewClipAmmo",60);
  1462.     GiveInventory("Handgun",1);
  1463.     GiveInventory("EnhancedTimedC4",1);
  1464.     GiveInventory("TimedC4",1);
  1465.     GiveInventory("TimedC4Count",1);
  1466.     GiveInventory("Rifle",1);
  1467.     GiveInventory("RifleAmmo",20);
  1468.     GiveInventory("RifleGrenadeAmmo",2);
  1469.     GiveInventory("ArtilleryShellAmmo",30);
  1470.     SetFragGrenades (2);
  1471.     GiveInventory("ArtilleryCannon",1);
  1472.     SetWeapon("ArtilleryCannon");
  1473.     ACS_ExecuteAlways(91, 0);
  1474.    
  1475.     GiveInventory("SpawnInvulnerability",1);
  1476.     GiveInventory ("ClassID", CLASS_ARTILLERY);
  1477.    
  1478.     ACS_ExecuteAlways (961, 0, Team);
  1479.     PlayerSpeeds[PlayerNumber()] = speed;
  1480.     Log(n:0, s:" becomes artillery soldier.");
  1481. }
  1482.  
  1483. //---------------------------TIME COP
  1484. script 39 (int Team) {
  1485.     int cost = 2000; int speed = 0.9;
  1486.     if (MitigateDoublePress()) terminate;
  1487.     if (!CheckBarracks(team)) terminate;
  1488.     if (!CheckPlant(team)) terminate;
  1489.     if (MaxTimeCopsPerTeam > 0 && NumTimeCops[team] >= MaxTimeCopsPerTeam) {
  1490.         DisplayCross();
  1491.         SETFONT("BigFont");
  1492.         if (MaxTimeCopsPerTeam == 1) {
  1493.             HudMessage(s:"You already have a time cop in-field!";
  1494.                 HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1495.         } else {
  1496.             HudMessage(s:"You already have ", d:NumTimeCops[team], s:" time cops in-field!";
  1497.                 HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);
  1498.         }
  1499.        
  1500.         if (GetLevelInfo (LEVELINFO_LEVELNUM) == 20)
  1501.             ThrustThing((VectorAngle(GetActorVelX(0), GetActorVelY(0)) >> 8) + 128, 25, 0, 0);
  1502.         terminate;
  1503.     }
  1504.     if (!IsResigned()) terminate;
  1505.     if (!IsSecondPress("CLSS29", cost)) terminate;
  1506.     if (!CheckCredits(cost)) terminate;
  1507.    
  1508.     TakeInventory("PurchaseToken",1);
  1509.     SpendCredits(Credits[PlayerNumber()+1], cost);
  1510.    
  1511.     DisplayTick();
  1512.     SETFONT("BigFont");
  1513.     HudMessage(s:"You are the \cFTime Cop!";
  1514.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);
  1515.    
  1516.     SETFONT ("SMALLFONT");
  1517.     if(Team == 0)
  1518.         HudMessageBold (s:"\cGWarning: \cARed\cJ TIME COP in-field!";
  1519.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  1520.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  1521.     else
  1522.         HudMessageBold (s:"\cGWarning: \cNBlue\cJ TIME COP in-field!";
  1523.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  1524.             INTEL_XPOS, INTEL_YPOS, 2.0, 1.0);
  1525.    
  1526.     SetActorProperty (0, APROP_SPEED, speed);
  1527.     SetArmorGrade (2, ARMOD_NOCHANGE);
  1528.     GiveInventory ("HasClass", 1);
  1529.     GiveInventory ("HighUpgrade", 1);
  1530.     GiveInventory ("Refunds", cost/2);
  1531.     GiveInventory ("NewClipAmmo", 120);
  1532.     GiveInventory ("Handgun", 1);
  1533.     GiveInventory ("EnhancedTimedC4", 1);
  1534.     GiveInventory ("TimedC4", 2);
  1535.     GiveInventory ("TimedC4Count", 2);
  1536.     SetFragGrenades (4);
  1537.     GiveInventory ("SpawnInvulnerability", 1);
  1538.     GiveInventory ("ClassID", CLASS_TIMECOP);
  1539.     GiveInventory("MachineGunAmmo", 50);
  1540.     GiveInventory("MachineGun", 1);
  1541.     GiveInventory ("TimeGun", 1);
  1542.     GiveInventory ("TimeGunAmmo", 100);
  1543.     SetWeapon ("TimeGun");
  1544.     ACS_ExecuteAlways(91, 0);
  1545.    
  1546.     ACS_ExecuteAlways (961, 0, Team);
  1547.    
  1548.     PlayerSpeeds[PlayerNumber()] = speed;
  1549.     Log (n:0, s:" becomes Time Cop.");
  1550.     RecountTimeCops();
  1551.    
  1552.     Delay(35*6);
  1553.     ActivatorSound("misc/commando",255);
  1554. }
  1555.  
  1556. //---------------------------TIBERIUM HARVESTER //Advanced
  1557. script 63 (int Team) {
  1558.     int cost = 750; int speed = 0.8;
  1559.     if (MitigateDoublePress()) terminate;
  1560.     if (!CheckRefinery(Team)) terminate;
  1561.     if (!IsResigned()) terminate;
  1562.     if (!IsSecondPress("CLSS30", cost)) terminate;
  1563.     if (!CheckCredits(cost)) terminate;
  1564.  
  1565.     GiveInventory("HasClass",1);
  1566.     GiveInventory("Refunds", cost/2);
  1567.     TakeInventory("PurchaseToken",1);
  1568.     SpendCredits(Credits[PlayerNumber()+1], 750);
  1569.     DisplayTick();
  1570.     SETFONT("BigFont");
  1571.     HudMessage(s:"You are an \cfAdvanced Tiberium Harvester!";
  1572.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.4, 2.0, 1.0);
  1573.     HudMessage(s:"Pick-up \cctiberium crystals \cdand";
  1574.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 2.0, 1.0);
  1575.     HudMessage(s:"return them to your \ccrefinery \cdfor cash!";
  1576.         HUDMSG_FADEOUT, 1880+PlayerNumber(), CR_GREEN, 0.5, 0.65, 2.0, 1.0);
  1577.    
  1578.     //Set Statistics
  1579.     SetActorProperty(0,APROP_SPEED,speed);
  1580.     SetArmorGrade (1, ARMOD_CHEM);
  1581.     GiveInventory("HighUpgrade",1);
  1582.     GiveInventory("IsHarvester",1);
  1583.     GiveInventory("TiberiumProof",1);
  1584.     GiveInventory("Grade0Damage",1);
  1585.     GiveInventory("NewClipAmmo",200);
  1586.     GiveInventory("Handgun",1);
  1587.     GiveInventory("TimedC4",1);
  1588.     GiveInventory("TimedC4Count",1);
  1589.     SetFragGrenades (2);
  1590.     GiveInventory("MachineGunAmmo",160);
  1591.     GiveInventory("SubMachineGun",1);
  1592.     GiveInventory("MachineGun",1);
  1593.     SetWeapon("MachineGun");
  1594.     ACS_ExecuteAlways(91, 0);
  1595.    
  1596.     GiveInventory("SpawnInvulnerability",1);
  1597.     GiveInventory ("ClassID", CLASS_ADVHARVESTER);
  1598.                
  1599.     ACS_ExecuteAlways (961, 0, Team);
  1600.     PlayerSpeeds[PlayerNumber()] = speed;
  1601.     Log(n:0, s:" becomes advanced Tiberium Harvester.");
  1602.     Delay(35*6);
  1603.     ActivatorSound("misc/chem",255);
  1604. }
  1605.  
  1606. //---------------------------TIBERIUM HARVESTER //Free
  1607. script 64 (int Team) {
  1608.     int cost = 0; int speed = 0.65;
  1609.     if (MitigateDoublePress()) terminate;
  1610.     if (!CheckRefinery(Team)) terminate;
  1611.     if (!IsResigned()) terminate;
  1612.     if (!IsSecondPress("CLSS28", cost)) terminate;
  1613.     if (!CheckCredits(cost)) terminate;
  1614.  
  1615.     GiveInventory("HasClass",1);
  1616.     TakeInventory("PurchaseToken",1);
  1617.     SpendCredits(Credits[PlayerNumber()+1], 0);
  1618.     DisplayTick();
  1619.     SETFONT("BigFont");
  1620.     HudMessage(s:"You are a \cfTiberium Harvester!";
  1621.         HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.4, 2.0, 1.0);
  1622.     HudMessage(s:"Pick-up \cctiberium crystals \cdand";
  1623.         HUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 2.0, 1.0);
  1624.     HudMessage(s:"return them to your \ccrefinery \cdfor cash!";
  1625.         HUDMSG_FADEOUT, 1880+PlayerNumber(), CR_GREEN, 0.5, 0.65, 2.0, 1.0);
  1626.    
  1627.     //Set Statistics
  1628.     SetActorProperty(0,APROP_SPEED,speed);
  1629.     SetArmorGrade (0, ARMOD_CHEM);
  1630.     GiveInventory("IsHarvester",1);
  1631.     GiveInventory("TiberiumProof",1);
  1632.     GiveInventory("Grade0Damage",1);
  1633.     GiveInventory("NewClipAmmo",200);
  1634.     GiveInventory("Handgun",1);
  1635.     GiveInventory("TimedC4",1);
  1636.     GiveInventory("TimedC4Count",1);
  1637.     SetFragGrenades (1);
  1638.     GiveInventory("SubMachineGun",1);
  1639.     GiveInventory("SpawnInvulnerability",1);
  1640.     GiveInventory ("ClassID", CLASS_HARVESTER);
  1641.     SetWeapon("SubMachineGun");
  1642.     ACS_ExecuteAlways(91, 0);
  1643.                
  1644.     ACS_ExecuteAlways (961, 0, Team);
  1645.     PlayerSpeeds[PlayerNumber()] = speed;
  1646.     Log(n:0, s:" becomes Tiberium harvester.");
  1647.     Delay(35*6);
  1648.     ActivatorSound("misc/chem",255);
  1649. }
  1650.  
  1651. script 961 (int team) {
  1652.     int tries, i;
  1653.     bool failed = true;
  1654.     if (GetLevelInfo (LEVELINFO_LEVELNUM) == 20 || GetLevelInfo (LEVELINFO_LEVELNUM) == 21) {
  1655.         for (i = 0; i <= 9; i++) {
  1656.             if (Teleport_NoStop (1+(1-team), 0)) {
  1657.                 failed = false;
  1658.                 break;
  1659.             }
  1660.         }
  1661.     } else {
  1662.         for (i = 0; i <= 9; i++) {
  1663.             if (Teleport (1+(1-team))) {
  1664.                 failed = false;
  1665.                 break;
  1666.             }
  1667.         }
  1668.     }
  1669.     if (failed) {
  1670.         HudMessage (s:"In-field teleportation \cAfailed\cJ - use the\n\cDTeleport back to Field\cJ -terminal";
  1671.             HUDMSG_FADEOUT, 15000, CR_WHITE,
  1672.             INTEL_XPOS, INTEL_YPOS2, 5.0, 1.0);
  1673.             terminate;
  1674.     } else TakeInventory ("IsInSpawnRoom", 1);
  1675. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement