Advertisement
ijontichy

tmp.c

Apr 19th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.13 KB | None | 0 0
  1. #define AOWCLASSCOUNT 27
  2. #define AOWCWEPCOUNT  4
  3. #define AOWAMMOCOUNT  30
  4. #define AOWALTWEPCOUNT 8
  5.  
  6. int classWeapons[AOWCLASSCOUNT][AOWCWEPCOUNT] =
  7. {
  8.     {"SubmachineGun", 0, 0, 0},
  9.     {"RepairGun", 0, 0, 0},
  10.     {"SubmachineGun", "GatlingGun", 0, 0},
  11.     {"ProxyMine", "SubmachineGun", "RepairGun", 0},
  12.     {"Flamer", 0, 0, 0},
  13.     {"Rifle", 0, 0, 0},
  14.     {"SubmachineGun", "MachineGun", 0, 0},
  15.     {"Rifle", "Grenade_Launcher", 0, 0},
  16.     {"Rifle", "MissileLauncher", 0, 0},
  17.     {"StealthLaserRifle", "Knife", 0, 0},
  18.     {"Rifle", "GaussRifle", 0, 0},
  19.     {"SubmachineGun", "ChemicalSprayer", 0, 0},
  20.     {"SubmachineGun", "ShockRifle", 0, 0},
  21.     {"MissileLauncher", "GatlingGun", "Rifle", "GaussRifle"},
  22.     {"Boomstick", 0, 0, 0},
  23.     {"BombPack", 0, 0, 0},
  24.     {"SniperRifle", 0, 0, 0},
  25.     {"RepairGun", "UtilityGun", 0, 0},
  26.     {"ProxyMine", "RemoteC4", "Boomstick", "BombSquadGun"},
  27.     {"Boomstick", "HealGun", 0, 0},
  28.     {"LaserChaingun", 0, 0, 0},
  29.     {"JumpJetGatlingGun", 0, 0, 0},
  30.     {"TiberiumAutoRifle", 0, 0, 0},
  31.     {"DoubleShotgun", 0, 0, 0},
  32.     {"PlasmaGun", 0, 0, 0},
  33.     {"ArtilleryCannon", 0, 0, 0},
  34.     {"MachineGun", "TimeGun", 0, 0}
  35. };
  36.  
  37. int aowAmmoTypes[AOWAMMOCOUNT] =
  38. {
  39.     "NewClipAmmo", "MachineGunAmmo", "ProxyMineCount", "FlamerAmmo",
  40.     "PhosphorusGrenadeAmmo", "FragGrenadeAmmo", "RifleAmmo", "RifleGrenadeAmmo",
  41.     "GrenadeAmmo", "MissileAmmo", "LaserRifleAmmo", "GaussRifleAmmo",
  42.     "ChemicalAmmo", "ChemicalGrenadeAmmo", "GeneporiumCharge",
  43.     "PlasmaCannonAmmo", "ShotgunAmmo", "SniperAmmo", "Utility_Ammo",
  44.     "RemoteC4Ammo", "LaserChaingunAmmo", "TE21CalAmmo", "ArtilleryShellAmmo",
  45.     "JumpJetFuel",  "PlasmaRifleAmmo", "TimeGunAmmo", "Clip", "Shell",
  46.     "RocketAmmo", "Cell"
  47. };
  48.  
  49. int aowOtherWeapons[AOWALTWEPCOUNT] =
  50. {
  51.     "Unarmed", "EnhancedTimedC4", "Handgun", "IonCannonBeacon",
  52.     "NuclearStrikeBeacon", "EagerBeaver", "PlasmaCannon", "AdminPistol"
  53. };
  54.  
  55. int classNames[AOWCLASSCOUNT] =
  56. {
  57.     "Gunman", "Engineer", "Minigunner", "Technician", "Flamer", "Rifleman",
  58.     "Machinegunner", "Grenadier", "Rocketeer", "Infiltrator", "Gausser",
  59.     "Chemist", "Shock Trooper", "Commando", "Shotgunner", "Kamikaze", "Sniper",
  60.     "Constructor", "Demoman", "Medic", "Laser Minigunner", "Jetman",
  61.     "Tib-Trooper", "SSGer", "Plasmician", "Artilleryman", "Timecop"
  62. };
  63.  
  64.  
  65.  
  66. function void maxAllAOWAmmo(void)
  67. {
  68.     int ammo; int aMax; int cur; int diff;
  69.     int i;
  70.  
  71.     for (i = 0; i < AOWAMMOCOUNT; i++)
  72.     {
  73.         ammo = aowAmmoTypes[i];
  74.         aMax  = GetAmmoCapacity(ammo);
  75.         cur  = CheckInventory(ammo);
  76.         diff = aMax - cur;
  77.  
  78.         GiveInventory(ammo, diff);
  79.     }
  80. }
  81.  
  82. function void doubleAllAOWAmmo(void)
  83. {
  84.     int ammo; int aMax;
  85.     int i;
  86.  
  87.     for (i = 0; i < AOWAMMOCOUNT; i++)
  88.     {
  89.         ammo = aowAmmoTypes[i];
  90.         aMax  = GetAmmoCapacity(ammo);
  91.  
  92.         SetAmmoCapacity(ammo, aMax * 2);
  93.     }
  94. }
  95.  
  96. function int giveAOWClassWeapons(int which)
  97. {
  98.     int i; int wep;
  99.  
  100.     if ((which < 0) || (which >= AOWCLASSCOUNT))
  101.     {
  102.         return 0;
  103.     }
  104.  
  105.     for (i = 0; i < AOWCWEPCOUNT; i++)
  106.     {
  107.         wep = classWeapons[which][i];
  108.  
  109.         if (wep != 0)
  110.         {
  111.             GiveInventory(wep, 1);
  112.         }
  113.     }
  114.  
  115.     return classNames[which];
  116. }
  117.  
  118. function void giveAOWSpecialWeapons(void)
  119. {
  120.     int i;
  121.  
  122.     for (i = 0; i < AOWALTWEPCOUNT; i++)
  123.     {
  124.         GiveInventory(aowOtherWeapons[i], 1);
  125.     }
  126. }
  127.  
  128.  
  129.  
  130. script 592 (int which, int a1, int a2) net
  131. {
  132.     int className; int i;
  133.  
  134.     switch (which)
  135.     {
  136.     case 0:
  137.         ACS_ExecuteAlways(321, 0, a1 + (a2 << 16), 0, 0);
  138.         break;
  139.  
  140.     case 1:
  141.         className = giveAOWClassWeapons(a1);
  142.  
  143.         if (className == 0)
  144.         {
  145.             Print(s:"Invalid class ", d:a1);
  146.         }
  147.         else
  148.         {
  149.             Print(s:"You have gotten the weapons for the ", s:className);
  150.         }
  151.         break;
  152.  
  153.     case 2:
  154.         for (i = 0; i < AOWCLASSCOUNT; i++)
  155.         {
  156.             giveAOWClassWeapons(i);
  157.         }
  158.        
  159.         giveAOWSpecialWeapons();
  160.         maxAllAOWAmmo();
  161.  
  162.         Print(s:"ALL WEPON GET!");
  163.         break;
  164.  
  165.     case 3:
  166.         maxAllAOWAmmo();
  167.         break;
  168.  
  169.     case 4:
  170.         doubleAllAOWAmmo();
  171.         maxAllAOWAmmo();
  172.         break;
  173.     }        
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement