aow_2.1_code_27.08.2014.pk3

PK3 1.0 MiB 0 map(s)

Counts

endoom0
graphics0
lumps49
maps0
palettes0

Totals (across maps)

Things0
Linedefs0
Sectors0
Monsters0
Items0
Raw model (for completeness)
{
  "meta": {
    "id": "012f5562-8e6c-4849-b694-b9711cfce19b",
    "sha1": "629eba2d6a919d5f25c574a2c475b3f15cc62fcd",
    "sha256": "b88378ff5b137d71f44144e830662cae7b76417551fbc97b86c958708e128966",
    "filenames": [
      "aow_2.1_code_27.08.2014.pk3"
    ],
    "additional": {
      "engines": [
        "ZDOOM"
      ],
      "iwad": [],
      "filename": null,
      "added": "2014-08-30 12:09:06",
      "locked": false,
      "canDownload": true,
      "adult": false,
      "hidden": false,
      "name": null,
      "description": null,
      "maps": null,
      "graphicOverrides": null,
      "screenshots": null,
      "palettes": null,
      "categories": null
    },
    "flags": {
      "locked": false,
      "canDownload": true,
      "adult": false,
      "hidden": false
    },
    "added": "2014-08-30 12:09:06",
    "file": {
      "type": "PK3",
      "size": 1050426,
      "url": "https://wadarchive2.nyc3.digitaloceanspaces.com/629eba2d6a919d5f25c574a2c475b3f15cc62fcd/629eba2d6a919d5f25c574a2c475b3f15cc62fcd.pk3.gz",
      "corrupt": false
    },
    "content": {
      "counts": {
        "endoom": 0,
        "graphics": 0,
        "lumps": 49,
        "maps": 0,
        "palettes": 0
      },
      "engines_guess": [
        "ZDOOM"
      ]
    },
    "text_files": [
      {
        "source": "pk3",
        "name": "actors/weapons/AmmoInfantry.txt",
        "contents": "// All ammunition definitions, defined as the ammo expended to operate a weapon,\n// and whose values are safe to change without breaking operation of the weapon.\n// This document does not include definitions for \"decorate token\" ammo; those\n// will be found in the document the weapon relies on.\n// [Dusk] Are all of these really necessary?\n\n////Bullet Weapons////\n\n//9x19mm Bullets; 9mm Beretta/SMG.\nactor NewClipAmmo : Ammo {\n\tInventory.Amount 50\n\tInventory.MaxAmount 400\n\tAmmo.BackpackAmount 50\n\tAmmo.BackpackMaxAmount 400\n}\n\n//5.56x45mm Bullets; Machinegun/Gatling Gun\nactor MachineGunAmmo : Ammo {\n\tinventory.amount 50\n\tinventory.maxamount 400\n\tammo.backpackamount 50\n\tammo.backpackmaxamount 400\n}\n\n//7.62x51mm Bullets/40mm HE Grenades; Rifle\nactor RifleAmmo : Ammo {\n\tinventory.amount 10\n\tinventory.maxamount 50\n\tammo.backpackamount 10\n\tammo.backpackmaxamount 50\n}\n\nactor RifleGrenadeAmmo : Ammo {\n\tinventory.amount 2\n\tinventory.maxamount 8\n\tammo.backpackamount 2\n\tammo.backpackmaxamount 8\n}\n\n//.416 Remington Magnum; Sniper Rifle\nactor SniperAmmo : Ammo {\n\tinventory.amount 8\n\tinventory.maxamount 40\n\tammo.backpackamount 8\n\tammo.backpackmaxamount 40\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n//Magical revolver invisible death ray bullets from space; Blood Revolver\nactor BloodRevolverAmmo : Ammo {\n\t+IGNORESKILL\n\tInventory.Amount 1\n\tInventory.MaxAmount 3\n\tAmmo.BackpackAmount 0\n\tAmmo.BackpackMaxAmount 3\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n//12-gauge Shotshells; Shotgun/Doubleshotgun\nactor ShotgunAmmo : Ammo {\n\tinventory.amount 8\n\tinventory.maxamount 50\n\tammo.backpackamount 8\n\tammo.backpackmaxamount 50\n}\n\n////Explosive Weapons////\n\n//M67 Fragmentation Grenades;\n// [Dusk] These are dropped by the frag grenade `weapon`.\nactor FragGrenadeAmmo : Ammo {\n\tInventory.PickupMessage \"Picked up a frag grenade.\"\n\tInventory.Amount 1\n\tInventory.MaxAmount 1\n\tAmmo.BackpackAmount 1\n\tAmmo.BackpackMaxAmount 1\n\tScale 0.25\n\tStates {\n\tSpawn:\n\t\tFRGP A -1\n\t\tstop\n\t}\n}\n\n//40mm HEDP Grenades; Grenade Launcher\nactor GrenadeAmmo : Ammo {\n\t Inventory.Amount 8\n\t Inventory.MaxAmount 40\n\t Ammo.BackpackAmount 8\n\t Ammo.BackpackMaxAmount 40\n\t states {\n\t Spawn:\n\t\tTNT1 A 0\n\t\tstop\n\t }\n}\n\n//AM Guided Missiles; Missile Launcher\nactor MissileAmmo : Ammo {\n\t+IGNORESKILL\n\tinventory.amount 2\n\tinventory.maxamount 15\n\tammo.backpackamount 2\n\tammo.backpackmaxamount 15\n}\n\n//50mm/80mm Howitzer Shells; Artillery Gun\nactor ArtilleryShellAmmo : Ammo {\n\tInventory.Amount 4\n\tInventory.MaxAmount 30\n\tAmmo.BackpackAmount 4\n\tAmmo.BackpackMaxAmount 30\n}\n\n//Artillery-Class Plasma Battery Charge; Plasma Cannon (Yes, all of its damage is actually Explosive/Fire)\nactor PlasmaCannonAmmo : Ammo {\n\tinventory.amount 0\n\tinventory.maxamount 10\n\tammo.backpackamount 1\n\tammo.backpackmaxamount 10\n\t+IGNORESKILL\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n////Laser Weapons////\n\n//Laser Battery Charge; Laser Rifle\nactor LaserRifleAmmo : Ammo {\n\tinventory.amount 20\n\tinventory.maxamount 200\n\tammo.backpackamount 20\n\tammo.backpackmaxamount 200\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n//Super-High Density Laser Battery Charge; Laser Chaingun\nactor LaserChaingunAmmo : Ammo {\n\tinventory.amount 50\n\tinventory.maxamount 400\n\tammo.backpackamount 50\n\tammo.backpackmaxamount 400\n\tstates {\n\tSpawn:\n\t\tCELL A -1\n\t\tstop\n\t}\n}\n\n//Dual-Purpose Gauss Slugs; Gauss Rifle\nactor GaussRifleAmmo : Ammo {\n\tinventory.amount 8\n\tinventory.maxamount 40\n\tammo.backpackamount 8\n\tammo.backpackmaxamount 40\n}\n\n//Voltlandian Electric-Bird Extract (Geneporium); Shock Rifle\n// [Dusk] heh\nactor GeneporiumCharge : Ammo {\n\tinventory.amount 30\n\tinventory.maxamount 200\n\tammo.backpackamount 30\n\tammo.backpackmaxamount 200\n}\n\n//UAC Plasma Cell Charge; Plasma Rifle\nactor PlasmaRifleAmmo : Ammo {\n\tinventory.amount 40\n\tinventory.maxamount 300\n\tammo.backpackamount 40\n\tammo.backpackmaxamount 300\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n////Weaponized Flame Weapons////\n\n//Flammable Aerosol Mix/Phosphorus Incendiary Grenades; Flamethrower\nactor FlamerAmmo : Ammo {\n\tinventory.amount 50\n\tinventory.maxamount 400\n\tammo.backpackamount 50\n\tammo.backpackmaxamount 400\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\nactor PhosphorusGrenadeAmmo : Ammo {\n\tinventory.amount 1\n\tinventory.maxamount 4\n\tammo.backpackamount 1\n\tammo.backpackmaxamount 4\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n//Heavily Compressed Magical Hydrogen Pellets; Combustion Autorifle\nactor FA21CalAmmo : Ammo {\n\t+IGNORESKILL\n\tinventory.amount 30\n\tinventory.maxamount 120\n\tammo.backpackamount 30\n\tammo.backpackmaxamount 120\n}\n\n////Weaponized Tiberium Weapons////\n\n//Tiberium-Explosive .21 Cal Darts; Tiberium Automatic Rifle\nactor TE21CalAmmo : Ammo {\n\t+IGNORESKILL\n\tinventory.amount 30\n\tinventory.maxamount 120\n\tammo.backpackamount 30\n\tammo.backpackmaxamount 120\n}\n\n//Tiberium Particulate/Tiberium-Explosive Grenades; Chemical Sprayer\nactor ChemicalAmmo : Ammo {\n\tinventory.amount 50\n\tinventory.maxamount 400\n\tammo.backpackamount 50\n\tammo.backpackmaxamount 400\n}\n\nactor ChemicalGrenadeAmmo : Ammo {\n\tinventory.amount 1\n\tinventory.maxamount 4\n\tammo.backpackamount 1\n\tammo.backpackmaxamount 4\n}\n\n////Others And Inventory////\n\n//Personal Cloak Field Generator Power; Stealth Laser Rifle\nactor StealthCharge : Ammo {\n\t+IGNORESKILL\n\tinventory.amount 0\n\tinventory.maxamount 100\n\tammo.backpackamount 10\n\tammo.backpackmaxamount 100\n}\n\n//Timespace... Magic; Time Gun\nactor TimeGunAmmo : Ammo {\n\t+IGNORESKILL\n\tinventory.amount 175\n\tinventory.maxamount 175\n\tammo.backpackamount 0\n\tammo.backpackmaxamount 175\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\n//Chronobow Ammo\nactor ChronoBolt : Ammo {\n\tInventory.Amount 4\n\tInventory.MaxAmount 25\n\tammo.backpackamount 4\n\tAmmo.BackpackMaxAmount 25\n}\n\n//Flash Grenades\nactor FlashbangGrenadeAmmo : Ammo\n{\n\tInventory.PickupMessage \"Picked up a flashbang grenade.\"\n\tInventory.Amount 1\n\tInventory.MaxAmount 1\n\tAmmo.BackpackAmount 1\n\tAmmo.BackpackMaxAmount 1\n\tScale 0.15\n\tStates {\n\tSpawn:\n\t\tFLSH X -1\n\t\tstop\n\t}\n}\n\n//Karasawa Ammo\nActor KSawaCell : Ammo\n{\n    Inventory.Amount 8\n    Inventory.MaxAmount 60\n    Ammo.BackpackAmount 8\n    Ammo.BackpackMaxAmount 60\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n  }\n}\n\n////Weaponized Flame Weapons////\n\n//Nail Machinegun Ammo/Nail Bombs; Nail Machinegun\nActor Nails : Ammo\n{\n  Inventory.Amount 40\n  Inventory.MaxAmount 250\n  Ammo.BackpackAmount 40\n  Ammo.BackpackMaxAmount 250\n  States\n  {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\nactor NailBombs : Ammo {\n\tinventory.amount 1\n\tinventory.maxamount 4\n\tammo.backpackamount 1\n\tammo.backpackmaxamount 4\n\tstates {\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\nACTOR BoltCharge : Ammo {\n   Inventory.Amount 1\n   Inventory.MaxAmount 5\n   Ammo.BackpackAmount 1\n   Ammo.BackpackMaxAmount 5\n   States\n   {\n   Spawn:\n        TNT1 A 0\n\t\tstop\n   }\n}\n\nActor DesertEagleAmmo : Ammo {\n   Inventory.amount 20\n   Inventory.maxamount 100\n   Ammo.backpackamount 20\n   Ammo.backpackmaxamount 100\n   States\n   {\n   Spawn:\n        TNT1 A 0\n        Stop\n   }\n}\n\nActor D1000Cell : Ammo {\n   Inventory.amount 4\n   Inventory.maxamount 40\n   Ammo.backpackamount 4\n   Ammo.backpackmaxamount 40\n   States\n   {\n   Spawn:\n        TNT1 A 0\n        Stop\n   }\n}"
      },
      {
        "source": "pk3",
        "name": "actors/weapons/Remotec4.txt",
        "contents": "// REMOTE C4\n// TODO: make the weapon sprite include the detonator!\n\nactor RemoteC4Ammo : Ammo {\n\tinventory.amount 0\n\tinventory.maxamount 4\n\tammo.backpackamount 1\n\tammo.backpackmaxamount 4\n}\n\nactor Remote_C4 : AOWWeapon {\n\t+NOALERT\n\tObituary \"%o bonks %k with a 100kg Remote C4.\"\n\tWeapon.AmmoType \"RemoteC4Ammo\"\n\tWeapon.AmmoUse 1\n\tWeapon.AmmoGive 5\n\tStates {\n\tReady:\n\t\tRC4G B 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"ReadyFull\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G B 1 A_WeaponReady (WRF_NOPRIMARY)\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G B 1 A_WeaponReady (WRF_NOPRIMARY)\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G B 1 A_WeaponReady (WRF_NOPRIMARY)\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G B 1 A_WeaponReady (WRF_NOPRIMARY)\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G B 1 A_WeaponReady (WRF_NOPRIMARY)\n\t\tloop\n\tReadyFull:\n\t\tRC4G A 0 A_JumpIfInventory (\"IsBlue\", 1, \"ReadyFullBlue\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G A 1 A_WeaponReady\n\t\tloop\n\tReadyFullBlue:\n\t    TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4G C 1 A_WeaponReady\n\t\tloop\n\tDeselect:\n\t\tRC4G B 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"DeselectFull\")\n\t\tRC4G B 1 offset (4,34)\n\t\tRC4G B 1 offset (8,40)\n\t\tRC4G B 1 offset (16,49)\n\t\tRC4G B 1 offset (24,62)\n\t\tRC4G B 1 offset (32,79)\n\t\tRC4G B 1 offset (40,100)\n\t\tRC4G B 1 offset (48,125)\n\t\tRC4G B 1 offset (56,154)\n\t\tTNT1 B 0 offset (1,33)\n\t\tgoto DeselectLoop\n\tDeselectFull:\n\t\tRC4G A 0 A_JumpIfInventory (\"IsBlue\", 1, \"DeselectFullBlue\")\n\t\tRC4G A 1 offset (4,34)\n\t\tRC4G A 1 offset (8,40)\n\t\tRC4G A 1 offset (16,49)\n\t\tRC4G A 1 offset (24,62)\n\t\tRC4G A 1 offset (32,79)\n\t\tRC4G A 1 offset (40,100)\n\t\tRC4G A 1 offset (48,125)\n\t\tRC4G A 1 offset (56,154)\n\t\tTNT1 A 0 offset (1,33)\n\t\tgoto DeselectLoop\n\tDeselectFullBlue:\n\t\tRC4G C 1 offset (4,34)\n\t\tRC4G C 1 offset (8,40)\n\t\tRC4G C 1 offset (16,49)\n\t\tRC4G C 1 offset (24,62)\n\t\tRC4G C 1 offset (32,79)\n\t\tRC4G C 1 offset (40,100)\n\t\tRC4G C 1 offset (48,125)\n\t\tRC4G C 1 offset (56,154)\n\t\tTNT1 A 0 offset (1,33)\n\t\tgoto DeselectLoop\n\tDeselectLoop:\n\t\tTNT1 AA 0 A_Lower\n\t\tTNT1 A 1 A_Lower\n\t\tloop\n\tSelect:\n\t\tRC4G B 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"SelectFull\")\n\t\tRC4G B 1 offset (130,154)\n\t\tRC4G B 1 offset (120,139)\n\t\tRC4G B 0 A_PlaySound(\"weapons/select00\", CHAN_AUTO)\n\t\tRC4G B 1 offset (110,125)\n\t\tRC4G B 1 offset (100,112)\n\t\tRC4G B 1 offset (90,100)\n\t\tRC4G B 1 offset (80,89)\n\t\tRC4G B 1 offset (70,79)\n\t\tRC4G B 1 offset (60,70)\n\t\tRC4G B 1 offset (50,62)\n\t\tRC4G B 1 offset (40,55)\n\t\tRC4G B 1 offset (30,49)\n\t\tRC4G B 1 offset (20,44)\n\t\tRC4G B 1 offset (15,40)\n\t\tRC4G B 1 offset (10,37)\n\t\tRC4G B 1 offset (5,34)\n\t\tRC4G B 1 offset (0,0)\n\t\tGoto Ready\n\tSelectFull:\n\t    RC4G A 0 A_JumpIfInventory (\"IsBlue\", 1, \"SelectFullBlue\")\n\t\tRC4G A 1 offset (130,154)\n\t\tRC4G A 1 offset (120,139)\n\t\tRC4G A 0 A_PlaySound(\"weapons/select00\", CHAN_AUTO)\n\t\tRC4G A 1 offset (110,125)\n\t\tRC4G A 1 offset (100,112)\n\t\tRC4G A 1 offset (90,100)\n\t\tRC4G A 1 offset (80,89)\n\t\tRC4G A 1 offset (70,79)\n\t\tRC4G A 1 offset (60,70)\n\t\tRC4G A 1 offset (50,62)\n\t\tRC4G A 1 offset (40,55)\n\t\tRC4G A 1 offset (30,49)\n\t\tRC4G A 1 offset (20,44)\n\t\tRC4G A 1 offset (15,40)\n\t\tRC4G A 1 offset (10,37)\n\t\tRC4G A 1 offset (5,34)\n\t\tRC4G A 1 offset (0,0)\n\t\tGoto Ready\n\tSelectFullBlue:\n\t\tRC4G C 1 offset (130,154)\n\t\tRC4G C 1 offset (120,139)\n\t\tRC4G C 0 A_PlaySound(\"weapons/select00\", CHAN_AUTO)\n\t\tRC4G C 1 offset (110,125)\n\t\tRC4G C 1 offset (100,112)\n\t\tRC4G C 1 offset (90,100)\n\t\tRC4G C 1 offset (80,89)\n\t\tRC4G C 1 offset (70,79)\n\t\tRC4G C 1 offset (60,70)\n\t\tRC4G C 1 offset (50,62)\n\t\tRC4G C 1 offset (40,55)\n\t\tRC4G C 1 offset (30,49)\n\t\tRC4G C 1 offset (20,44)\n\t\tRC4G C 1 offset (15,40)\n\t\tRC4G C 1 offset (10,37)\n\t\tRC4G C 1 offset (5,34)\n\t\tRC4G C 1 offset (0,0)\n\t\tGoto Ready\n\tFire:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tRC4G A 0 A_JumpIfInventory (\"IsBlue\", 1, \"FireBlue\")\n\t\tRC4G A 1 offset (1, 31)\n\t\tRC4G A 1 offset (7, 37)\n\t\tRC4G A 1 offset (13, 43)\n\t\tRC4G A 1 offset (19, 49)\n\t\tRC4G A 1 offset (26, 56)\n\t\tRC4G A 1 offset (34, 64)\n\t\tRC4G A 1 offset (42, 72)\n\t\tRC4G A 1 offset (54, 84) A_PlaySound (\"c4/remote\", CHAN_WEAPON)\n\t\tRC4G A 1 offset (60, 90)\n\t\tRC4G A 1 offset (40, 70)\n\t\tRC4G B 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"ReadyFull\")\n\t\tRC4G B 5 A_FireCustomMissile (\"RemoteC4Thrown\")\n\t\tRC4G B 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"FireEndFull\")\n\t\tgoto FireEnd\n\tFireBlue:\n\t\tRC4G C 1 offset (1, 31)\n\t\tRC4G C 1 offset (7, 37)\n\t\tRC4G C 1 offset (13, 43)\n\t\tRC4G C 1 offset (19, 49)\n\t\tRC4G C 1 offset (26, 56)\n\t\tRC4G C 1 offset (34, 64)\n\t\tRC4G C 1 offset (42, 72)\n\t\tRC4G C 1 offset (54, 84) A_PlaySound (\"c4/remote\", CHAN_WEAPON)\n\t\tRC4G C 1 offset (60, 90)\n\t\tRC4G C 1 offset (40, 70)\n\t\tRC4G B 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"ReadyFull\")\n\t\tRC4G B 5 A_FireCustomMissile (\"RemoteC4Thrown\")\n\t\tRC4G B 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"FireEndFull\")\n\t\tgoto FireEnd\n\tFireEnd:\n\t\tRC4G B 1 offset (30, 60)\n\t\tRC4G B 1 offset (10, 80)\n\t\tRC4G B 1 offset (0, 100)\n\t\tRC4G B 1 offset (0, 110)\n\t\tgoto Ready\n\tFireEndFull:\n\t    RC4G B 0 A_JumpIfInventory (\"IsBlue\", 1, \"FireEndFullBlue\")\n\t\tRC4G B 1 offset (30, 60)\n\t\tRC4G B 1 offset (10, 40)\n\t\tRC4G B 1 offset (0, 40)\n\t\tRC4G A 1 offset (0, 60)\n\t\tRC4G A 1 offset (0, 80)\n\t\tRC4G A 1 offset (0, 100)\n\t\tRC4G A 1 offset (0, 110)\n\t\tgoto Ready\n\tFireEndFullBlue:\n\t\tRC4G B 1 offset (30, 60)\n\t\tRC4G B 1 offset (10, 40)\n\t\tRC4G B 1 offset (0, 40)\n\t\tRC4G C 1 offset (0, 60)\n\t\tRC4G C 1 offset (0, 80)\n\t\tRC4G C 1 offset (0, 100)\n\t\tRC4G C 1 offset (0, 110)\n\t\tgoto Ready\n\tAltFire:\n\t\tRC4E A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tRC4E A 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"AltFireFull\")\n\t\tRC4E ABCDEFGH 1\n\t\tRC4E I 2\n\t\tRC4E J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4E I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4E H 6\n\t\tRC4E G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n\t\tRC4E FEDCBA 1\n\t\tgoto Ready\n\tAltFireFull:\n\t    RC4D A 0 A_JumpIfInventory (\"IsBlue\", 1, \"AltFireFullBlue\")\n\t\tRC4D ABCDEFGH 1\n\t\tRC4D I 2\n\t\tRC4D J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4D I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4D H 6\n\t\tRC4D G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n\t\tRC4D FEDCBA 1\n\t\tgoto ReadyFull\n\tAltFireFullBlue:\n\t\tRC4B ABCDEFGH 1\n\t\tRC4B I 2\n\t\tRC4B J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4B I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4B H 6\n\t\tRC4B G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n\t\tRC4B FEDCBA 1\n\t\tgoto ReadyFull\n    FragGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"FragGrenadeRed\")\n\t\tRC4G B 1 offset (-4,34)\n\t\tRC4G B 1 offset (-8,40)\n\t\tRC4G B 1 offset (-16,49)\n\t\tRC4G B 1 offset (-24,62)\n\t    goto FragGrenade2\n\tFragGrenadeRed:\n        TNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,\"FragGrenadeBlue\")\n\t\tRC4G A 1 offset (-4,34)\n\t\tRC4G A 1 offset (-8,40)\n\t\tRC4G A 1 offset (-16,49)\n\t\tRC4G A 1 offset (-24,62)\n\t\tgoto FragGrenade2\n    FragGrenadeBlue:\n\t\tRC4G C 1 offset (-4,34)\n\t\tRC4G C 1 offset (-8,40)\n\t\tRC4G C 1 offset (-16,49)\n\t\tRC4G C 1 offset (-24,62)\n\t\tgoto FragGrenade2\n\tFragGrenade2:\n\t\tFRAG A 1 offset (-10,49)\n\t\tFRAG A 1 offset (-20,40)\n\t\tFRAG A 1 offset (-30,34)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tFRAG BCD 2\n\t\tFRAG E 2 A_PlaySound (\"frag/pinpull\", CHAN_WEAPON)\n\t\tFRAG FG 2\n\t\tFRAG G 1 offset (0,33)\n\t\tFRAG G 1 offset (6,39)\n\t\tFRAG G 1 offset (11,46)\n\t\tFRAG G 1 offset (16,53)\n\t\tFRAG G 1 offset (21,61)\n\t\tFRAG G 1 offset (26,70)\n\t\tFRAG G 1 offset (31,80)\n\t\tFRAG G 1 offset (31,91)\n\t\tFRAG G 1 offset (36,103)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"frag/throw\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FragGrenadeThrown5\", -1, 0, 10, 15)\n\t\tTNT1 A 0 A_TakeInventory(\"FragGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tFLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n    FlashbangGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"RemoteC4Ammo\", 1, \"FlashbangGrenadeRed\")\n\t\tRC4G B 1 offset (-4,34)\n\t\tRC4G B 1 offset (-8,40)\n\t\tRC4G B 1 offset (-16,49)\n\t\tRC4G B 1 offset (-24,62)\n\t    goto FlashbangGrenade2\n\tFlashbangGrenadeRed:\n\t    TNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,\"FlashbangGrenadeBlue\")\n\t\tRC4G A 1 offset (-4,34)\n\t\tRC4G A 1 offset (-8,40)\n\t\tRC4G A 1 offset (-16,49)\n\t\tRC4G A 1 offset (-24,62)\n\t\tRC4G A 1 offset (-32,79)\n\t\tRC4G A 1 offset (-40,100)\n\t\tRC4G A 1 offset (-48,125)\n\t\tRC4G A 1 offset (-56,154)\n\t\tgoto FlashbangGrenade2\n    FlashbangGrenadeBlue:\n\t\tRC4G C 1 offset (-4,34)\n\t\tRC4G C 1 offset (-8,40)\n\t\tRC4G C 1 offset (-16,49)\n\t\tRC4G C 1 offset (-24,62)\n\t\tRC4G C 1 offset (-32,79)\n\t\tRC4G C 1 offset (-40,100)\n\t\tRC4G C 1 offset (-48,125)\n\t\tRC4G C 1 offset (-56,154)\n\t\tgoto FlashbangGrenade2\n    FlashbangGrenade2:\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"flash/flashthrow\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FlashBangGrenadeThrown5\", -1, 0, 10, 15)\n        TNT1 A 0 A_TakeInventory(\"FlashbangGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n        FLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n\t}\n}\n\n//Check this to use Remote C4 Detonator\nactor UseRemoteC4Detonator : Inventory\n{\n    inventory.amount 0\n    inventory.maxamount 1\n}\n\nactor RemoteC4Thrown {\n\tPROJECTILE\n\t-NOGRAVITY\n\tRadius 6\n\tHeight 8\n\tSpeed 30\n\tDamage 0\n\tScale 0.2\n\tstates {\n\tSpawn:\n\t\tRC4T C -1\n\t\tstop\n\tDeath:\n\t\tRC4T C 35 A_NoGravity // Wait one second and then become armed\n\t\tRC4T C 0 A_JumpIfInTargetInventory (\"IsBlue\", 1, \"Death.Blue\")\n\t\tRC4T C 0 A_SpawnItemEx (\"RemoteC4Armed\")\n\t\tstop\n\tDeath.Blue:\n\t\tRC4T C 0 A_SpawnItemEx (\"RemoteC4ArmedBlue\")\n\t\tstop\n\t}\n}\n\nactor RemoteC4Armed {\n\t+NOEXTREMEDEATH\n\t+NOGRAVITY\n\t+NOBLOOD\n\t+SHOOTABLE\n\t+NOTARGETSWITCH\n\tHealth 10\n\tRadius 12\n\tHeight 12\n\tMass 0x7FFFFFFF\n\tSpeed 0\n\tScale 0.2\n\tDamage 0\n\tDamageType \"Explosion\"\n\tObituary \"$OB_REMOTEC4\"\n\tDamageFactor \"Fist\", 0.0\n\tDamageFactor \"Fire\", 0.0\n\tDamageFactor \"Bullet\", 0.0\n\tDamageFactor \"Rifle\", 0.0\n\tDamageFactor \"Explosion\", 0.0\n\tDamageFactor \"Chemical\", 0.0\n\tDamageFactor \"ChemicalSpecial\", 0.0\n\tDamageFactor \"Energy\", 0.0\n\tDamageFactor \"AntiArmor\", 0.0\n\tDamageFactor \"Time\", 0.0\n\tDamageFactor \"Superweapon\", 0.0\n\tDamageFactor \"MassDriver\", 0.0\n\tDamageFactor \"Mechstomp\", 0.0\n\tDamageFactor \"Mine\", 0.0\n\tDamageFactor \"Monster\", 0.0\n\tDamageFactor \"Flash\", 0.0\n\tDamageFactor \"Deconstruction\", 0.0\n\n\tStates {\n\tSpawn:\n\t\tRC4T A 0\n\t\tRC4T A 0 A_PlaySound (\"terrorist/select\", CHAN_VOICE) // *click*\n\t\tgoto Idle\n\tIdle:\n\t\tRC4T A 0 A_JumpIfInTargetInventory (\"RemoteC4Ammo\", 4, \"Death.Disarm\")\n\t\tRC4T A 0 A_JumpIfInTargetInventory (\"C4DetonateCheck\", 1, \"Death\")\n\t\tRC4T A 5\n\t\tloop\n\tDeath:\n\t\tRC4T A 0 A_NoGravity\n\t\tRC4T A 10 A_PlaySound (\"c4/detonate\")\n\t\tTNT1 A 0 A_Explode (500, 64)\n\t\tTNT1 A 0 A_Explode (400, 196)\n\t\tTNT1 A 0 A_Explode (500, 256)\n\t\tTNT1 A 0 A_Explode (250, 640)\n\t\tgoto DeathFinish\n\tDeath.Bullet:\n\tDeath.Rifle:\n\t\tTNT1 A 0 A_Explode (500, 48)\n\t\tTNT1 A 0 A_Explode (400, 96)\n\t\tTNT1 A 0 A_Explode (500, 128)\n\t\tTNT1 A 0 A_Explode (250, 192)\n\t\tgoto DeathFinish\n\tDeathFinish:\n\t\tTNT1 A 0 A_SpawnItemEx (\"HeavyMissileQuake\")\n        TNT1 A 0 A_SpawnItemEx (\"ExplosionFlareSpawnerLarge\",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)\n\t\tTNT1 A 0 A_SpawnItemEx (\"ExplosionMainLarge\")\n\t\tTNT1 A 0 A_PlaySound (\"weapons/rocklx\", CHAN_BODY)\n\t\tTNT1 A 0 A_PlaySound (\"weapons/rocklx\", CHAN_WEAPON)\n\t\tTNT1 A 0 A_SpawnItemEx (\"FlameWallDecay\", random(-48,48), random(-48,48), 4, 0, 0, 0, 0, 0, 160)\n\t\tTNT1 A 5\n\t\tstop\n\tDeath.Disarm:\n\t\tRC4T A 35 A_PlaySound (\"c4/disarm\")\n\t\tRC4T A 1 A_FadeOut (0.05)\n\t\twait\n\t}\n}\n\n// Blue-colored remote C4 for distinguishment\nactor RemoteC4ArmedBlue : RemoteC4Armed {\n\tStates {\n\tSpawn:\n\t\tRC4T B 0\n\t\tRC4T B 0 A_PlaySound (\"terrorist/select\", CHAN_VOICE) // *click*\n\t\tgoto Idle\n\tIdle:\n\t\tRC4T B 0 A_JumpIfInTargetInventory (\"RemoteC4Ammo\", 4, \"Death.Disarm\")\n\t\tRC4T B 0 A_JumpIfInTargetInventory (\"C4DetonateCheck\", 1, \"Death\")\n\t\tRC4T B 5\n\t\tloop\n\tDeath:\n\t\tRC4T B 0 A_NoGravity\n\t\tRC4T B 10 A_PlaySound (\"c4/detonate\")\n\t\tTNT1 A 0 A_Explode (500, 64)\n\t\tTNT1 A 0 A_Explode (400, 196)\n\t\tTNT1 A 0 A_Explode (500, 256)\n\t\tTNT1 A 0 A_Explode (250, 640)\n\t\tgoto DeathFinish\n\tDeath.Bullet:\n\tDeath.Rifle:\n\t\tTNT1 A 0 A_Explode (500, 48)\n\t\tTNT1 A 0 A_Explode (400, 96)\n\t\tTNT1 A 0 A_Explode (500, 128)\n\t\tTNT1 A 0 A_Explode (250, 192)\n\t\tgoto DeathFinish\n\tDeathFinish:\n\t\tTNT1 A 0 A_SpawnItemEx (\"HeavyMissileQuake\")\n        TNT1 A 0 A_SpawnItemEx (\"ExplosionFlareSpawnerLarge\",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)\n\t\tTNT1 A 0 A_SpawnItemEx (\"ExplosionMainLarge\")\n\t\tTNT1 A 0 A_PlaySound (\"weapons/rocklx\", CHAN_BODY)\n\t\tTNT1 A 0 A_PlaySound (\"weapons/rocklx\", CHAN_WEAPON)\n\t\tTNT1 A 0 A_SpawnItemEx (\"FlameWallDecay\", random(-48,48), random(-48,48), 4, 0, 0, 0, 0, 0, 160)\n\t\tTNT1 A 5\n\t\tstop\n\tDeath.Disarm:\n\t\tRC4T B 35 A_PlaySound (\"c4/disarm\")\n\t\tRC4T B 1 A_FadeOut (0.05)\n\t\twait\n\t}\n}\n\nactor C4DetonateCheck : Inventory {}"
      },
      {
        "source": "pk3",
        "name": "actors/weapons/D-1000.txt",
        "contents": "Actor Redplasma\n{\nradius 6\nheight 5\ndamage 4\nspeed 30\nRenderStyle Add\nAlpha 0.75\ndeathsound \"weapons/plasmax\"\nProjectile\nDamageType \"Energy\"\n+NOGRAVITY\n+NOTELEPORT\n+RANDOMIZE\n+MISSILEMORE\nTranslation \"112:127=176:191\"\nstates\n{\nSpawn:\n      APLS AB 4\n      loop\nDeath:\n      APBX BCDE 4\n      stop\n      }\n}\n\nActor Blueplasma : Redplasma\n{\nTranslation \"112:120=200:207\", \"121:127=241:247\"\n}\n\nActor Bigredplasma\n{\nradius 8\nheight 8\ndamage 12\nspeed 45\nRenderStyle Add\nAlpha 1.0\nScale 0.4\nTranslation \"112:127=176:191\"\ndeathsound \"weapons/bfgx\"\nProjectile\nDamageType \"Explosion\"\n+NOGRAVITY\n+NOTELEPORT\n+RANDOMIZE\n+MISSILEMORE\nstates\n{\nSpawn:\n      BFS1 AB 4\n      loop\nDeath:\n      BFE1 A 3\n      BFE1 A 3 A_Explode(32,32)\n      BFE1 B 6\n      BFE1 C 0 A_SpawnItemEx(\"PlasmaShockWaveSmall\", 0,0,0,0,0,0,0, SXF_TRANSFERTRANSLATION)\n\t  BFE1 C 3\n\t  BFE1 C 3 A_Explode(32,64)\n\t  BFE1 DEF 6\n      stop\n    }\n}\n\nActor Bigblueplasma : Bigredplasma\n{\nTranslation \"112:120=200:207\", \"121:127=241:247\"\n}\n\nactor D-1000 : Weapon 17611\n{\n    Game Doom\n    +WEAPON.NOAUTOAIM\n    Inventory.PickupMessage \"You got the D-1000 plasma weapon, the ultimate tool 4 annihilation!\"\n    weapon.ammogive1 8\n    weapon.ammotype1 \"D1000Cell\"\n    weapon.ammotype2 \"D1000Cell\"\n    weapon.ammouse1 1\n    weapon.ammouse2 8\n    Weapon.UpSound \"weapons/select2\"\n    weapon.selectionorder 1\n    Obituary \"$OB_D1000\"\n    DropItem \"\"\n\tWeapon.PreferredSkin \"Devastator_Marine\"\n    states\n    {\n    Ready:\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n        D1VG A 1 A_WeaponReady\n\t\tloop\n    Select:\n        D1VG A 1 offset (130,154)\n\t\tD1VG A 1 offset (120,139)\n\t\tD1VG A 0 A_PlaySound(\"weapons/select07\", CHAN_AUTO)\n\t\tD1VG A 1 offset (110,125)\n\t\tD1VG A 1 offset (100,112)\n\t\tD1VG A 1 offset (90,100)\n\t\tD1VG A 1 offset (80,89)\n\t\tD1VG A 1 offset (70,79)\n\t\tD1VG A 1 offset (60,70)\n\t\tD1VG A 1 offset (50,62)\n\t\tD1VG A 1 offset (40,55)\n\t\tD1VG A 1 offset (30,49)\n\t\tD1VG A 1 offset (20,44)\n\t\tD1VG A 1 offset (15,40)\n\t\tD1VG A 1 offset (10,37)\n\t\tD1VG A 1 offset (5,34)\n\t\tD1VG A 1 offset (0,0)\n\t\tGoto Ready\n    Deselect:\n\t\tD1VG A 1 offset (4,34)\n\t\tD1VG A 1 offset (8,40)\n\t\tD1VG A 1 offset (16,49)\n\t\tD1VG A 1 offset (24,62)\n\t\tD1VG A 1 offset (32,79)\n\t\tD1VG A 1 offset (40,100)\n\t\tD1VG A 1 offset (48,125)\n\t\tD1VG A 1 offset (56,154)\n\t\tTNT1 A 0 offset (1,33)\n\t\tgoto DeselectLoop\n\tDeselectLoop:\n\t\tTNT1 AA 0 A_Lower\n\t\tTNT1 A 1 A_Lower\n\t\tloop\n    Fire:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"Fire.Blue\")\n        D1VG A 5\n        D1VG A 15 A_PlayWeaponSound(\"weapons/bfg10kf\")\n        D1VG B 4\n        D1VG C 2\n        D1VG D 2\n        D1VG E 1\n        D1VG F 1\n        D1VG J 2\n        NULL A 0 A_Recoil(3)\n        D1VG K 2 A_FireCustomMissile(\"Bigredplasma\")\n        D1VG L 2\n        D1VG D 3 A_ReFire\n        D1VG C 2 A_PlayWeaponSound(\"weapons/bfg10kcool\")\n        D1VG B 2\n        D1VG A 20\n        Goto Ready\n    Fire.Blue:\n        D1VG A 5\n        D1VG A 15 A_PlayWeaponSound(\"weapons/bfg10kf\")\n        D2VG B 4\n        D2VG C 2\n        D2VG D 2\n        D2VG E 1\n        D2VG F 1\n        D2VG J 2\n        NULL A 0 A_Recoil(3)\n        D2VG K 2 A_FireCustomMissile(\"Bigblueplasma\")\n        D2VG L 2\n        D2VG D 3 A_ReFire\n        D2VG C 2 A_PlayWeaponSound(\"weapons/bfg10kcool\")\n        D2VG B 2\n        D1VG A 20\n        Goto Ready\n    Hold:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"Hold.Blue\")\n        D1VG J 2 A_PlayWeaponSound(\"weapons/bfg10kf\")\n        D1VG K 0 A_FireCustomMissile(\"Redplasma\",10,0,0,0)\n        D1VG K 0 A_FireCustomMissile(\"Redplasma\",5,0,0,0)\n        D1VG K 0 A_FireCustomMissile(\"Redplasma\",-10,0,0,0)\n        D1VG K 0 A_FireCustomMissile(\"Redplasma\",-5,0,0,0)\n        NULL A 0 A_Recoil(3)\n        D1VG K 2 A_FireCustomMissile(\"Bigredplasma\")\n        D1VG L 2\n        D1VG D 3 A_ReFire\n        D1VG C 2 A_PlayWeaponSound(\"weapons/bfg10kcool\")\n        D1VG B 2\n        D1VG A 35\n        Goto Ready\n    Hold.Blue:\n        D2VG J 2 A_PlayWeaponSound(\"weapons/bfg10kf\")\n        D2VG K 0 A_FireCustomMissile(\"Blueplasma\",10,0,0,0)\n        D2VG K 0 A_FireCustomMissile(\"Blueplasma\",5,0,0,0)\n        D2VG K 0 A_FireCustomMissile(\"Blueplasma\",-10,0,0,0)\n        D2VG K 0 A_FireCustomMissile(\"Blueplasma\",-5,0,0,0)\n        NULL A 0 A_Recoil(3)\n        D2VG K 2 A_FireCustomMissile(\"Bigblueplasma\")\n        D2VG L 2\n        D2VG D 3 A_ReFire\n        D2VG C 2 A_PlayWeaponSound(\"weapons/bfg10kcool\")\n        D2VG B 2\n        D1VG A 35\n        Goto Ready\n    AltFire:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"AltFire.Blue\")\n        DEVG B 10 A_PlayWeaponSound(\"weapons/devchr\")\n        DEVG CDEF 10 Bright\n        DEVG A 0 A_Refire\n        DEVG J 4 Bright A_GunFlash\n        DEVG J 1 Bright A_Playsound(\"weapons/devfir\")\n        DEVG K 10 Bright A_FireCustomMissile (\"DevastatorBall\",0,1,0,0)\n        DEVG L 7 Bright\n        Goto Ready\n    AltFire.Blue:\n        DEVB B 10 A_PlayWeaponSound(\"weapons/devchr\")\n        DEVB CDEF 10 Bright\n        DEVG A 0 A_Refire\n        DEVB J 4 Bright A_GunFlash\n        DEVB J 1 Bright A_Playsound(\"weapons/devfir\")\n        DEVB K 10 Bright A_FireCustomMissile (\"DevastatorBallBlue\",0,1,0,0)\n        DEVB L 7 Bright\n        Goto Ready\n    AltHold:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"AltHold.Blue\")\n        DEVG G 1 A_PlayWeaponSound(\"weapons/devfch\")\n        DEVG G 3 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG H 4 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG I 4 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG G 4 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG H 4 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG I 4 Bright A_FireBullets(4,4,2,6,\"DevPuff\",0,64)\n        DEVG I 0 A_Refire\n        DEVG J 4 Bright A_GunFlash\n        DEVG J 1 Bright A_Playsound(\"weapons/devfir\")\n        DEVG K 10 Bright A_FireCustomMissile (\"DevastatorBall\",0,1,0,0)\n        DEVG L 7 Bright\n\t    Goto Ready\n    AltHold.Blue:\n        DEVB G 1 A_PlayWeaponSound(\"weapons/devfch\")\n        DEVB G 3 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB H 4 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB I 4 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB G 4 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB H 4 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB I 4 Bright A_FireBullets(4,4,2,6,\"DevPuffBlue\",0,64)\n        DEVB I 0 A_Refire\n        DEVB J 4 Bright A_GunFlash\n        DEVB J 1 Bright A_Playsound(\"weapons/devfir\")\n        DEVB K 10 Bright A_FireCustomMissile (\"DevastatorBallBlue\",0,1,0,0)\n        DEVB L 7 Bright\n\t    Goto Ready\n    FragGrenade:\n\t    D1VG A 1 offset (4,34)\n\t\tD1VG A 1 offset (8,40)\n\t\tD1VG A 1 offset (16,49)\n\t\tD1VG A 1 offset (24,62)\n\t\tFRAG A 1 offset (-10,49)\n\t\tFRAG A 1 offset (-20,40)\n\t\tFRAG A 1 offset (-30,34)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tFRAG BCD 2\n\t\tFRAG E 2 A_PlaySound (\"frag/pinpull\", CHAN_WEAPON)\n\t\tFRAG FG 2\n\t\tFRAG G 1 offset (0,33)\n\t\tFRAG G 1 offset (6,39)\n\t\tFRAG G 1 offset (11,46)\n\t\tFRAG G 1 offset (16,53)\n\t\tFRAG G 1 offset (21,61)\n\t\tFRAG G 1 offset (26,70)\n\t\tFRAG G 1 offset (31,80)\n\t\tFRAG G 1 offset (31,91)\n\t\tFRAG G 1 offset (36,103)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"frag/throw\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FragGrenadeThrown5\", -1, 0, 10, 15)\n\t\tTNT1 A 0 A_TakeInventory(\"FragGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tFLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n    FlashbangGrenade:\n\t    D1VG A 1 offset (4,34)\n\t\tD1VG A 1 offset (8,40)\n\t\tD1VG A 1 offset (16,49)\n\t\tD1VG A 1 offset (24,62)\n\t\tD1VG A 1 offset (32,79)\n\t\tD1VG A 1 offset (40,100)\n\t\tD1VG A 1 offset (48,125)\n\t\tD1VG A 1 offset (56,154)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"flash/flashthrow\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FlashBangGrenadeThrown5\", -1, 0, 10, 15)\n        TNT1 A 0 A_TakeInventory(\"FlashbangGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n        FLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n    RemoteC4Detonator:\n\t    D1VG A 1 offset (4,34)\n\t\tD1VG A 1 offset (8,40)\n\t\tD1VG A 1 offset (16,49)\n\t\tD1VG A 1 offset (24,62)\n\t\tD1VG A 1 offset (32,79)\n\t\tD1VG A 1 offset (40,100)\n\t\tD1VG A 1 offset (48,125)\n\t\tD1VG A 1 offset (56,154)\n\t\tTNT1 A 0 offset (1,33)\n\t\tRC4K ABCDEFGH 1\n\t\tRC4K I 2\n\t\tRC4K J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4K I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4K H 6\n\t\tRC4K G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4K FEDCBA 1\n\t\tgoto Select\n    Flash:\n        TNT1 A 5 A_Light1\n        TNT1 A 10 A_Light2\n        TNT1 A 7 A_Light1\n        TNT1 A 5 A_Light0\n        stop\n    Spawn:\n        WDEV A -1\n        stop\n    }\n}\n\nACTOR DevastatorBall\n{\n   Radius 12\n   Height 8\n   Speed 30\n   Damage 256\n   PROJECTILE\n   ExplosionRadius 256\n   ExplosionDamage 320\n   RENDERSTYLE ADD\n   ALPHA 0.90\n   Damagetype \"Explosion\"\n   +THRUGHOST\n   +EXTREMEDEATH\n   DeathSound \"weapons/devexp\"\n   Decal DevastatorLightning\n   Translation \"112:127=176:191\"\n   States\n   {\n   Spawn:\n      DBAL AB 4 Bright\n      DBAL A 4 Bright A_Explode (128,128,1)\n      DBAL A 0 Bright A_Jump (160,3)\n      DBAL AAA 0 Bright A_CustomMissile(\"LiteShot\",0,0,Random(0,360))\n      DBAL B 4 Bright A_Explode (128,128,1)\n      DBAL B 0 Bright A_Jump (160,3)\n      DBAL BBB 0 Bright A_CustomMissile(\"LiteShot\",0,0,Random(0,360))\n      Goto Spawn+2\n   Death:\n      DBAL C 5 Bright A_Explode\n      DBAL E 0 Bright A_SpawnItemEx(\"PlasmaShockWave\", 0,0,0,0,0,0,0, SXF_TRANSFERTRANSLATION)\n      DBAL EFG 5 Bright A_Explode\n      DBAL HI 3 Bright\n      stop\n   }\n}\n\nACTOR DevastatorBallBlue : DevastatorBall\n{\n   Translation \"112:120=200:207\", \"121:127=241:247\"\n   States\n   {\n   Spawn:\n      DBBL AB 4 Bright\n      DBBL A 4 Bright A_Explode (128,128,1)\n      DBBL A 0 Bright A_Jump (160,3)\n      DBBL AAA 0 Bright A_CustomMissile(\"LiteShotBlue\",0,0,Random(0,360))\n      DBBL B 4 Bright A_Explode (128,128,1)\n      DBBL B 0 Bright A_Jump (160,3)\n      DBBL BBB 0 Bright A_CustomMissile(\"LiteShotBlue\",0,0,Random(0,360))\n      Goto Spawn+2\n   Death:\n      DBBL C 5 Bright A_Explode\n      DBBL E 0 Bright A_SpawnItemEx(\"PlasmaShockWave\", 0,0,0,0,0,0,0, SXF_TRANSFERTRANSLATION)\n\t  DBBL EFG 5 Bright A_Explode\n      DBBL HI 3 Bright\n      stop\n   }\n}\n\nACTOR LiteShot\n{\n   Radius 8\n   Height 12\n   Speed 32\n   Damage 8\n   PROJECTILE\n   RENDERSTYLE ADD\n   ALPHA 0.85\n   Damagetype \"Energy\"\n   +THRUGHOST\n   +RIPPER\n   +FORCEXYBILLBOARD\n   SeeSound \"weapons/devlit\"\n   DeathSound \"weapons/devzap\"\n   States\n   {\n   Spawn:\n      DLIT AAABBBCCC 1 Bright A_SpawnItemEx(\"LiteTrail\",0,0,0,0,0,0,0,0,128)\n      Loop\n   Death:\n      DLIT DEFGHIJKLMNO 1 Bright\n      Stop\n   }\n}\n\nACTOR LiteShotBlue : LiteShot\n{\n   States\n   {\n   Spawn:\n      DLIB AAABBBCCC 1 Bright A_SpawnItemEx(\"LiteTrailBlue\",0,0,0,0,0,0,0,0,128)\n      Loop\n   Death:\n      DLIB DEFGHIJKLMNO 1 Bright\n      Stop\n   }\n}\n\nACTOR LiteTrail\n{\n   Radius 1\n   Height 1\n   PROJECTILE\n   RENDERSTYLE ADD\n   ALPHA 0.67\n   +FORCEXYBILLBOARD\n   States\n   {\n   Spawn:\n      DLIT ABC 3 Bright\n      stop\n   }\n}\n\nACTOR LiteTrailBlue : LiteTrail\n{\n   States\n   {\n   Spawn:\n      DLIB ABC 3 Bright\n      stop\n   }\n}\n\nActor DevPuff\n{\n   Radius 3\n   Height 3\n   RENDERSTYLE ADD\n   ALPHA 0.75\n   DamageType \"Energy\"\n   +ALWAYSPUFF\n   +PUFFONACTORS\n   +NOGRAVITY\n   DeathSound \"weapons/buzz\"\n   States\n   {\n   Spawn:\n      DLIT JKLJKLJKL 3 Bright\n      stop\n   Crash:\n      TNT1 A 1 Bright\n      stop\n   }\n}\n\nActor DevPuffBlue : DevPuff\n{\n   States\n   {\n   Spawn:\n      DLIB JKLJKLJKL 3 Bright\n      stop\n   Crash:\n      TNT1 A 1 Bright\n      stop\n   }\n}"
      },
      {
        "source": "pk3",
        "name": "actors/weapons/Laserchaingun.txt",
        "contents": "// Laser Chaingun\nactor LaserChaingun : AOWWeapon 21083 {\n\tObituary \"$OB_LASERCHAINGUN\" // \"%o was incinerated by %k's laser chaingun.\"\n\tAttackSound \"lchaingun/fire\"\n\tInventory.PickupMessage \"You got the laser chaingun!\"\n\tWeapon.SelectionOrder 6\n\tWeapon.Kickback 100\n\tWeapon.AmmoType \"LaserChaingunAmmo\"\n\tWeapon.AmmoUse 1\n\tWeapon.AmmoGive 50\n\tWeapon.PreferredSkin \"Minigun_Marine\"\n\tTag \"Laser Chaingun\"\n\tStates {\n\tReady:\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tLCGR BBBBC 1\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tLCGR CCCCC 1\n\t\tLCGR A 1 A_WeaponReady\n\t\tgoto Ready2\n\tReadyBlue:\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t    LCGB BBBBC 1\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t    LCGB CCCCC 1\n\t\tLCGB A 1 A_WeaponReady\n\t\tgoto Ready2\n\tReady2:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"Ready2Blue\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tLCGR A 1 A_WeaponReady\n\t\tloop\n\tReady2Blue:\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tLCGB A 1 A_WeaponReady\n\t\tloop\n\tDeselect:\n\t\tLCGR A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"AltFireOff\")\n\t\tLCGR A 0 A_JumpIfInventory (\"IsBlue\", 1, \"DeselectBlue\")\n\t\tLCGR A 1 offset (-4,34)\n\t\tLCGR A 1 offset (-8,40)\n\t\tLCGR A 1 offset (-16,49)\n\t\tLCGR A 1 offset (-24,62)\n\t\tLCGR A 1 offset (-32,79)\n\t\tLCGR A 1 offset (-40,100)\n\t\tLCGR A 1 offset (-48,125)\n\t\tLCGR A 1 offset (-56,154)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tgoto DeselectLoop\n\tDeselectBlue:\n\t\tLCGB A 1 offset (-4,34)\n\t\tLCGB A 1 offset (-8,40)\n\t\tLCGB A 1 offset (-16,49)\n\t\tLCGB A 1 offset (-24,62)\n\t\tLCGB A 1 offset (-32,79)\n\t\tLCGB A 1 offset (-40,100)\n\t\tLCGB A 1 offset (-48,125)\n\t\tLCGB A 1 offset (-56,154)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tgoto DeselectLoop\n\tDeselectLoop:\n\t\tTNT1 AA 0 A_Lower\n\t\tTNT1 A 1 A_Lower\n\t\tloop\n\tSelect:\n\t\tLCGR AA 0 A_JumpIfInventory (\"IsBlue\", 1, \"SelectBlue\")\n\t\tLCGR A 1 offset (-130,154)\n\t\tLCGR A 1 offset (-120,139)\n\t\tLCGR A 0 A_PlaySound(\"weapons/select13\", CHAN_AUTO)\n\t\tLCGR B 1 offset (-110,125)\n\t\tLCGR C 1 offset (-100,112)\n\t\tLCGR C 1 offset (-90,100)\n\t\tLCGR A 1 offset (-80,89)\n\t\tLCGR A 1 offset (-70,79)\n\t\tLCGR B 1 offset (-60,70)\n\t\tLCGR B 1 offset (-50,62)\n\t\tLCGR B 1 offset (-40,55)\n\t\tLCGR C 1 offset (-30,49)\n\t\tLCGR C 1 offset (-20,44)\n\t\tLCGR C 1 offset (-15,40)\n\t\tLCGR A 1 offset (-10,37)\n\t\tLCGR A 1 offset (-5,34)\n\t\tLCGR A 1 offset (0,0)\n\t\tGoto Ready\n\tSelectBlue:\n\t\tLCGB A 1 offset (-130,154)\n\t\tLCGB A 1 offset (-120,139)\n\t\tLCGB A 0 A_PlaySound(\"weapons/select13\", CHAN_AUTO)\n\t\tLCGB B 1 offset (-110,125)\n\t\tLCGB C 1 offset (-100,112)\n\t\tLCGB C 1 offset (-90,100)\n\t\tLCGB A 1 offset (-80,89)\n\t\tLCGB A 1 offset (-70,79)\n\t\tLCGB B 1 offset (-60,70)\n\t\tLCGB B 1 offset (-50,62)\n\t\tLCGB B 1 offset (-40,55)\n\t\tLCGB C 1 offset (-30,49)\n\t\tLCGB C 1 offset (-20,44)\n\t\tLCGB C 1 offset (-15,40)\n\t\tLCGB A 1 offset (-10,37)\n\t\tLCGB A 1 offset (-5,34)\n\t\tLCGB A 1 offset (0,0)\n\t\tGoto ReadyBlue\n\tFire:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready2\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready2\")\n\t\tLCGR A 0 A_JumpIfInventory (\"IsBlue\", 1, \"FireBlue\")\n\t\tLCGR A 2 Offset(1,29) A_CheckReload\n\t\tLCGR B 0 A_GunFlash\n\t\tLCGR B 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGR B 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuff\",1,4000)\n\t\tLCGR B 0 BRIGHT A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGR B 1 Offset(2,30) BRIGHT\n\t\tLCGR C 2 A_CheckReload\n\t\tLCGR A 0 A_GunFlash\n\t\tLCGR A 0 A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGR A 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGR A 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuff\",0,4000)\n\t\tLCGR A 0 BRIGHT A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGR A 1 Offset(1,31) BRIGHT A_RailAttack(0, 4.8, 1, none, \"FF 00 00\", 1, 0.0, \"LaserPuff\")\n\t\tLCGR B 2 Offset(0,30) A_CheckReload\n\t\tLCGR B 0 A_GunFlash\n\t\tLCGR C 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGR C 0 A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGR C 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuff\",1,4000)\n\t\tLCGR C 1 BRIGHT\n\t\tLCGR A 0 A_ReFire\n\t\tLCGR ABCABC 2\n\t\tgoto Ready2\n\tFireBlue:\n\t\tLCGB A 2 Offset(1,29) A_CheckReload\n\t\tLCGB A 0 A_GunFlash\n\t\tLCGB B 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGB B 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuffBlue\",1,4000)\n\t\tLCGB B 0 BRIGHT A_SpawnItemEx(\"LaserChainGunLightBlue\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGB B 1 Offset(2,30) BRIGHT\n\t\tLCGB C 2 A_CheckReload\n\t\tLCGB A 0 A_GunFlash\n\t\tLCGB A 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGB A 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuffBlue\",0,4000)\n\t\tLCGB A 0 BRIGHT A_SpawnItemEx(\"LaserChainGunLightBlue\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGB A 1 Offset(1,31) BRIGHT A_RailAttack(0,4.8,1,none, \"00 80 FF\" ,1,0.0,\"LaserPuffBlue\")\n\t\tLCGB B 2 Offset(0,30) A_CheckReload\n\t\tLCGB B 0 A_GunFlash\n\t\tLCGB C 0 A_PlayWeaponSound(\"lchaingun/fire\")\n\t\tLCGB C 0 A_SpawnItemEx(\"LaserChainGunLightBlue\",35*(1-(sin(pitch)*0.8)),4.5,34*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tLCGB C 0 A_FireBullets (1.0, 1.0, -1, 4, \"LaserPuffBlue\",1,4000)\n\t\tLCGB C 1 BRIGHT\n\t\tLCGB A 0 A_ReFire\n\t\tLCGB ABCABC 2\n\t\tgoto Ready2\n\tAltFire:\n\t\tLCGR A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"AltFireOff\")\n\t\tLCGR A 0 A_JumpIfInventory (\"IsBlue\", 1, \"AltFireBlue\")\n\t\tLCGR A 0 A_GiveInventory (\"IsZoomed\", 1)\n\t\tLCGR A 0 A_PlaySound (\"lchaingun/zoomin\")\n\t\tLCGR A 18 A_ZoomFactor (2.5)\n\t\tgoto Ready2\n\tAltFireOff:\n\t\tLCGR AA 0 A_JumpIfInventory (\"IsBlue\", 1, \"AltFireOffBlue\")\n\t\tLCGR A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGR A 17 A_ZoomFactor (1.0)\n\t\tLCGR A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto Ready2\n\tAltFireBlue:\n\t\tLCGB A 0 A_GiveInventory (\"IsZoomed\", 1)\n\t\tLCGB A 0 A_PlaySound (\"lchaingun/zoomin\")\n\t\tLCGB A 18 A_ZoomFactor (2.5)\n\t\tgoto Ready2\n\tAltFireOffBlue:\n\t\tLCGB A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGB A 17 A_ZoomFactor (1.0)\n\t\tLCGB A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto Ready2\n    FragGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FragGrenadeZoomOut\")\n        TNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,\"FragGrenadeBlue\")\n\t\tLCGR A 1 offset (-4,34)\n\t\tLCGR A 1 offset (-8,40)\n\t\tLCGR A 1 offset (-16,49)\n\t\tLCGR A 1 offset (-24,62)\n\t\tgoto FragGrenade2\n    FragGrenadeBlue:\n\t\tLCGB A 1 offset (-4,34)\n\t\tLCGB A 1 offset (-8,40)\n\t\tLCGB A 1 offset (-16,49)\n\t\tLCGB A 1 offset (-24,62)\n\t\tgoto FragGrenade2\n\tFragGrenade2:\n\t\tFRAG A 1 offset (-10,49)\n\t\tFRAG A 1 offset (-20,40)\n\t\tFRAG A 1 offset (-30,34)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tFRAG BCD 2\n\t\tFRAG E 2 A_PlaySound (\"frag/pinpull\", CHAN_WEAPON)\n\t\tFRAG FG 2\n\t\tFRAG G 1 offset (0,33)\n\t\tFRAG G 1 offset (6,39)\n\t\tFRAG G 1 offset (11,46)\n\t\tFRAG G 1 offset (16,53)\n\t\tFRAG G 1 offset (21,61)\n\t\tFRAG G 1 offset (26,70)\n\t\tFRAG G 1 offset (31,80)\n\t\tFRAG G 1 offset (31,91)\n\t\tFRAG G 1 offset (36,103)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"frag/throw\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FragGrenadeThrown5\", -1, 0, 10, 15)\n\t\tTNT1 A 0 A_TakeInventory(\"FragGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tFLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n\tFragGrenadeZoomOut:\n\t\tLCGR AA 0 A_JumpIfInventory (\"IsBlue\", 1, \"FragGrenadeZoomOutBlue\")\n\t\tLCGR A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGR A 17 A_ZoomFactor (1.0)\n\t\tLCGR A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto FragGrenade\n\tFragGrenadeZoomOutBlue:\n\t\tLCGB A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGB A 17 A_ZoomFactor (1.0)\n\t\tLCGB A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto FragGrenade\n    FlashbangGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FlashbangGrenadeZoomOut\")\n\t    TNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,\"FlashbangGrenadeBlue\")\n\t\tLCGR A 1 offset (-4,34)\n\t\tLCGR A 1 offset (-8,40)\n\t\tLCGR A 1 offset (-16,49)\n\t\tLCGR A 1 offset (-24,62)\n\t\tLCGR A 1 offset (-32,79)\n\t\tLCGR A 1 offset (-40,100)\n\t\tLCGR A 1 offset (-48,125)\n\t\tLCGR A 1 offset (-56,154)\n\t\tgoto FlashbangGrenade2\n    FlashbangGrenadeBlue:\n\t\tLCGB A 1 offset (-4,34)\n\t\tLCGB A 1 offset (-8,40)\n\t\tLCGB A 1 offset (-16,49)\n\t\tLCGB A 1 offset (-24,62)\n\t\tLCGB A 1 offset (-32,79)\n\t\tLCGB A 1 offset (-40,100)\n\t\tLCGB A 1 offset (-48,125)\n\t\tLCGB A 1 offset (-56,154)\n\t\tgoto FlashbangGrenade2\n    FlashbangGrenade2:\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"flash/flashthrow\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FlashBangGrenadeThrown5\", -1, 0, 10, 15)\n        TNT1 A 0 A_TakeInventory(\"FlashbangGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n        FLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select\n\tFlashbangGrenadeZoomOut:\n\t\tLCGR AA 0 A_JumpIfInventory (\"IsBlue\", 1, \"FlashbangGrenadeZoomOutBlue\")\n\t\tLCGR A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGR A 17 A_ZoomFactor (1.0)\n\t\tLCGR A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto FlashbangGrenade\n\tFlashbangGrenadeZoomOutBlue:\n\t\tLCGB A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGB A 17 A_ZoomFactor (1.0)\n\t\tLCGB A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto FlashbangGrenade\n    RemoteC4Detonator:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"RemoteC4DetonatorZoomOut\")\n\t    TNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,\"RemoteC4DetonatorBlue\")\n\t\tLCGR A 1 offset (-4,34)\n\t\tLCGR A 1 offset (-8,40)\n\t\tLCGR A 1 offset (-16,49)\n\t\tLCGR A 1 offset (-24,62)\n\t\tLCGR A 1 offset (-32,79)\n\t\tLCGR A 1 offset (-40,100)\n\t\tLCGR A 1 offset (-48,125)\n\t\tLCGR A 1 offset (-56,154)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tgoto RemoteC4Detonator2\n    RemoteC4DetonatorBlue:\n\t\tLCGB A 1 offset (-4,34)\n\t\tLCGB A 1 offset (-8,40)\n\t\tLCGB A 1 offset (-16,49)\n\t\tLCGB A 1 offset (-24,62)\n\t\tLCGB A 1 offset (-32,79)\n\t\tLCGB A 1 offset (-40,100)\n\t\tLCGB A 1 offset (-48,125)\n\t\tLCGB A 1 offset (-56,154)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tgoto RemoteC4Detonator2\n\tRemoteC4Detonator2:\n\t\tRC4K ABCDEFGH 1\n\t\tRC4K I 2\n\t\tRC4K J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4K I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4K H 6\n\t\tRC4K G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4K FEDCBA 1\n\t\tgoto Select\n\tRemoteC4DetonatorZoomOut:\n\t\tLCGR AA 0 A_JumpIfInventory (\"IsBlue\", 1, \"RemoteC4DetonatorZoomOutBlue\")\n\t\tLCGR A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGR A 17 A_ZoomFactor (1.0)\n\t\tLCGR A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto RemoteC4Detonator\n\tRemoteC4DetonatorZoomOutBlue:\n\t\tLCGB A 0 A_PlaySound (\"lchaingun/zoomout\")\n\t\tLCGB A 17 A_ZoomFactor (1.0)\n\t\tLCGB A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tgoto RemoteC4Detonator\n\tSpawn:\n\t\tLSCL X -1\n\t\tstop\n\n\t//External flash stuff ohoy\n\t// [Dusk] oh jesus blox\n\tFlash:\n\t\tTNT1 A 0 A_JumpIf (ACS_ExecuteWithResult(910, 0) == 0,\"Flash.Software\") // Ups software framerate by quite a bit.\n\t\tTNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(909,0) <= -1,\"Flash.Less\") //50% Less flashes with aow_fx < 0\n\t\tTNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(909,0) >= 1,\"Flash.More\") //MOAR with > 0\n\t\tTNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,2)\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE) //If 0, just one.\n\t\tGoto Flash+6 //Jump to A_Light2\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLightBlue\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tTNT1 A 2 A_Light2\n\t\tTNT1 A 1 A_Light1\n\t\tgoto LightDone\n\tFlash.Software:\n\t\tTNT1 A 0 //Nothing!!\n\t\tgoto Flash+6\n\tFlash.Less:\n\t\tTNT1 A 0 A_Jump(128,\"LightDone\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,2)\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLight\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tgoto LightDone\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLightBlue\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tgoto LightDone\n\tFlash.More:\n\t\tTNT1 A 0 A_Light2\n\t\tTNT1 A 0 A_JumpIfInventory(\"IsBlue\",1,4)\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLight2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tTNT1 A 1 A_SpawnItemEx(\"LaserChainGunLight2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tTNT1 A 1 A_SpawnItemEx(\"LaserChainGunLight2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tgoto Flash+7\n\t\tTNT1 A 0 A_SpawnItemEx(\"LaserChainGunLightBlue2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tTNT1 A 1 A_SpawnItemEx(\"LaserChainGunLightBlue2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tTNT1 A 1 A_SpawnItemEx(\"LaserChainGunLightBlue2\",35*(1-(sin(pitch)*0.8)),4.5,32*(1-(sin(pitch)*0.8)),0,0,0,0,SXF_CLIENTSIDE)\n\t\tgoto Flash+7\n\t//External flash stahp\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "actors/weapons/SniperRifle.txt",
        "contents": "// Sniper rifle\nactor Sniper_Rifle : AOWWeapon {\n\tobituary \"$OB_SNIPER\" // \"%o was picked off by %k's Sniper Rifle.\"\n\tattacksound \"rc50/fire\"\n\tweapon.selectionorder 3\n\tweapon.kickback 80\n\tweapon.ammotype \"SniperAmmo\"\n\tweapon.ammouse 1\n\tweapon.ammogive 8\n\tinventory.pickupmessage \"You got the sniper rifle!\"\n\t+NOEXTREMEDEATH\n\tWeapon.PreferredSkin \"Sniper_Rifle_Marine\"\n\tstates {\n\tReady:\n\t\tSNIE AA 0 A_JumpIfInventory (\"IsZoomed\", 1, \"ReadyZoomed\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tSNIE A 1 A_WeaponReady\n\t\tgoto Ready+2\n\tReadyZoomed:\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFragGrenade\",1,\"FragGrenade\")\n        TNT1 A 0 A_JumpIfInventory(\"ThrowFlashbangGrenade\",1,\"FlashbangGrenade\")\n\t\tTNT1 A 0 A_JumpIfInventory(\"UseRemoteC4Detonator\",1,\"RemoteC4Detonator\")\n\t\tSRFZ A 1 A_WeaponReady(WRF_NOBOB)\n\t\tloop\n\tDeselect:\n\t\tSNIE AA 0 A_JumpIfInventory (\"IsZoomed\", 1, \"AltFireOff\")\n\t\tSNIV ABCDEFGHIJKLMNO 1 A_Lower\n\t\twait\n\tSelect:\n\t    SNIW O 0 A_PlaySound(\"weapons/select10\", CHAN_AUTO)\n\t\tSNIW ONMLKJIHGFEDCBA 1 A_Raise\n\t\tWait\n\tSelect.Sniper_Rifle:\n\t\tSNIE A 1 offset (-130,154)\n\t\tSNIE A 1 offset (-120,139)\n\t\tSNIE A 0 A_PlaySound(\"weapons/select10\", CHAN_AUTO)\n\t\tSNIE A 1 offset (-110,125)\n\t\tSNIE A 1 offset (-100,112)\n\t\tSNIE A 1 offset (-90,100)\n\t\tSNIE A 1 offset (-80,89)\n\t\tSNIE A 1 offset (-70,79)\n\t\tSNIE A 1 offset (-60,70)\n\t\tSNIE A 1 offset (-50,62)\n\t\tSNIE A 1 offset (-40,55)\n\t\tSNIE A 1 offset (-30,49)\n\t\tSNIE A 1 offset (-20,44)\n\t\tSNIE A 1 offset (-15,40)\n\t\tSNIE A 1 offset (-10,37)\n\t\tSNIE A 1 offset (-5,34)\n\t\tSNIE A 1 offset (0,0)\n\t\tGoto Ready\n\tFire:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FireZoomed\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsSniper\", 1, \"Fire_2\")\n\t\tSNIP F 0 A_GunFlash\n\t\tSNIF F 0 A_FireBullets (5.0, 5.0, -1, 17, \"RiflePuff\")\n\t\tgoto Reload\n\tFire_2:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsInSpawnRoom\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"InMenu\", 1, \"Ready\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FireZoomed\")\n\t\tSNIP A 0 A_GunFlash\n\t\tSNIF F 0 A_FireBullets (5.0, 5.0, -1, 25, \"RiflePuff\")\n\t\tgoto Reload\n\tReload:\n\t\tSNIF F 2 BRIGHT\n\t\tSNIE A 8\n\t\tSNIR ABCDEFGHIJ 2\n\t\tSNIR C 5 offset (0, 40) A_PlaySound (\"rc50/boltopen\")\n\t\tSNIR C 5 offset (0, 35) A_SpawnItemEx(\"RifleShellCasing\",3,15,30,random(-2,-4),random(2,3),random(0,-1),random(45,60),128)\n\t\tSNIR C 10 offset (0, 33) A_PlaySound (\"rc50/boltclose\")\n\t\tSNIR BA 3\n\t\tSNIE A 1 A_ReFire\n\t\tgoto Ready\n\tFireZoomed:\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsSniper\", 1, \"FireZoomed_2\")\n\t\tSRFZ A 0 A_ZoomFactor (5.8)\n\t\tSRFZ A 0 A_RailAttack (50, 0, 0, none, none, 1, 0, \"RiflePuff\")\n\t\tSRFZ A 2 bright A_FireBullets (0.0, 0.0, 1, 0, \"RiflePuff\")\n\t\tSRFZ A 0 A_ZoomFactor (6.00)\n\t\tgoto ReloadZoomed\n\tFireZoomed_2:\n\t\tSRFZ A 0 A_ZoomFactor (5.8)\n\t\tSRFZ A 0 A_RailAttack (75, 0, 0, none, none, 1, 0, \"RiflePuff\")\n\t\tSRFZ A 2 bright A_FireBullets (0.0, 0.0, 1, 0, \"RiflePuff\")\n\t\tgoto ReloadZoomed\n\tReloadZoomed:\n\t\tSRFZ A 0 A_ZoomFactor (6.00)\n\t\tSRFZ A 28\n\t\tSRFZ A 5 A_PlaySound (\"rc50/boltopen\")\n\t\tSRFZ A 5 A_SpawnItemEx(\"RifleShellCasing\",3,15,30,random(-2,-4),random(2,3),random(0,-1),random(45,60),128)\n\t\tSRFZ A 10 A_PlaySound (\"rc50/boltclose\")\n\t\tSRFZ A 6\n\t\tSRFZ A 1 A_ReFire\n\t\tgoto Ready\n\tAltFire:\n\t\tSNIE A 1 A_JumpIfInventory (\"IsZoomed\", 1, \"AltFireOff\")\n\t\tSNIE A 0 ACS_ExecuteAlways (916, 0, 0)\n\t\tSNIE A 0 A_GiveInventory (\"IsZoomed\", 1)\n\t\tSNIE A 0 A_PlaySound (\"rc50/zoomin\")\n\t\tSNIE A 7\n\t\tTNT1 A 10 A_ZoomFactor (6.0)\n\t\tgoto Ready\n\tAltFireOff:\n\t\tSRFZ A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tSRFZ A 0 A_PlaySound (\"rc50/zoomout\")\n\t\tSRFZ A 3 A_ZoomFactor (1.0)\n\t\tSRFZ A 7 ACS_ExecuteAlways (916, 0, 0)\n\t\tSNIE A 10\n\t\tgoto Ready\n    FragGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FragGrenadeZoomOut\")\n        SNIE A 1 offset (-4,34)\n\t\tSNIE A 1 offset (-8,40)\n\t\tSNIE A 1 offset (-16,49)\n\t\tSNIE A 1 offset (-24,62)\n\t\tFRAG A 1 offset (-10,49)\n\t\tFRAG A 1 offset (-20,40)\n\t\tFRAG A 1 offset (-30,34)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tFRAG BCD 2\n\t\tFRAG E 2 A_PlaySound (\"frag/pinpull\", CHAN_WEAPON)\n\t\tFRAG FG 2\n\t\tFRAG G 1 offset (0,33)\n\t\tFRAG G 1 offset (6,39)\n\t\tFRAG G 1 offset (11,46)\n\t\tFRAG G 1 offset (16,53)\n\t\tFRAG G 1 offset (21,61)\n\t\tFRAG G 1 offset (26,70)\n\t\tFRAG G 1 offset (31,80)\n\t\tFRAG G 1 offset (31,91)\n\t\tFRAG G 1 offset (36,103)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"frag/throw\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FragGrenadeThrown5\", -1, 0, 10, 15)\n\t\tTNT1 A 0 A_TakeInventory(\"FragGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tFLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select.Sniper_Rifle\n\tFragGrenadeZoomOut:\n\t\tSRFZ A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tSRFZ A 0 A_PlaySound (\"rc50/zoomout\")\n\t\tSRFZ A 3 A_ZoomFactor (1.0)\n\t\tSRFZ A 7 ACS_ExecuteAlways (916, 0, 0)\n\t\tSNIE A 10\n\t\tgoto FragGrenade\n    FlashbangGrenade:\n\t    TNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"FlashbangGrenadeZoomOut\")\n        SNIE A 1 offset (-4,34)\n\t\tSNIE A 1 offset (-8,40)\n\t\tSNIE A 1 offset (-16,49)\n\t\tSNIE A 1 offset (-24,62)\n\t\tSNIE A 1 offset (-32,79)\n\t\tSNIE A 1 offset (-40,100)\n\t\tSNIE A 1 offset (-48,125)\n\t\tSNIE A 1 offset (-56,154)\n\t\tTNT1 A 10\n\t    FLSH E 1 offset (-1,33)\n\t\tFLSH E 0 A_PlaySound (\"flash/flashthrow\", CHAN_WEAPON)\n\t\tFLSH E 0 A_FireCustomMissile (\"FlashBangGrenadeThrown5\", -1, 0, 10, 15)\n        TNT1 A 0 A_TakeInventory(\"FlashbangGrenadeAmmo\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n\t\tTNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n        FLSH E 1 offset (-1,39)\n        FLSH E 1 offset (-21,46)\n        FLSH F 1 offset (-41,54)\n\t\tFLSH F 1 offset (-61,62)\n        FLSH F 1 offset (-81,72)\n        FLSH G 1 offset (-91,85)\n        FLSH G 1 offset (-101,100)\n        FLSH G 1 offset (-111,120)\n\t\tgoto Select.Sniper_Rifle\n\tFlashbangGrenadeZoomOut:\n\t\tSRFZ A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tSRFZ A 0 A_PlaySound (\"rc50/zoomout\")\n\t\tSRFZ A 3 A_ZoomFactor (1.0)\n\t\tSRFZ A 7 ACS_ExecuteAlways (916, 0, 0)\n\t\tSNIE A 10\n\t\tgoto FlashbangGrenade\n    RemoteC4Detonator:\n\t    TNT1 A 0 A_JumpIfInventory (\"IsZoomed\", 1, \"RemoteC4DetonatorZoomOut\")\n        SNIE A 1 offset (-4,34)\n\t\tSNIE A 1 offset (-8,40)\n\t\tSNIE A 1 offset (-16,49)\n\t\tSNIE A 1 offset (-24,62)\n\t\tSNIE A 1 offset (-32,79)\n\t\tSNIE A 1 offset (-40,100)\n\t\tSNIE A 1 offset (-48,125)\n\t\tSNIE A 1 offset (-56,154)\n\t\tTNT1 A 0 offset (-1,33)\n\t\tRC4K ABCDEFGH 1\n\t\tRC4K I 2\n\t\tRC4K J 2 A_PlaySound (\"c4/remote2\", CHAN_WEAPON)\n\t\tRC4K I 4 A_GiveInventory (\"C4DetonateCheck\", 1)\n\t\tRC4K H 6\n\t\tRC4K G 1 A_TakeInventory (\"C4DetonateCheck\", 666)\n        TNT1 A 0 A_TakeInventory(\"ThrowFragGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"ThrowFlashbangGrenade\",1)\n        TNT1 A 0 A_TakeInventory(\"UseRemoteC4Detonator\",1)\n\t\tRC4K FEDCBA 1\n\t\tgoto Select.Sniper_Rifle\n\tRemoteC4DetonatorZoomOut:\n\t\tSRFZ A 0 A_TakeInventory (\"IsZoomed\", 1)\n\t\tSRFZ A 0 A_PlaySound (\"rc50/zoomout\")\n\t\tSRFZ A 3 A_ZoomFactor (1.0)\n\t\tSRFZ A 7 ACS_ExecuteAlways (916, 0, 0)\n\t\tSNIE A 10\n\t\tgoto RemoteC4Detonator\n\tFlash:\n\t\tTNT1 A 2 A_Light1\n\t\tTNT1 A 2 A_Light2\n\t\tTNT1 A 0 A_Light0\n\t\tstop\n\tSpawn:\n\t\tSNIP X -1\n\t\tstop\n\t}\n}\n\nactor IsZoomed : Inventory {}"
      },
      {
        "source": "pk3",
        "name": "actors/mechs/Tortoise.txt",
        "contents": "actor Tortoise : MechPlayer_Base {\n\tHealth 3500\n\tRadius 40\n\tHeight 64\n\tMass 4000\n\tPlayer.DisplayName \"Tortoise\"\n\tPlayer.ForwardMove 0.35\n\tPlayer.SideMove 0.15\n\tPlayer.MaxHealth 3500\n\tPlayer.ViewHeight 48\n\tPlayer.AttackZOffset 13\n\tPlayer.MorphWeapon \"TortoiseWeapons\"\n\tStates {\n\tSpawn:\n\t\tROB2 Q 0\n\t\tROB2 Q 0 SetPlayerProperty (0, 0, 3)\n\t\tROB2 Q 0 ACS_ExecuteAlways (SC_STEALTH, 0, STEALTH_FORCEOFF)\n\t\tROB2 Q 0 ACS_Execute (315, 0)\n\t\tROB2 Q 0 A_GiveInventory (\"MechEjectButton\", 1)\n\t\tROB2 Q 0 A_GiveInventory (\"IsMech\",1)\n\t\tROB2 Q 35\n\t\tROB2 QQQQ 35 A_PlaySound (\"mech/idle\", 5, 1.0, 1, ATTN_NONE)\n\t\tROB2 Q 35\n\t\tloop\n\tSee:\n\t\tROB2 A 0 SetPlayerProperty(0,0,3)\n\t\tROB2 AB 7 A_JumpIfHealthLower (500,\"SeeDamaged\")\n\t\tROB2 C 0 A_PlaySound (\"mech/idle\", 5, 1.0, 1, ATTN_NONE)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepSmokePuff\", 0, -32, 4)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepDamageWeak\", 0, -32, 4)\n\t\tROB2 CD 7\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepSmokePuff\", 0, 32, 4)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepDamageWeak\", 0, 32, 4)\n\t\tROB2 A 0 A_JumpIf (waterlevel >= 1, \"Drown\")\n\t\tGoto Spawn\n\tSeeDamaged:\n\t\tROB2 C 0 A_PlaySound (\"mech/idle\", 5, 1.0, 1, ATTN_NONE)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepSmokePuff\", 0, -32, 4)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepDamageWeak\", 0, -32, 4)\n\t\tROB2 C 0 A_SpawnItemEx(\"EjectedMechSmokePuff\",random(-32,32),random(-32,32),random(54,72),0,0,3,0,0,0)\n\t\tROB2 CD 7\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepSmokePuff\", 0, 32, 4)\n\t\tROB2 Q 0 A_SpawnItemEx (\"MechStepDamageWeak\", 0, 32, 4)\n\t\tROB2 A 0 A_SpawnItemEx(\"EjectedMechSmokePuff\",random(-32,32),random(-32,32),random(54,72),0,0,3,0,0,0)\n\t\tROB2 A 0 A_JumpIf (waterlevel >= 1, \"Drown\")\n\t\tGoto Spawn\n\tDrown:\n\t\tTNT1 A 0 Thing_Damage (0, 500, 12)\n\t\tgoto Spawn\n\tDeath:\n\t\tROB2 A 0 A_StopSound (6)\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsKamikaze\", 1, \"Death.IonExplosion\")\n\t\tTNT1 A 0 A_JumpIfInventory (\"IsBombCrate\", 1, \"Death.BombExplosion\")\n\tDeathGo:\n\t\tROB2 A 10 A_NoBlocking\n\t\tROB2 A 0 A_StopSound (5)\n\t\tROB2 A 0 A_StopSound (CHAN_WEAPON)\n\t\tROB2 A 35 A_SpawnItemEx (\"MechExplosionSmall\", 0,0,0,0,0,0,0, SXF_NOCHECKPOSITION)\n\t\tDISR Z -1 A_SetTranslucent(0,0.0)\n\t\tStop\n\tDeath.IonExplosion:\n\t\tROB2 A 0\n\t\tROB2 A 0 A_JumpIfInventory (\"IsBlue\", 1, \"Death.NukeExplosion\")\n\t\tROB2 A 0 A_SpawnItemEx (\"BlueStrikeKamikaze\", 0, 0, 32)\n\t\tgoto DeathGo\n\tDeath.NukeExplosion:\n\t\tROB2 A 0\n\t\tROB2 A 0 A_SpawnItemEx (\"NukeKamikaze\", 0, 0, 32)\n\t\tgoto DeathGo\n\tDeath.BombExplosion:\n\t\tROB2 A 0\n\t\tROB2 A 0 A_SpawnItemEx(\"BombExplosion\")\n\t\tgoto DeathGo\n\t}\n}\n\nactor TortoiseUsed : Tortoise {\n\tHealth 1750\n}\n\nactor PowerTortoise : AOWMorph {\n\tPowerMorph.PlayerClass \"Tortoise\"\n}\n\nactor PowerTortoise2 : AOWMorph {\n\tPowerMorph.PlayerClass \"TortoiseUsed\"\n}\n\nactor TortoiseSwitch : PermanentPowerup {\n\tPowerup.Type \"Tortoise\"\n}\n\nactor TortoiseSwitch2 : PermanentPowerup {\n\tPowerup.Type \"Tortoise2\"\n}\n\nactor TortoiseSwitchPickup : CustomInventory {\n\t+INVENTORY.AUTOACTIVATE\n\tInventory.PickupSound \"mech/start\"\n\tTranslation \"112:127=[255,255,255]:[0,0,0]\"\n\tStates {\n\tSpawn:\n\t\tROB2 A -1\n\t\tstop\n\tPickup:\n\t\tROB2 A 0 ACS_ExecuteWithResult (353, 0)\n\t\tstop\n\tUse:\n\t\tRAVN I 0 A_GiveInventory (\"TortoiseSwitch2\", 1)\n\t\tstop\n\t}\n}\n\nactor TortoiseWeapons : AOWWeapon {\n\tWeapon.SelectionOrder 1\n\tObituary \"$OB_TORTOISE\"\n\t+WEAPON.CHEATNOTWEAPON\n\t+WEAPON.DONTBOB\n\tWeapon.PreferredSkin \"Tortoise\"\n\tstates {\n\tReady:\n\t\tMHUD A 1 A_WeaponReady\n\t\twait\n\tDeselect:\n\t\tMHUD A 0 A_JumpIfHealthLower(1,1)\n\t\tgoto Ready\n\t\tTNT1 A 1 A_Lower\n\t\twait\n\tSelect:\n\t\tMHUD A 0\n\t\tMHUD AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise\n\t\tMHUD A 1 A_Raise\n\t\twait\n\tFire:\n\t\tMHUD A 0 A_JumpIfInventory(\"Wolverine-WhatWeapon\",2,\"Fire.Machinegun\")\n\t\tMHUD A 0 A_JumpIfInventory(\"Wolverine-WhatWeapon\",1,\"Fire.Grenades\")\n\t\t//Continue firing Blaster\n\t\tMHUD C 0 A_JumpIfInventory (\"Tortoise-BlasterAmmo\", 1, 1)\n\t\tgoto NoAmmo\n\t\tMHUD A 0 A_PlaySound (\"Tortoise/BlasterFire\", CHAN_WEAPON)\n\t\tMHUD A 0 A_TakeInventory (\"Tortoise-BlasterAmmo\", 1)\n\t\tMHUD A 0 Radius_Quake (1, 4, 0, 1, 0)\n\t\tMHUD D 0 A_FireCustomMissile (\"TortoiseBlasterShot\", Random(1, -1), 0, 24, -4)\n\t\tMHUD D 3 bright A_GunFlash\n\t\tMHUD C 1\n\t\tMHUD C 4 A_Refire\n\t\tGoto Ready\n\tFire.Grenades:\n\t\tMHUD A 0 A_JumpIfInventory(\"Reload-LRM\", 1, \"Fire.Machinegun\")\n\t\tMHUD A 8 A_JumpIfInventory(\"Tortoise-GrenadeAmmo\",16,1)\n\t\tGoto NoAmmo\n\t\tMHUD A 4 Bright A_GunFlash\n\t\tMHUD A 0 A_PlayWeaponSound (\"Tortoise/GrenadeFire\")\n\t\tMHUD B 0 Radius_Quake (2,20,0,1,0)\n\t\tMHUD A 0 A_TakeInventory (\"Tortoise-GrenadeAmmo\", 16)\n\t\tMHUD A 0 ACS_ExecuteAlways (319, 0, 1, 4) // reload\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade1\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade1\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade2\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade2\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade3\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade3\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade4\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade4\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n\t    MHUD B 0 Bright A_PlayWeaponSound(\"Tortoise/GrenadeFire\")\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade1\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade1\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade2\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade2\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade3\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade3\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade4\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n        MHUD B 0 Bright A_FireCustomMissile(\"ImpactGrenade4\", Random(-9, 9), 0, -18, 0, 0, Random(-2, 6))\n\t\tMHUD A 16\n\t\tMHUD A 2 A_Refire\n\t\tgoto Ready\n\tFire.Machinegun:\n\t\tMHUD A 10 A_JumpIfInventory(\"Tortoise-MachinegunAmmo\",2,2)\n\t\tGoto NoAmmo\n\t\tMHUD B 0 Radius_Quake(2,8,0,1,0)\n\t\tMHUD A 0 A_GunFlash\n\t\tMHUD A 0 A_PlayWeaponSound(\"Tortoise/Machinegun\")\n\t\tMHUD A 0 A_TakeInventory(\"Tortoise-MachinegunAmmo\",1)\n\t\tMHUD B 0 A_SpawnItemEx(\"RifleShellCasing\",2,8,30,random(-3,-1),random(0,1),random(1,3),random(-60,-45),128)\n\t\tMHUD B 3 BRIGHT A_FireBullets (2.6, 2.6, -1, 10, \"RiflePuff\")\n\t\tMHUD A 1\n\t\tMHUD B 0 A_GunFlash\n\t\tMHUD B 0 A_PlayWeaponSound(\"Tortoise/Machinegun\")\n\t\tMHUD A 0 A_TakeInventory(\"Tortoise-MachinegunAmmo\",1)\n\t\tMHUD B 0 A_SpawnItemEx(\"RifleShellCasing\",2,8,30,random(-3,-1),random(0,1),random(1,3),random(-60,-45),128)\n\t\tMHUD B 3 BRIGHT A_FireBullets (2.6, 2.6, -1, 10, \"RiflePuff\")\n\t\tMHUD A 1\n\t\tMHUD A 10 A_ReFire\n\t\tgoto Ready\n\tFlash:\n\t\tTNT1 A 2 Bright A_Light2\n\t\tTNT1 A 1 Bright A_Light1\n\t\tTNT1 A 0 Bright A_Light0\n\t\tstop\n\tAltFire:\n\t\tMHUD A 0\n\t\tMHUD C 35 ACS_ExecuteAlways (314, 0)\n\t\tMHUD A 18\n\t\tGoto Ready\n\tNoAmmo:\n\t\tMHUD A 10 A_WeaponReady (WRF_NOPRIMARY)\n\t\tgoto Ready\n\tSpawn:\n\t\tTNT1 A 0\n\t\tstop\n\t}\n}\n\nactor TortoiseBlasterShot {\n\tObituary \"$OB_TORTOISE\"\n\tPROJECTILE\n\t-RANDOMIZE\n\t+FORCEXYBILLBOARD\n\tRadius 8\n\tHeight 12\n\tScale 0.5\n\tSpeed 45\n\tDamage (25)\n\tRenderStyle Add\n\tAlpha 0.85\n    SeeSound \"Tortoise/Blaster\"\n    Deathsound \"Tortoise/BlasterExp\"\n\tDamageType \"Energy\"\n\tDecal PulseScorch\n\tStates {\n\tSpawn:\n        TX04 A 1 Bright\n        loop\n\tDeath:\n        TX04 B 6 Bright A_Explode(15,72,1)\n\t    TNT1 A 0 A_SpawnItemEx(\"OrangeParticleSpawner\",0,0,0,0,0,0,0,128)\n\t\tTNT1 A 0 A_SpawnItemEx (\"PulseBallSmokePuff\", 0,0,0, 0,0,1)\n\t\tTX04 CDEFGHIJKL 3 Bright\n\t\tstop\n\t}\n}\n\nActor ImpactGrenade1\n{\n\tObituary \"$OB_TORTOISE_GRENADE\"\n    Radius 11\n    Height 8\n    Speed 25\n    Damage (34)\n    Gravity 0.3\n    Scale 1.0\n    Projectile\n    -NoGravity\n    DeathSound \"Tortoise/GrenadeHit\"\n\tdamagetype \"Explosion\"\n    Decal \"Scorch\"\n    States\n    {\n    Spawn:\n        HSBM A 1 Bright\n        Loop\n    Death:\n        TNT1 A 0 Bright A_StopSound (CHAN_BODY)\n        TNT1 A 0 Bright A_Explode (30, 128, 0)\n        TNT1 A 0 Bright A_SpawnItemEx (\"FlameDecay\", random (-16,16), random (-16,16), 4, 0, 0, 0, 0, 0, 160)\n        TNT1 A 0 Bright A_SpawnItemEx (\"ExplosionFlareSpawner\",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)\n        TNT1 A 5 Bright A_SpawnItemEx (\"ExplosionMain\")\n        Stop\n    }\n}\n\nActor ImpactGrenade2 : ImpactGrenade1\n{\n  Speed 24\n  Gravity 0.28\n}\n\nActor ImpactGrenade3 : ImpactGrenade1\n{\n  Speed 23\n  Gravity 0.26\n}\n\nActor ImpactGrenade4 : ImpactGrenade1\n{\n  Speed 22\n  Gravity 0.24\n}\n\nActor Tortoise-BlasterAmmo : Ammo {\n\tinventory.amount 10\n\tinventory.maxamount 400\n\tammo.backpackamount 10\n\tammo.backpackmaxamount 400\n}\n\nActor Tortoise-GrenadeAmmo : Ammo {\n\tinventory.amount 10\n\tinventory.maxamount 240\n\tammo.backpackamount 10\n\tammo.backpackmaxamount 240\n}\n\nactor Tortoise-MachinegunAmmo : Ammo {\n\tinventory.amount 10\n\tinventory.maxamount 600\n\tammo.backpackamount 10\n\tammo.backpackmaxamount 600\n}\n\nactor TortoiseAmmoPackage : CustomInventory {\n\t+AUTOACTIVATE\n\tinventory.maxamount 0\n\tstates {\n\tPickup:\n\t\tTNT1 A 0 A_GiveInventory (\"Tortoise-BlasterAmmo\", 400)\n\t\tTNT1 A 0 A_GiveInventory (\"Tortoise-GrenadeAmmo\", 240)\n\t\tTNT1 A 0 A_GiveInventory (\"Tortoise-MachinegunAmmo\", 600)\n\t\tstop\n\t}\n}\n\nactor DamagedTortoise {\n\tHealth 250\n\tRadius 40\n\tHeight 64\n\tMass 2000\n\t+SHOOTABLE\n\tdamagefactor \"Disarm\", 0.0\n\tPainChance 0\n\tbloodtype \"HHMetalHit\"\n\tbloodcolor \"White\"\n\tobituary \"%o went boom.\"\n\tTranslation \"112:127=[255,255,255]:[0,0,0]\"\n\tStates {\n\tSpawn:\n\t\tROB2 AAAA 35\n\t\tROB2 A 35\n\t\tROB2 AAAA 5 A_SpawnItemEx(\"EjectedMechSmokePuff\",random(-32,32),random(-32,32),random(54,72),0,0,3,0,128,0)\n\t\tROB2 A 5 A_SpawnItemEx(\"EjectedMechSmokePuff\",random(-32,32),random(-32,32),random(54,72),0,0,3,0,128,0)\n\t\tgoto Spawn+5\n\tDeath:\n\t\tROB1 A 0\n\t\tROB2 A 10 A_NoBlocking\n\t\tROB2 A 10 A_SpawnItemEx (\"MechExplosionSmall\", 0,0,0,0,0,0,0, SXF_NOCHECKPOSITION)\n\t\tTNT1 A 0\n\t\tStop\n\t}\n}\n\nactor EjectedTortoise {\n\tTranslation \"112:127=[255,255,255]:[0,0,0]\"\n\tStates {\n\tSpawn:\n\t\tROB2 AAAA 35\n\t\tROB2 A 0 A_SpawnItemEx (\"TortoiseSwitchPickup\")\n\t\tstop\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/aow2scrp.txt",
        "contents": "/****************************************************************************************************\n ** All Out War 2: The Second Coming ACS script                                                    **\n ** Credit to VoltlocK for originally creating the engine                                         **\n ** With modifications by Eruanna, Dusk and the Omega team                                    **\n **                                                                                                **\n ** You may use portions of this script in your project as long as you give credit where credit is **\n ** due. Please don't be lame and just copy-paste any of this and call it your own. Thanks!        **\n ****************************************************************************************************/\n\n// Tag legend:\n// [SP] == Eruanna\n// [NG] == Tiger\n\n#include \"zcommon.acs\"\n#library \"aow2scrp.acs\"\n#import \"modcvars.acs\"\n\n#define MAX_NORMAL_WEAPONS 22\n\n#define TEAM_NONE 255\n\n// [Dusk] intel HudMessage coords\n#define INTEL_XPOS 0.5\n#define INTEL_YPOS 0.055\n#define INTEL_YPOS2 0.0475\n\n// [Dusk] rank stuff\n#define RANK_PRIVATE 0\n#define RANK_CORPORAL 1\n#define RANK_SERGEANT 2\n#define RANK_MASTERSGT 3\n#define RANK_OFFICER 4\n#define RANK_LIEUTENANT 5\n#define RANK_MAJOR 6\n#define RANK_COMMANDO 7\n\n// [Dusk] these determine xp requirements for level-up\n#define XPREQ_CORPORAL 250\n#define XPREQ_SERGEANT 500\n#define XPREQ_MASTERSGT 1000\n#define XPREQ_OFFICER 1500\n#define XPREQ_LIEUTENANT 2000\n#define XPREQ_MAJOR 2500\n#define XPREQ_COMMANDO 3250\n\n// class ids\n#define CLASS_NONE 0\n#define CLASS_GUNMAN 1\n#define CLASS_ENGINEER 2\n#define CLASS_MINIGUNNER 3\n#define CLASS_TECHNICIAN 4\n#define CLASS_FLAMER 5\n#define CLASS_RIFLEMAN 6\n#define CLASS_MACHINEGUNNER 7\n#define CLASS_GRENADIER 8\n#define CLASS_ROCKETEER 9\n#define CLASS_STEALTH 10\n#define CLASS_GAUSSGUNNER 11\n#define CLASS_CHEMWARRIOR 12\n#define CLASS_SHOCKTROOPER 13\n#define CLASS_COMMANDO 14\n#define CLASS_SHOTGUNNER 15\n#define CLASS_SUICIDEBOMBER 16\n#define CLASS_SNIPER 17\n#define CLASS_UTILITYGUY 18\n#define CLASS_DEMOEXPERT 19\n#define CLASS_MEDIC 20\n#define CLASS_LASERCHAINGUNNER 21\n#define CLASS_JUMPJET 22\n#define CLASS_TIBRIFLE 23\n#define CLASS_DOUBLESHOTGUNNER 24\n#define CLASS_PLASMAGUNNER 25\n#define CLASS_ARTILLERY 26\n#define CLASS_TIMECOP 27\n#define CLASS_HARVESTER 28\n#define CLASS_ADVHARVESTER 29\n\n// mech ids\n#define MECH_ORCA 0\n#define MECH_RAVEN 1\n#define MECH_WOLVERINE 2\n#define MECH_MADCAT 3\n#define MECH_TITAN 4\n#define MECH_GUARDIAN 5\n// #define MECH_SCAVENGER 6\n\n// event scripts\n#define ACTION_DESTROY_BARRACKS 0\n#define ACTION_DESTROY_REFINERY 1\n#define ACTION_DESTROY_PLANT 2\n#define ACTION_DESTROY_FACTORY 3\n#define ACTION_DESTROY_OBELISK 4\n#define ACTION_DESTROY_REPAIR 5\n#define ACTION_SUDDENDEATH 6\n\n#define HM_1TIC  1872 // (1/35) * 2^16\n#define HM_2TICS 3745 // (2/35) * 2^16\n#define HM_3TICS 5617 // (3/35) * 2^16\n#define HM_4TICS 7489 // (4/35) * 2^16\n#define HM_5TICS 9362 // (5/35) * 2^16\n\n#define HP_BARRACKS 20000\n#define HP_REFINERY 30000\n#define HP_PLANT 20000\n#define HP_FACTORY 30000\n#define HP_REPAIR 15000\n#define HP_OBELISK 15000\n#define HP_MINIREF 6500\n#define HP_REGENS 10000\n#define HP_PORTAL 3000\n\n#define BUILDING_ALL -1\n\n#define BUILDING_BARRACKS 0\n#define BUILDING_REFINERY 1\n#define BUILDING_RESCENTRE 2\n#define BUILDING_FACTORY 3\n#define BUILDING_REPAIR 4\n#define BUILDING_OBELISK 5\n#define BUILDING_MINIREF 6\n#define BUILDING_HPREGEN 7 // deprecated\n#define BUILDING_HEALTHREGEN 7\n#define BUILDING_AMMOREGEN 8\n#define BUILDING_PORTAL 9\n\n// TODO: move these to 1000+ range\n#define TID_BARRACKS_BLUE 101\n#define TID_BARRACKS_RED 201\n#define TID_REFINERY_BLUE 103\n#define TID_REFINERY_RED 203\n#define TID_RESCENTRE_BLUE 105\n#define TID_RESCENTRE_RED 205\n#define TID_FACTORY_BLUE 107\n#define TID_FACTORY_RED 207\n#define TID_REPAIR_BLUE 109\n#define TID_REPAIR_RED 209\n#define TID_OBELISK_BLUE 114\n#define TID_OBELISK_RED 214\n#define TID_CRATE 401\n#define TID_TIBERIUM 402\n#define TID_TICKETCOUNTER_BLUE 410\n#define TID_TICKETCOUNTER_RED 411\n#define TID_MINIREF_BLUE 901\n#define TID_MINIREF_RED 900\n#define TID_HEALTHREGEN_BLUE 903\n#define TID_HEALTHREGEN_RED 902\n#define TID_AMMOREGEN_BLUE 905\n#define TID_AMMOREGEN_RED 904\n\n// new tids\n#define TID_PORTAL_BLUE1 1500\n#define TID_PORTAL_BLUE2 1501\n#define TID_PORTAL_RED1 1502\n#define TID_PORTAL_RED2 1503\n#define TID_PORTAL_TELEDEST 1504\n// 1504 - 1505\n#define TID_PORTAL_FX 1508\n// 1508 - 1511\n\t// 1512 - 1519 is free\n#define TID_MARINE 1520\n// 1520 - 1544\n\n// TODO: populate this list\n#define SC_PORTAL_TIDREQUEST 935\n#define SC_PORTAL_INIT 936\n#define SC_PORTAL_FUNCTION 937\n#define SC_MARINE_INIT 938\n#define SC_MARINE_COMPENSATION 939\n#define SC_MARINE_STATS 967\n#define SC_MARINE_DEATH 968\n\n// how many points does researching stuff give you?\n// Also used for miniref and utility-built ammo/health regens\n#define POINTS_RESEARCH 12\n\n// largest crate number, bump this every time new crates are added\n#define MAX_CRATE 68\n\n#define MAX_MARINES 24\n\nbool Bots[MAX_MARINES];\n\nint BaseTIDs[18] = {\n\tTID_BARRACKS_BLUE, TID_BARRACKS_RED,\n\tTID_REFINERY_BLUE, TID_REFINERY_RED,\n\tTID_RESCENTRE_BLUE, TID_RESCENTRE_RED,\n\tTID_FACTORY_BLUE, TID_FACTORY_RED,\n\tTID_REPAIR_BLUE, TID_REPAIR_RED,\n\tTID_OBELISK_BLUE, TID_OBELISK_RED,\n\tTID_MINIREF_BLUE, TID_MINIREF_RED,\n\tTID_HEALTHREGEN_BLUE, TID_HEALTHREGEN_RED,\n\tTID_AMMOREGEN_BLUE, TID_AMMOREGEN_RED\n};\n\nstr TeamNames[2] = {\"Blue\", \"Red\"};\n\nint Developer;\nint DeveloperSafetyLock;\nint ConnectionEpoch;\n\nint EventScripts;\n\nint GameMode;\nint BodycountTimelimit;\n\nint Flags[3];\n\nint Credits[33];\nint Experience[32];\nint Rank[32];\nstr RankTitles[8];\nint PlayersTeam[33];\nbool IsAdmin[33];\nbool Surrender[32];\nint LastSurrenderTime[32];\n\nint FirstBlood;\n\n// [SP] Keep track of when player joins game for purposes of team balance\nint StartTime[33];\nint PlayerNeedsSwitched;\n\n// [SP] Plasma cannon tracking\nint LastPurchasedCannon[33];\nint LastPurchasedBeacon[3];\nint NumPlasmaCannons[3];\nint MaxCannonsPerTeam;\nint CannonPurchaseDelay;\n\n// [SP] Time Cop tracking\nint LastPurchasedTimeCop[33];\nint NumTimeCops[3];\nint MaxTimeCopsPerTeam;\n\nint TimedC4Delay;\n\nint UsePortals = 1;\n// [Dusk] this is used to determine which portal is alive *and* active\n// a portal is considered inactive when it has no destinaton\nint Portals[4] = {0};\n// used to determine when a player has teleported in the last 18 tics. prevents teleporting multiple times.\nint HasTeleported[32];\n\nint LastMenu[33] = {0}; // [SP] This is to fix double-pressing on mech switches, causing a huge cost to the buyer.\n\n// [SP] Current Console Player IDX (client-side only)\n// Defaults to -1, this will be the \"server\" - anytime ConsolePlayer is -1\n// it means the client-side script did not execute, therefore this is the server.\nint ConsolePlayer = -1;\n\n//Bases\nbool GotRefinery[2];\nbool GotBarracks[2];\nbool GotFactory[2];\nbool GotPlant[2];\nbool GotRepair[2];\nbool GotObelisk[2];\nint MiniRefinery[2];\nint RefineryHealth[2];\nint BarracksHealth[2];\nint FactoryHealth[2];\nint PlantHealth[2];\nint RepairHealth[2];\nint ObeliskHealth[2];\nint MiniRefHealth[2];\nint GlobalMedicHealth[2];\nint GlobalAmmoHealth[2];\nint BaseLeft[2];\n\nint BaseHUDUpdate;\nint NextTicketUpdate;\nint LastAttackMessage;\nint LastTickets[2];\nint LastClientRequest;\nint MaxTurretDistance = 2500;\nint MinEnemyTurretDistance = 1500;\n\nint SurrenderWaitTime = 20;\n\n//RESEARCHES!!!!!!!!\nbool EnhancedRefining[2]; //Increases profits from harvesting by $50 //Costs $2000\nbool AdvancedMechResearch[2]; //Enables purchase of Juggernaut, Titan and MadCat //Costs $2000\nint GlobalMedic[2]; //Builds a Team Health Regeneration Cache //Costs $2250\nint GlobalAmmo[2]; //Builds a Team Ammo Regeneration Cache //Costs $2250\nbool AdvancedTurrets[2]; //Allows construction of high level Turrets //Costs $2000\nbool MoreTurrets[2]; //Increases Turret cap by 10 //Costs $2000\nint MaxTurrets[2] = {15, 15};\n\nint GuardianLimit;\n\nint StartCredits;\nint CreditFlow;\nint CreditFlowPower;\nint CreditFragAward;\nint CreditAwardTime;\nint CreditAwardAmount;\nint CreditRepairAmount;\n\nbool MechEnabled;\nbool GettingMech[2];\nbool SuddenDeath = False;\nbool TicketPool = False;\nint Tickets[2];\nint StartingTickets;\nint TournamentMode;\nint BeaconPurchaseDelay;\n\nint TeamStayTime;\nbool TeamUnbalanceCompensation[2];\n\nbool RedBeaconCooldown = False;\nbool BlueBeaconCooldown = False;\nint RedBeaconTime = 300;\nint BlueBeaconTime = 300;\n\nint GameOver;\n\nbool CrateTime = True;\n\nint PlayerSpeeds[32];\nint MechGetter[2]; // which player is in the hanger?\n\nint PlasmaCooldownTime; // plasma cannon cooldown time (CVar)\nint PlasmaCooldown[32]; // same for plasma cannon (internal)\n\nint MaxRazorWire = 20;\nint MaxProxy = 50;\nint MaxMechs = 5; // mini-ravens\nint MaxCrates = 15;\n\nint RepairBonus[32];\nint MedicBonus[32];\nint MedicBonusNeed;\nint AIMarines[2] = {0}; // compensation-spawned only\n\nint AIMarineCount = 0; // how many AI marines are there overall?\n\nint CrateNumber = 0; // crate logic\n\nstr NormalWeaponNames[MAX_NORMAL_WEAPONS] = {\n\t\"ArtilleryCannon\",\n\t\"ChemicalSprayer\",\n\t\"DoubleShotgun\",\n\t\"EagerBeaver\",\n\t\"Flamer\",\n\t\"GatlingGun\",\n\t\"GaussRifle\",\n\t\"Grenade_Launcher\",\n\t\"Knife\",\n\t\"LaserChaingun\",\n\t\"LaserRifle\",\n\t\"MachineGun\",\n\t\"MissileLauncher\",\n\t\"PlasmaCannon\",\n\t\"PlasmaGun\",\n\t\"Rifle\",\n\t\"ShockRifle\",\n\t\"Boomstick\",\n\t\"SniperRifle\",\n\t\"SubMachineGun\",\n\t\"TiberiumAutorifle\",\n\t\"TimeGun\"\n};\n\n#include \"a_functions.acs\"\n#include \"a_armor.acs\"\n#include \"a_monies.acs\"\n#include \"a_xp.acs\"\n\n#include \"a_admin.acs\"\n#include \"a_basehud.acs\"\n#include \"a_bases.acs\"\n#include \"a_botmarines.acs\"\n#include \"a_bots.acs\"\n#include \"a_clientfx.acs\"\n#include \"a_clssc.acs\"\n#include \"a_core.acs\"\n#include \"a_crate.acs\"\n#include \"a_death.acs\"\n#include \"a_dmgovertime.acs\"\n#include \"a_donate.acs\"\n#include \"a_hud.acs\"\n#include \"a_items.acs\"\n#include \"a_mechs.acs\"\n#include \"a_menu.acs\"\n#include \"a_misc.acs\"\n#include \"a_netscripts.acs\"\n#include \"a_opendeck.acs\"\n#include \"a_portal.acs\"\n#include \"a_regen.acs\"\n#include \"a_repfac.acs\"\n#include \"a_repair.acs\"\n#include \"a_respc.acs\"\n#include \"a_spawnroom.acs\"\n#include \"a_stealth.acs\"\n#include \"a_surrender.acs\"\n#include \"a_suddendeath.acs\"\n#include \"a_teambalance.acs\"\n#include \"a_timegun.acs\"\n#include \"a_tiberium.acs\"\n#include \"a_util.acs\"\n#include \"a_wchk.acs\""
      },
      {
        "source": "pk3",
        "name": "acs_source/a_admin.txt",
        "contents": "// [SP] NOTICE: This is an administrator 'puke' script. USE WITH CARE! This can be abused very easily.\nscript 401 (int Player,int Action)\n{\n\tSetActivator(3800 + Player);\n\tswitch(Action)\n\t{\n\tcase 3:\n\t\tif ( ThingCount(T_NONE,3800 + Player) == 0 ) {\n\t\t\tLog(s:\"Error: Player #\",d:Player,s:\" not found!\");\n\t\t\tterminate;\n\t\t}\n\t\tif (PlayerIsBot (Player)) {\n\t\t\tLog (s:\"Error: Player #\", d:Player, s:\" \\\"\", n:Player+1, s:\"\\c-\\\" is a bot.\");\n\t\t\tterminate;\n\t\t}\n\t\t//Player_SetTeam(255);\n\t\tSetPlayerProperty(0,1,1);\n\t\tSetPlayerProperty(0,1,2);\n\t\tSetPlayerProperty(0,1,3);\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessageBold (n:0, s:\"\\c- becomes an \\cGadministrator\";\n\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);\n\t\tLog(s:\"*** \\caWARNING!\\c- Game Master mode activated for \",n:Player+1,s:\" \\c-(IDX \",d:Player,s:\") - this has been logged in the server console.\");\n\t\tLog(s:\"*** To deactivate this mode, you (or target) must either spectate or call a_exit in console.\");\n\t\tLog(s:\"*** Please don't abuse this! Do what you need to do, then exit this mode immediately.\");\n\t\tGiveInventory(\"AdministratorSwitch\",1);\n\t\tIsAdmin[Player] = true;\n\t\tGiveInventory (\"IsAdmin\", 1);\n\t\tbreak;\n\tcase 1:\n\t\tif ( ThingCount(T_NONE,3800 + Player) == 0 )\n\t\t{\n\t\t\tLog(s:\"Player \",d:Player,s:\" not found!\");\n\t\t\tterminate;\n\t\t}\n\t\tif ( PlayerTeam() == 0 )\n\t\t{\n\t\t\tLog(s:\"Player \",d:Player,s:\" named \",n:0,s:\" is already on Blue.\");\n\t\t\tterminate;\n\t\t}\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessage (n:Player, s:\"\\c- has been forced to\\n\\cKchange team\\c- by an \\cQadmin.\";\n\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\t\tPlayer_SetTeam(0);\n\t\tLog(n:0,s:\" forced to change to Blue by admin.\");\n\t\tdelay(1);\n\t\tTeleport(70);\n\t\tGiveInventory(\"HasClass\",1);\n\t\tACS_ExecuteAlways(95,0,0,0,0);\n\t\tTakeInventory(\"IsRed\",1);\n\t\tGiveInventory(\"IsBlue\",1);\n\t\tStartTime[Player] = -0x7FFFFFFF;\n\t\tbreak;\n\tcase 2:\n\t\tif ( ThingCount(T_NONE,3800 + Player) == 0 )\n\t\t{\n\t\t\tLog(s:\"Player \",d:Player,s:\" not found!\");\n\t\t\tterminate;\n\t\t}\n\t\tif ( PlayerTeam() == 1 )\n\t\t{\n\t\t\tLog(s:\"Player \",d:Player,s:\" named \",n:0,s:\" is already on Red.\");\n\t\t\tterminate;\n\t\t}\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessage (n:Player, s:\"\\c- has been forced to\\n\\cKchange team\\c- by an \\cQadmin.\";\n\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\t\tPlayer_SetTeam(1);\n\t\tLog(n:0,s:\" forced to change to Red by admin.\");\n\t\tdelay(1);\n\t\tTeleport(71);\n\t\tGiveInventory(\"HasClass\",1);\n\t\tACS_ExecuteAlways(95,0,0,0,0);\n\t\tTakeInventory(\"IsBlue\",1);\n\t\tGiveInventory(\"IsRed\",1);\n\t\tStartTime[Player] = -0x7FFFFFFF;\n\t\tbreak;\n\tcase 0:\n\t\tswitch(Player)\n\t\t{\n\t\tcase 3:\n\t\t\tLog(s:\"Usage: gamemaster <IDX> (use 'playerinfo' to get IDX numbers)\");\n\t\tcase 1:\n\t\t\tLog(s:\"Usage: forceblue <IDX> (use 'playerinfo' to get IDX numbers)\");\n\t\tcase 2:\n\t\t\tLog(s:\"Usage: forcered <IDX> (use 'playerinfo' to get IDX numbers)\");\n\t\tdefault:\n\t\t\tLog(s:\"Please don't puke this script directly! Use the provided ccmd's - it's for your sanity's own good!\");\n\t\t}\n\tdefault:\n\t\tLog(s:\"Unknown action!\");\n\t}\n}\nscript 402 (int Arg1, int Arg2, int Arg3) NET\n{\n\tif ( IsAdmin[PlayerNumber()] == false )\n\t\tterminate;\n\tswitch(Arg1)\n\t{\n\tcase 0:\n\t\t// help!\n\t\tbreak;\n\tcase 1:\n\t\t// Warp\n\t\t/*Spawn(\"TeleportDest\",Arg2<<16,Arg3<<16,0,6003);\n\t\tdelay(1);\n\t\tTeleport_NoFog(6003);\n\t\tdelay(1);\n\t\tThing_Remove(6003);*/\n\t\t// [Dusk] this should be more reliable\n\t\tSetActorPosition (0, arg2<<16, arg3<<16, 0, false);\n\t\tbreak;\n\tcase 2:\n\t\t// Teleport to spot\n\t\tif (arg2 <= 0) {\n\t\t\tHudMessage (s:\"Usage: a_teleport <tid>\\n\",\n\t\t\t\ts:\"TIDs of interest:\\n\",\n\t\t\t\ts:\"1: blue base\\t\\t2: red base\\n\",\n\t\t\t\ts:\"70: blue spawn room\\t71: red spawn room\\n\",\n\t\t\t\ts:\"108: blue wf hanger\\t208: red wf hanger\\n\",\n\t\t\t\ts:\"110: blue mech room\\t210: red mech room\\n\",\n\t\t\t\ts:\"111: blue res room\\t211: red res room\\n\"; HUDMSG_PLAIN|HUDMSG_LOG, 9000, 0, 0, 0, 0);\n\t\t\tHudMessage (s:\"\"; HUDMSG_PLAIN, 9000, 0, 0, 0, 0.1);\n\t\t\tterminate;\n\t\t}\n\t\tTeleport_NoFog(Arg2);\n\t\tbreak;\n\tcase 3:\n\t\t// Activate crate\n\t\tACS_ExecuteAlways (309, 0, Arg2, Arg3);\n\t\tbreak;\n\tcase 4:\n\tcase 5:\n\t\tbreak;\n\tcase 6:\n\t\t// Toggle berserk\n\t\tif (CheckInventory (\"PowerBerserk\")) {\n\t\t\tTakeInventory (\"PowerBerserk\", 1);\n\t\t\tdelay (5);\n\t\t\tTakeInventory (\"PowerBerserkHue\", 1);\n\t\t\tdelay (3);\n\t\t\tGiveInventory (\"RedHueRemover\", 1);\n\t\t} else {\n\t\t\tGiveInventory (\"BerserkSwitch\", 1);\n\t\t\tdelay (5);\n\t\t\tGiveInventory (\"BerserkHue\", 1);\n\t\t}\n\t\tbreak;\n\tcase 7:\n\t\t// Instant resign\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tTeleport(71);\n\t\telse\n\t\t\tTeleport(70);\n\t\tACS_ExecuteAlways (95, 0);\n\t\tbreak;\n\tcase 8:\n\t\t// Give beacon item\n\t\tGiveInventory(\"BeaconItem\",1);\n\t\tbreak;\n\tcase 9:\n\t\t// Become Admin Player Again - or remove it\n\t\tif (CheckInventory(\"PowerAdministrator\")) {\n\t\t\tTakeInventory(\"PowerAdministrator\",1);\n\t\t\tSetPlayerProperty(0,0,1);\n\t\t\tSetPlayerProperty(0,0,2);\n\t\t\tSetPlayerProperty(0,0,3);\n\t\t} else {\n\t\t\tGiveInventory(\"AdministratorSwitch\",1);\n\t\t\tSetPlayerProperty(0,1,1);\n\t\t\tSetPlayerProperty(0,1,2);\n\t\t\tSetPlayerProperty(0,1,3);\n\t\t}\n\t\tbreak;\n\tcase 10:\n\t\t// Set Team\n\t\tPlayer_SetTeam(Arg2);\n\t\tif (Arg2 == TEAM_BLUE) {\n\t\t\tTakeInventory(\"IsRed\",1);\n\t\t\tGiveInventory(\"IsBlue\",1);\n\t\t} else {\n\t\t\tGiveInventory(\"IsRed\",1);\n\t\t\tTakeInventory(\"IsBlue\",1);\n\t\t}\n\t\tbreak;\n\tcase 11:\n\t\t// Give utility gun\n\t\tGiveInventory (\"RepairGun\", 1);\n\t\tGiveInventory (\"UtilityGun\", 1);\n\t\tbreak;\n\tcase 12:\n\t\t// Set speed\n\t\tSetActorProperty(0, APROP_SPEED, 0.01 * Arg2);\n\t\tbreak;\n\tcase 13:\n\t\t// Admin pistol - rotate fire\n\t\tif (CheckInventory (\"AdminPistolRotation\") == 2)\n\t\t\tTakeInventory (\"AdminPistolRotation\", 2);\n\t\telse\n\t\t\tGiveInventory (\"AdminPistolRotation\", 1);\n\n\t\tswitch (CheckInventory (\"AdminPistolRotation\")) {\n\t\tcase 0:\n\t\t\tHudMessage (s:\"Normal mode\";\n\t\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 1.0, 0.5);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tHudMessage (s:\"\\cJRepair / Disarm mode\";\n\t\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 1.0, 0.5);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tHudMessage (s:\"Deconstruction mode\";\n\t\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 1.0, 0.5);\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\tcase 14:\n\t\t// Open Deck\n\t\tGiveInventory (\"CrateChooser\", 1);\n\t\tbreak;\n\tcase 15:\n\t\t// Notarget\n\t\tSetActorProperty (0, APROP_NoTarget, !GetActorProperty (0, APROP_NoTarget));\n\t\tbreak;\n\tcase 16:\n\t\t// Exit admin mode\n\t\tSetPlayerProperty (0, 0, 1);\n\t\tSetPlayerProperty (0, 0, 2);\n\t\tSetPlayerProperty (0, 0, 3);\n\t\tSetActorProperty (0, APROP_NoTarget, 0);\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessageBold (s:\"Admin \", n:0, s:\"\\c- becomes a regular player again.\";\n\t\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);\n\t\tLog (n:0, s:\" (#\", d:PlayerNumber(), s:\") exits admin mode.\");\n\t\tIsAdmin[PlayerNumber()] = false;\n\t\tACS_ExecuteAlways (96, 0, 1-PlayerTeam()); // teleport to spawn room\n\t\tdelay (5);\n\t\tACS_ExecuteAlways (95, 0); // resign\n\t\tbreak;\n\tcase 17:\n\t\t// Set health\n\t\tif (arg2 <= 0) break;\n\t\tSetActorProperty (0, APROP_Health, Arg2);\n\t\tbreak;\n\tcase 18:\n\t\t// Fly\n\t\tif (CheckInventory (\"PowerFlight\"))\n\t\t\tTakeInventory (\"PowerFlight\", 1);\n\t\telse\n\t\t\tGiveInventory (\"AdminFlight\", 1);\n\t\tbreak;\n\tdefault:\n\t\tLog(s:\"Unknown action!\");\n\t}\n}\n\n// TEAM SHUFFLE\n// -- only use for the grossest cases of team stack\nscript 403 (void) {\n\tlog (s:\"[SHUFFLE] Countdown begins.\");\n\tfor (int i = 10; i > 0; i--) {\n\t\tSetFont (\"BIGFONT\");\n\t\tAmbientSound (\"beacon/nukebeep\", 127);\n\t\tHudMessageBold (s:\"WARNING: Server admin has called \\cRteam shuffle!!\\n\\n\\cRALL PLAYERS\\cG will switch to random teams in \\cK\", d:i;\n\t\t\tHUDMSG_FADEOUT, 2150, CR_RED, 0.5, 0.3, 0.75, 1.0);\n\t\tdelay (35);\n\t}\n\n\tAmbientSound (\"nuke/boom\", 127);\n\tint max = PlayerCount()/2;\n\tint b, r, t;\n\tstr name;\n\tint c;\n\tlog (s:\"[SHUFFLE] Begin of team shuffle.\");\n\t// first knock out start times of everybody - we don't want team switcher to interfere here\n\tfor (i = 0; i <= 31; i++) if (PlayerInGame (i)) StartTime[i] = -0x7FFFFFFF;\n\n\tfor (i = 0; i <= 31; i++) {\n\t\tif (!PlayerInGame (i)) continue;\n\n\t\t// don't interfere gamemasters, they're here to do something important\n\t\tif (!IsAdmin [i]) {\n\t\t\tt = random (TEAM_BLUE, TEAM_RED);\n\t\t\t// keep teams even\n\t\t\tif (t == TEAM_BLUE && b >= max) t = TEAM_RED;\n\t\t\telse if (t == TEAM_RED && r >= max) t = TEAM_BLUE;\n\t\t} else t = GetPlayerInfo (i, PLAYERINFO_TEAM);\n\n\t\tif (t) {name=\"Red\"; r++;} else {name=\"Blue\"; b++;}\n\n\t\tSetActivator (3800+i);\n\t\tif (GetPlayerInfo (i, PLAYERINFO_TEAM) == t) {\n\t\t\tlog (s:\"[SHUFFLE] Player \", d:0, s:\" \\\"\", n:0, s:\"\\c-\\\" remains on \", s:name, s:\".\");\n\t\t\tc = 0;\n\t\t} else {\n\t\t\tlog (s:\"[SHUFFLE] Player \", d:0, s:\" \\\"\", n:0, s:\"\\c-\\\" changes to \", s:name, s:\".\");\n\t\t\tPlayer_SetTeam (t);\n\t\t\tc = 1;\n\t\t}\n\n\t\tif (!IsAdmin [i]) {\n\t\t\tif (!CheckInventory (\"IsInSpawnRoom\") || c) Teleport (70 + PlayerTeam());\n\t\t\tACS_ExecuteAlways (95, 0, 0, TRUE);\n\t\t}\n\n\t\tdelay (5);\n\t}\n\n\tSetActivator (-1);\n\tHudMessageBold (s:\"Shuffle complete. Game on!\"; HUDMSG_FADEOUT, 0, CR_GREEN, 0.5, 0.3, 3.5, 1.0);\n\tlog (s:\"[SHUFFLE] Shuffle complete.\");\n}\n\n// ERROR: SCRIPT NOT FOUND >:V\n// developer mode: activates all researches, knocks out money limits...\n// basically I got tired of going past limits when testing stuff.\n\nscript 404 (void) {\n\t// This is a dangerous script. RCON must call it twice, if it ever does that...\n\tif (Timer() > DeveloperSafetyLock) {\n\t\tDeveloperSafetyLock = Timer() + 10*35;\n\t\tLog (s:\"Call activatedeveloper again to activate deverloper mode.\");\n\t\tLog (s:\"WARNING: THIS WILL MAKE ALL PLAYERS GAMEMASTER! DO NOT USE IN PUBLIC GAMES!\");\n\t\tterminate;\n\t}\n\n\tDeveloper = true;\n\n\tSetFont (\"BIGFONT\");\n\tHudMessageBold (s:\"DEVELOPER MODE ACTIVATED\\n\\nALL PLAYERS ARE NOW GAMEMASTERS\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_BLUE, 0.5, 0.45, 2.0, 1.0);\n\tLog(s:\"*** \\caWARNING!\\c- Developer mode active. ALL players are now gamemasters.\");\n\n\tfor (int i = 0; i <= 1; i++) {\n\t\tEnhancedRefining[i] = true;\n\t\tAdvancedMechResearch[i] = true;\n\t\tAdvancedTurrets[i] = true;\n\t\tMoreTurrets[i] = true;\n\t\tMaxTurrets[i] = 1000000;\n\t}\n\n\t// disable limits and delays\n\tConsoleCommand (\"set aow_c4limit -1\");\n\tConsoleCommand (\"set aow_guardianlimit 32\");\n\tConsoleCommand (\"set aow_teamstaytime -1\");\n\tConsoleCommand (\"set aow_maxcannonsperteam -1\");\n\tConsoleCommand (\"set aow_plasmacooldown -1\");\n\tConsoleCommand (\"set aow_beaconpurchasedelay -1\");\n\tConsoleCommand (\"set aow_maxtimecopsperteam -1\");\n\n\t// make everybody gamemaster, but don't morph them\n\tfor (i = 0; i <= 31; i++) IsAdmin[i] = true;\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_armor.txt",
        "contents": "// All Out War 2 armour manipulation scripts\n// Credit to VoltlocK for originally creating the engine\n// With modifications by Eruanna, Dusk and the Omega Team\n\n// You may use portions of this script in your project as long as you give credit where credit is\n// due. Please don't be lame and just copy-paste any of this and call it your own. Thanks!\n\n// NOTE: AGF_ADDITIVE means subtractive if n < 0!\n#define NOCHANGE 255\n#define ARMOD_NOCHANGE 0\n#define ARMOD_FIRE 1\n#define ARMOD_CHEM 2\n#define ARMOD_LASER 3\n#define ARMOD_EXPLO 4\n#define ARMOD_BULLET 5\n#define ARMOD_NONE 7\n#define AGF_ADDITIVE 8\n#define AGF_DONTSUBTRACT 16\n#define AGF_DONTADD 32\nfunction int GetArmorGrade (void) {\n\tif (CheckInventory (\"PowerGrade5Armor\")) return 5;\n\tif (CheckInventory (\"PowerGrade4Armor\")) return 4;\n\tif (CheckInventory (\"PowerGrade3Armor\")) return 3;\n\tif (CheckInventory (\"PowerGrade2Armor\")) return 2;\n\tif (CheckInventory (\"PowerGrade1Armor\")) return 1;\n\tif (CheckInventory (\"PowerGrade-1Armor\")) return -1;\n\treturn 0;\n}\n\nfunction int GetArmorModifier (void) {\n\tif (CheckInventory (\"PowerFireProof\")) return ARMOD_FIRE;\n\tif (CheckInventory (\"PowerChemicalProof\")) return ARMOD_CHEM;\n\tif (CheckInventory (\"PowerExplosiveResistance\")) return ARMOD_EXPLO;\n\tif (CheckInventory (\"PowerLaserResistance\")) return ARMOD_LASER;\n\tif (CheckInventory (\"PowerBulletResistance\")) return ARMOD_BULLET;\n\treturn 0;\n}\n\nfunction void SetArmorGrade (int n, int mod) {\n\tint debug = GetCVar (\"aow_debugarmor\");\n\tif (debug) {\n\t\tLog (s:\"SetArmorGrade called with arguments \", d:n, s:\" and \", d:mod);\n\t\tif (mod & AGF_ADDITIVE) Log (s:\"AGF_ADDITIVE set\");\n\t\tif (mod & AGF_DONTADD) Log (s:\"AGF_DONTADD set\");\n\t\tif (mod & AGF_DONTSUBTRACT) Log (s:\"AGF_DONTSUBTRACT set\");\n\t}\n\n\tint grade = GetArmorGrade ();\n\n\tif (n != NOCHANGE) {\n\t\tif (mod & AGF_ADDITIVE) {\n\t\t\tif (debug) Log (s:\"SetArmorGrade: AGF_ADDITIVE is set. n = \", d:grade, s:\" + \", d:n);\n\t\t\tn += grade;\n\t\t} else {\n\t\t\t// armour upgrade\n\t\t\tif (CheckInventory (\"HasArmorUpgrade\")) {\n\t\t\t\tif (debug) Log (s:\"SetArmorGrade: Player has armor upgrade n = \", d:n+1);\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\n\t\tif (n > 5) n = 5;\n\t\tif (n < 0) {\n\t\t\t// don't go to -1 with AGF_ADDITIVE\n\t\t\tif (mod & AGF_ADDITIVE)\n\t\t\t\tn = 0;\n\t\t\telse\n\t\t\t\tn = -1;\n\t\t}\n\n\t\tif ((mod & AGF_DONTSUBTRACT && n <= grade) || (mod & AGF_DONTADD && n >= grade)) {\n\t\t\tif (debug) Log (s:\"SetArmorGrade: AGF_DONTSUBTRACT or AGF_DONTADD vetos grade change.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (debug) Log (s:\"Final armor grade: \", d:n);\n\t\tif (grade != n) {\n\t\t\tCheckAndRemove (\"PowerGrade5Armor\");\n\t\t\tCheckAndRemove (\"PowerGrade4Armor\");\n\t\t\tCheckAndRemove (\"PowerGrade3Armor\");\n\t\t\tCheckAndRemove (\"PowerGrade2Armor\");\n\t\t\tCheckAndRemove (\"PowerGrade1Armor\");\n\t\t\tCheckAndRemove (\"PowerGrade-1Armor\");\n\t\t\tswitch (n) {\n\t\t\t\tcase 5: GiveInventory (\"Grade5Armor\", 1); break;\n\t\t\t\tcase 4: GiveInventory (\"Grade4Armor\", 1); break;\n\t\t\t\tcase 3: GiveInventory (\"Grade3Armor\", 1); break;\n\t\t\t\tcase 2: GiveInventory (\"Grade2Armor\", 1); break;\n\t\t\t\tcase 1: GiveInventory (\"Grade1Armor\", 1); break;\n\t\t\t\tcase -1: GiveInventory (\"Grade-1Armor\", 1); break;\n\t\t\t}\n\n\t\t\tif (n == 5) {\n\t\t\t\tSetFont (\"SMALLFONT\");\n\t\t\t\tHudMessageBold (n:0, s:\"\\c- has \\cKGrade 5 Armor!\";\n\t\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t\t}\n\t\t}\n\t}\n\n\t// rid the flags now\n\tif (mod >= 32) mod -= 32;\n\tif (mod >= 16) mod -= 16;\n\tif (mod >= 8) mod -= 8;\n\n\tif (mod != ARMOD_NOCHANGE) {\n\t\tCheckAndRemove (\"PowerFireProof\");\n\t\tCheckAndRemove (\"PowerChemicalProof\");\n\t\tCheckAndRemove (\"PowerBulletResistance\");\n\t\tCheckAndRemove (\"PowerExplosiveResistance\");\n\t\tCheckAndRemove (\"PowerLaserResistance\");\n\n\t\tswitch (mod) {\n\t\t\tcase ARMOD_FIRE: GiveInventory (\"FireProof\", 1); break;\n\t\t\tcase ARMOD_CHEM: GiveInventory (\"ChemicalProof\", 1); break;\n\t\t\tcase ARMOD_EXPLO: GiveInventory (\"ExplosiveResistance\", 1); break;\n\t\t\tcase ARMOD_LASER: GiveInventory (\"LaserResistance\", 1); break;\n\t\t\tcase ARMOD_BULLET: GiveInventory (\"BulletResistance\", 1); break;\n\t\t}\n\t}\n}\n\n// for testing and decorate (ai marines, et al)\nscript 985 (int grade, int mod) {SetArmorGrade (grade, mod);}\n\n// [DEBUG] ARMOR DISPLAY\nint ArmorNames[13] = {\"PowerGrade1Armor\", \"PowerGrade2Armor\", \"PowerGrade3Armor\", \"PowerGrade4Armor\", \"PowerGrade5Armor\",\n\t\"PowerGrade-1Armor\", \"PowerFireProof\", \"PowerChemicalProof\", \"PowerExplosiveResistance\", \"PowerLaserResistance\",\n\t\"PowerBulletResistance\", \"PowerChemicalResistance\", \"PowerGrade2ArmorFactoryPower\"};\nint ArmorValuesFist[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9};\nint ArmorValuesBullet[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t1.0, 1.0, 1.0, 1.0, 0.5, 1.0, 0.9};\nint ArmorValuesExplo[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t1.0, 1.0, 0.5, 2.0, 2.0, 1.0, 0.9};\nint ArmorValuesAntiArmor[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t1.0, 1.0, 0.5, 2.0, 1.0, 1.0, 0.9};\nint ArmorValuesFire[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t0.0, 2.0, 1.0, 1.0, 1.0, 2.0, 0.9};\nint ArmorValuesChem[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t2.0, 0.0, 1.0, 1.0, 1.0, 0.5, 0.9};\nint ArmorValuesLaser[13] = {0.9, 0.8, 0.7, 0.6, 0.5, 1.2,\n\t1.0, 1.0, 2.0, 0.5, 2.0, 1.0, 0.9};\n\nscript 981 (void) NET CLIENTSIDE {\n\tint fist, bullet, explo, antiarmor, fire, chem, laser;\n\n\tif (CheckInventory (\"IsMech\")) {\n\t\tfist = 0.35;\n\t\tbullet = 0.8;\n\t\texplo = 1.35;\n\t\tantiarmor = 2.0;\n\t\tfire = 1.25;\n\t\tchem = 1.75;\n\t\tlaser = 1.0;\n\t} else {\n\t\tfist = 1.0;\n\t\tbullet = 1.0;\n\t\texplo = 1.0;\n\t\tantiarmor = 1.0;\n\t\tfire = 1.0;\n\t\tif (CheckInventory (\"PowerBerserk\"))\n\t\t\tchem = 2.25;\n\t\telse\n\t\t\tchem = 1.0;\n\t\tlaser = 1.0;\n\t}\n\n\tfor (int i = 0; i < 13; i++) {\n\t\tif (CheckInventory (ArmorNames[i])) {\n\t\t\tfist = FixedMul (fist, ArmorValuesFist[i]);\n\t\t\tbullet = FixedMul (bullet, ArmorValuesBullet[i]);\n\t\t\texplo = FixedMul (explo, ArmorValuesExplo[i]);\n\t\t\tantiarmor = FixedMul (antiarmor, ArmorValuesAntiArmor[i]);\n\t\t\tfire = FixedMul (fire, ArmorValuesFire[i]);\n\t\t\tchem = FixedMul (chem, ArmorValuesChem[i]);\n\t\t\tlaser = FixedMul (laser, ArmorValuesLaser[i]);\n\t\t}\n\t}\n\n\tLog (s:\"CURRENT DAMAGE FACTORS: \\cj\", f:fist,\n\t     s:\" \\cu\", f:bullet,\n\t     s:\" \\cg\", f:fire,\n\t     s:\" \\cd\", f:chem,\n\t     s:\" \\cn\", f:laser,\n\t     s:\" \\cf\", f:explo,\n\t     s:\" \\ci\", f:antiarmor);\n}\n\nscript 920 (int modtype) {\n\tGiveInventory (\"IsChangingArmor\", 1);\n\tACS_ExecuteAlways (922, 0, modtype);\n\n\tint n = 5;\n\n\twhile (n > 0) {\n\t\tif (GetHealth() <= 0) terminate;\n\t\tdelay (35);\n\t\tn--;\n\t}\n\n\tTakeInventory (\"IsChangingArmor\", 1);\n\tActivatorSound (\"misc/armor_pkup\", 127);\n\tSetArmorGrade (NOCHANGE, modtype);\n}\n\nscript 922 (int modtype) CLIENTSIDE {\n\tif (PlayerNumber() != ConsolePlayer) terminate;\n\n\tTakeInventory (\"ArmorChangeProgress\", 175);\n\n\tint n = 175;\n\twhile (n > 0) {\n\t\tif (GetHealth() <= 0) terminate;\n\t\tGiveInventory (\"ArmorChangeProgress\", 1);\n\t\tdelay (1);\n\t\tn--;\n\t}\n\n\tTakeInventory (\"ArmorChangeProgress\", 175);\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_basehud.txt",
        "contents": "// BUILDING HUD CODE\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *  [Dusk] This script has been vastly changed, no longer does it govern\n *  building healths but instead updates the speed properties of terminals\n *  and yells at clients to update when needed. The old system was just\n *  redundancy galore.\n *\n *  It could be improved even further to not use copy/paste code but that's\n *  something for a later date...\n */\n\nscript 930 (int what, int team) {\n\tint LastHealth, perc;\n\tint tid, maxhp, exists;\n\tint u = false;\n\tint a = (what == BUILDING_ALL);\n\n\tif (what == BUILDING_BARRACKS || a) {\n\t\ttid = TID_BARRACKS_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_BARRACKS + GotBarracks[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_REFINERY || a) {\n\t\ttid = TID_REFINERY_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_REFINERY + GotRefinery[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_RESCENTRE || a) {\n\t\ttid = TID_RESCENTRE_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_PLANT + GotPlant[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_FACTORY || a) {\n\t\ttid = TID_FACTORY_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_FACTORY + GotFactory[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_REPAIR || a) {\n\t\ttid = TID_REPAIR_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_REPAIR + GotRepair[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_OBELISK || a) {\n\t\ttid = TID_OBELISK_BLUE + team*100;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_OBELISK + GotObelisk[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_MINIREF || a) {\n\t\ttid = TID_MINIREF_BLUE - team;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_MINIREF + MiniRefinery[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_HEALTHREGEN || a) {\n\t\ttid = TID_HEALTHREGEN_BLUE - team;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_REGENS + GlobalMedic[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_AMMOREGEN || a) {\n\t\ttid = TID_AMMOREGEN_BLUE - team;\n\t\tLastHealth = GetActorSpeed (tid);\n\t\tperc = GetActorHealth (tid) * 99 / HP_REGENS + GlobalAmmo[1-team];\n\t\tif (perc < 0) perc = 0;\n\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t}\n\n\tif (what == BUILDING_PORTAL || a) {\n\t\t// [Dusk] we can't tell from the building index which\n\t\t// portal end is changing. Update both.\n\t\tfor (int i = 0; i <= 1; i++) {\n\t\t\tint idx = i + 2*team;\n\n\t\t\ttid = TID_PORTAL_BLUE1 + idx;\n\t\t\tLastHealth = GetActorSpeed (tid);\n\t\t\tperc = GetActorHealth (tid) * 99 / HP_PORTAL + Portals[idx];\n\t\t\tif (perc < 0) perc = 0;\n\t\t\tif (perc != LastHealth) {SetActorSpeed (tid, perc); u = true;}\n\t\t}\n\t}\n\n\tif (u) ACS_ExecuteAlways (931, 0); // tell clients to update the hud\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * This part of the code actually causes the HUD to show up. As clients are\n * not aware of mobjs' healths, the above script sets the speed properties to\n * desired percentage values - these are used instead.\n *\n * Script 945 is a daemon script executed by the client-side script 943 - see\n * a_clientfx.acs for these scripts. Script 931 is called by the server to\n * tell clients to update the HUD. This way, updates to the hud are instant.\n */\n\nscript 931 (void) NET CLIENTSIDE BaseHUDUpdate = 1;\nscript 945 (void) NET CLIENTSIDE {\n\tdelay (5);\n\n\t// for the first three seconds, update the hud every second\n\t// the speed information of terminals doesn't travel instantly...\n\tDisplayBuildingHud ();\n\tfor (int i = 0; i <= 2; i++) {\n\t\tdelay (35);\n\t\tDisplayBuildingHud ();\n\t}\n\n\t// begin idle loop. whenever we are told to update\n\t// the hud, do so.\n\twhile (1) {\n\t\tif (BaseHudUpdate) {\n\t\t\tDisplayBuildingHud ();\n\t\t\tBaseHudUpdate = false;\n\t\t}\n\t\tdelay (1);\n\t}\n\trestart;\n}\n\nfunction void DisplayBuildingHud (void) {\n\tSetFont (\"SMALLFONT\");\n\tHudMessageBold (s:ExistsBuilding (101), s:\"Barracks\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (101)), d:GetActorSpeed (101), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (103), s:\"Refinery\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (103)), d:GetActorSpeed (103), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (105), s:\"Research Centre\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (105)), d:GetActorSpeed (105), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (107), s:\"War Factory\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (107)), d:GetActorSpeed (107), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (114), s:\"Obelisk of Light\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (114)), d:GetActorSpeed (114), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (109), s:\"++\", s:ExistsBuilding (109), s:\"Repair Facility\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (109)), d:GetActorSpeed (109), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (903), s:\"++\", s:ExistsBuilding (903), s:\"HP Regen\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (903)), d:GetActorSpeed (903), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (905), s:\"++\", s:ExistsBuilding (905), s:\"Ammo Regen\\cc: \",\n\t\ts:ColorCodeHealth (GetActorSpeed (905)), d:GetActorSpeed (905), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen(901), s:\"++\", s:ExistsBuilding (901), s:\"Mini Refinery\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (901)), d:GetActorSpeed (901), s:\"\\cc%\\n\",\n\t\ts:PortalLinkColor (TEAM_BLUE, 0), s:\"++\", s:PortalLinkColor (TEAM_BLUE, 1), s:\"Portal\\cc: \",\n\t\ts:ColorCodeHealth(PortalHealth (TID_PORTAL_BLUE1)), d:PortalHealth (TID_PORTAL_BLUE1), s:\"\\cc% / \",\n\t\ts:ColorCodeHealth(PortalHealth (TID_PORTAL_BLUE2)), d:PortalHealth (TID_PORTAL_BLUE2), s:\"\\cc%\";\n\t\tHUDMSG_PLAIN, 8850, CR_BLUE, 0.012, 0.52, 0.0);\n\n\tHudMessageBold (s:ExistsBuilding (201), s:\"Barracks\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (201)), d:GetActorSpeed (201), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (203), s:\"Refinery\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (203)), d:GetActorSpeed (203), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (205), s:\"Research Centre\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (205)), d:GetActorSpeed (205), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (207), s:\"War Factory\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (207)), d:GetActorSpeed (207), s:\"\\cc%\\n\",\n\t\ts:ExistsBuilding (214), s:\"Obelisk of Light\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (214)), d:GetActorSpeed (214), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (209), s:\"++\", s:ExistsBuilding (209), s:\"Repair Facility\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (209)), d:GetActorSpeed (209), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (902), s:\"++\", s:ExistsBuilding (902), s:\"HP Regen\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (902)), d:GetActorSpeed (902), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen (904), s:\"++\", s:ExistsBuilding (904), s:\"Ammo Regen\\cc: \",\n\t\ts:ColorCodeHealth (GetActorSpeed (904)), d:GetActorSpeed (904), s:\"\\cc%\\n\",\n\t\ts:ExistsBuildingGreen(900), s:\"++\", s:ExistsBuilding (900), s:\"Mini Refinery\\cc: \",\n\t\ts:ColorCodeHealth(GetActorSpeed (900)), d:GetActorSpeed (900), s:\"\\cc%\\n\",\n\t\ts:PortalLinkColor (TEAM_RED, 0), s:\"++\", s:PortalLinkColor (TEAM_RED, 1), s:\"Portal\\cc: \",\n\t\ts:ColorCodeHealth(PortalHealth (TID_PORTAL_RED1)), d:PortalHealth (TID_PORTAL_RED1), s:\"\\cc% / \",\n\t\ts:ColorCodeHealth(PortalHealth (TID_PORTAL_RED2)), d:PortalHealth (TID_PORTAL_RED2), s:\"\\cc%\";\n\t\tHUDMSG_PLAIN, 8851, CR_RED, 0.012, 0.74, 0.0);\n\n\tint bluelives = GetActorSpeed (TID_TICKETCOUNTER_BLUE);\n\tint redlives = GetActorSpeed (TID_TICKETCOUNTER_RED);\n\tif (GetCVar (\"aow_forcelivehud\") || bluelives || redlives) {\n\t\tint startlives = GetActorAngle (TID_TICKETCOUNTER_BLUE);\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessageBold (\n\t\t\ts:\"\\cHLives\\cC: \", s:FractionColor (bluelives, startlives), d:bluelives,\n\t\t\ts:\"\\n\\cGLives\\cC: \", s:FractionColor (redlives, startlives), d:redlives;\n\t\t\tHUDMSG_PLAIN, 8852, CR_BLUE, 0.012, 0.4, 0.0);\n\t}\n}\n\nfunction int PortalHealth (int t) {\n\tif (!ThingCount (T_NONE, t)) return 0;\n\tint s = GetActorSpeed (t);\n\tif (s < 0) return 0;\n\treturn s;\n}\n\nfunction str PortalLinkColor (int team, int teamcolor) {\n\tint t1 = TID_PORTAL_BLUE1 + 2*team;\n\tint t2 = TID_PORTAL_BLUE2 + 2*team;\n\tint exists = ThingCount (T_NONE, t1) && ThingCount (T_NONE, t2);\n\tif (exists) {\n\t\tif (!teamcolor) return \"\\cD\";\n\t\tif (team == TEAM_BLUE) return \"\\cH\";\n\t\treturn \"\\cG\";\n\t}\n\treturn \"\\cM\";\n}\n\nfunction str ColorCodeHealth(int Percentage)\n{\n\tif (Percentage == 100) // 100%\n\t\treturn \"\\cq\";\n\telse if (Percentage > 75) // healthy\n\t\treturn \"\\cd\";\n\telse if (Percentage > 50) // moderate\n\t\treturn \"\\cf\";\n\telse if (Percentage > 25) // low\n\t\treturn \"\\ci\";\n\telse if (Percentage > 0) // critical\n\t\treturn \"\\cr\";\n\treturn \"\\cm\"; //destroyed\n}\n\nfunction str ExistsBuilding (int tid) {\n\tif (tid <= 199 || (tid >= 900 && tid % 2 == 1)) {\n\t\tif (GetActorSpeed (tid) > 0)\n\t\t\treturn \"\\cH\";\n\t\telse\n\t\t\treturn \"\\cM\";\n\t} else {\n\t\tif (GetActorSpeed (tid) > 0)\n\t\t\treturn \"\\cG\";\n\t\telse\n\t\t\treturn \"\\cM\";\n\t}\n\n\treturn \"\\cU\";\n}\n\nfunction str ExistsBuildingGreen (int tid) {\n\tif (GetActorSpeed (tid) > 0)\n\t\treturn \"\\cD\";\n\treturn \"\\cM\";\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_bases.txt",
        "contents": "//---------------------------BLUE BARRACKS DEATH\nscript 101 (VOID)\n{\n\tThing_Destroy(100,0);\n\tThing_Destroy(101,0);\n\tACS_ExecuteAlways(99, 0, TEAM_BLUE);\n\tGotBarracks[1] = False;\n\tBaseLeft[1]--;\n\tSetLineTexture(1,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tSetLineTexture(3,SIDE_FRONT,TEXTURE_MIDDLE,\"MCT3\");\n\tReddenSector (1);\n\tReddenSector (2);\n\n\tSetFont(\"BIGFONT\");\n\tHudMessageBold(s:\"The \\chBlue Barracks\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue Barracks.\");\n\tAwardBuildingDestruction (TEAM_RED, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_BARRACKS, TEAM_BLUE);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_BARRACKS, TEAM_BLUE);\n}\n\n//---------------------------BLUE REFINERY DEATH\nscript 102 (VOID)\n{\n\tThing_Destroy(102,0);\n\tThing_Destroy(103,0);\n\tACS_ExecuteAlways(99, 0, TEAM_BLUE);\n\tGotRefinery[1] = False;\n\tBaseLeft[1]--;\n\tSetLineTexture(5,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tReddenSector (5);\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\chBlue Refinery\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue Refinery.\");\n\tAwardBuildingDestruction (TEAM_RED, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_REFINERY, TEAM_BLUE);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_REFINERY, TEAM_BLUE);\n}\n\n//---------------------------BLUE POWERPLANT DEATH\nscript 103 (void) {\n\tThing_Destroy(104,0);\n\tThing_Remove(104);\n\tThing_Destroy(105,0);\n\tACS_ExecuteAlways(99, 0, TEAM_BLUE);\n\tGotPlant[1] = False;\n\tBaseLeft[1]--;\n\tSetLineTexture(7,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tSetLineTexture(3,SIDE_FRONT,TEXTURE_MIDDLE,\"MCT3\");\n\tReddenSector (7);\n\tReddenSector (2);\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\chBLUE Research Centre\\cd has been destroyed!!\";\n\t\tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue Research Centre.\");\n\tAwardBuildingDestruction (TEAM_RED, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_RESCENTRE, TEAM_BLUE);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_PLANT, TEAM_BLUE);\n}\n\n//---------------------------BLUE WAR FACTORY DEATH\nscript 104 (VOID)\n{\n\tThing_Destroy(106,0);\n\tThing_Destroy(107,0);\n\tACS_ExecuteAlways(99, 0, TEAM_BLUE);\n\tGotFactory[1] = False;\n\tBaseLeft[1]--;\n\tSetLineTexture(9,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tReddenSector (9);\n\tReddenSector (10);\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\chBlue WarFactory\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue War Factory.\");\n\tAwardBuildingDestruction (TEAM_RED, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_FACTORY, TEAM_BLUE);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_FACTORY, TEAM_BLUE);\n}\n\n//---------------------------BLUE REPAIR FACILITY DEATH\nscript 105 (VOID)\n{\n\t//Thing_Remove(109);\n\tBaseHUDUpdate = 1;\n\tGotRepair[1] = False;\n\tReddenSector (13);\n\tReddenSector (14);\n\tSetActorProperty(109,APROP_Health,0);\n\n\t// SetFont(\"BIGFONT\");\n\t// HudMessageBold(s:\"The \\chBlue Repair Facility\\cd has been destroyed!!\";\n\t// \tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_REPAIR, TEAM_BLUE);\n\tSetFont (\"SMALLFONT\");\n\tHudMessageBold (n:0, s:\"\\cJ has destroyed\\cJ\\nthe \\cNBlue \\cFRepair Facility!\";\n\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue Repair Facility.\");\n\tACS_ExecuteAlways (930, 0, BUILDING_REPAIR, TEAM_BLUE);\n\tAwardBuildingDestruction (TEAM_RED, true);\n}\n\n//---------------------------BLUE OBELISK DEATH\nscript 114 (VOID)\n{\n\tThing_Destroy(114,0);\n\tThing_Destroy(115,0);\n\tACS_ExecuteAlways(99, 0, TEAM_BLUE);\n\tGotObelisk[1] = False;\n\tBaseLeft[1]--;\n\tReddenSector (19);\n\tSetLineTexture(11,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\chBlue Obelisk\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Blue Obelisk.\");\n\tAwardBuildingDestruction (TEAM_RED, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_OBELISK, TEAM_BLUE);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_OBELISK, TEAM_BLUE);\n}\n\n//---------------------------RED BARRACKS DEATH\nscript 201 (VOID)\n{\n\tThing_Destroy(200,0);\n\tThing_Destroy(201,0);\n\tACS_ExecuteAlways (99, 0, TEAM_RED);\n\n\tGotBarracks[0] = False;\n\tBaseLeft[0]--;\n\n\tSetLineTexture(2,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tSetLineTexture(4,SIDE_FRONT,TEXTURE_MIDDLE,\"MCT3\");\n\n\tReddenSector (3);\n\tReddenSector (4);\n\n\tSetFont(\"BIGFONT\");\n\tHudMessageBold(s:\"The \\cgRED Barracks\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red Barracks.\");\n\tAwardBuildingDestruction (TEAM_BLUE, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_BARRACKS, TEAM_RED);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_BARRACKS, TEAM_RED);\n}\n\n//---------------------------RED REFINERY DEATH\nscript 202 (VOID)\n{\n\tThing_Destroy(202,0);\n\tThing_Destroy(203,0);\n\tACS_ExecuteAlways(99, 0, TEAM_RED);\n\tGotRefinery[0] = False;\n\tBaseLeft[0]--;\n\tSetLineTexture(6,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tReddenSector (6);\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\cgRed Refinery\\cd has been destroyed!!\"; HUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red Refinery.\");\n\tAwardBuildingDestruction (TEAM_BLUE, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_REFINERY, TEAM_RED);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_REFINERY, TEAM_RED);\n}\n\n//---------------------------RED POWERPLANT DEATH\nscript 203 (VOID)\n{\n\tThing_Destroy(204,0);\n\tThing_Destroy(205,0);\n\tACS_ExecuteAlways(99, 0, TEAM_RED);\n\tGotPlant[0] = False;\n\tBaseLeft[0]--;\n\tSetLineTexture(8,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tSetLineTexture(4,SIDE_FRONT,TEXTURE_MIDDLE,\"MCT3\");\n\tReddenSector (8);\n\tReddenSector (4);\n\n\tSetFont(\"BIGFONT\");\n\tHudMessageBold(s:\"The \\cgRED Research Centre\\cd has been destroyed!!\";\n\t\tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red Research Centre.\");\n\tAwardBuildingDestruction (TEAM_BLUE, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_RESCENTRE, TEAM_RED);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_PLANT, TEAM_RED);\n}\n\n//---------------------------RED WAR FACTORY DEATH\nscript 204 (VOID)\n{\n\tThing_Destroy(206,0);\n\tThing_Destroy(207,0);\n\tACS_ExecuteAlways(99, 0, TEAM_RED);\n\tGotFactory[0] = False;\n\tBaseLeft[0]--;\n\tSetLineTexture(10,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\tReddenSector (11);\n\tReddenSector (12);\n\tACS_ExecuteAlways (930, 0, BUILDING_FACTORY, TEAM_RED);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_FACTORY, TEAM_RED);\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\cgRed War Factory\\cd has been destroyed!!\";\n\t\tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red War Factory.\");\n\tAwardBuildingDestruction (TEAM_BLUE, false);\n}\n\n//---------------------------RED REPAIR FACILITY DEATH\nscript 205 (VOID) {\n\tBaseHUDUpdate = 1;\n\tGotRepair[0] = False;\n\tReddenSector (15);\n\tReddenSector (16);\n\tSetActorProperty(209,APROP_Health,0);\n\n\t/*SetFont(\"BIGFONT\");\n\tHudMessageBold(s:\"The \\cgRed Repair Facility\\cd has been destroyed!!\";\n\t\tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);*/\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_REPAIR, TEAM_RED);\n\tACS_ExecuteAlways (930, 0, BUILDING_REPAIR, TEAM_RED);\n\tSetFont (\"SMALLFONT\");\n\tHudMessageBold (n:0, s:\"\\cJ has destroyed\\cJ\\nthe \\cARed \\cFRepair Facility!\";\n\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red Repair Facility.\");\n\tAwardBuildingDestruction (TEAM_BLUE, true);\n}\n\n//---------------------------RED OBELISK DEATH\nscript 214 (VOID)\n{\n\tThing_Destroy(214,0);\n\tThing_Destroy(215,0);\n\tACS_ExecuteAlways(99, 0, TEAM_RED);\n\tGotObelisk[0] = False;\n\tBaseLeft[0]--;\n\tReddenSector (20);\n\tSetLineTexture(12,SIDE_FRONT,TEXTURE_BOTTOM,\"MCT2\");\n\n\tSetFont(\"BIGFONT\");\n\n\tHudMessageBold(s:\"The \\cgRed Obelisk\\cd has been destroyed!!\";\n\t\tHUDMSG_FADEOUT, 0, CR_Green, 0.5, 0.7, 2.0, 1.0);\n\tLog(n:0, s:\" destroys Red Obelisk.\");\n\tAwardBuildingDestruction (TEAM_BLUE, false);\n\tACS_ExecuteAlways (930, 0, BUILDING_OBELISK, TEAM_RED);\n\tif (EventScripts) ACS_ExecuteAlways (960, 0, ACTION_DESTROY_OBELISK, TEAM_RED);\n}\n\nscript 97 (int Structure, int Team) CLIENTSIDE {\n\t// stfu during degeneration\n\tif (SuddenDeath && GetCVar (\"aow_degeneration\")) terminate;\n\n\tif ( Timer() > LastAttackMessage+35*15 ) {\n\t\tif(Structure == 1 && Team == 0)\n\t\t\tAmbientSound(\"red/barracks\",255);\n\t\tif(Structure == 2 && Team == 0)\n\t\t\tAmbientSound(\"red/refinery\",255);\n\t\tif(Structure == 3 && Team == 0)\n\t\t\tAmbientSound(\"red/powerplant\",255);\n\t\tif(Structure == 4 && Team == 0)\n\t\t\tAmbientSound(\"red/factory\",255);\n\t\tif(Structure == 6 && Team == 0)\n\t\t\tAmbientSound(\"red/obelisk\",255);\n\t\tif(Structure == 1 && Team == 1)\n\t\t\tAmbientSound(\"blue/barracks\",255);\n\t\tif(Structure == 2 && Team == 1)\n\t\t\tAmbientSound(\"blue/refinery\",255);\n\t\tif(Structure == 3 && Team == 1)\n\t\t\tAmbientSound(\"blue/powerplant\",255);\n\t\tif(Structure == 4 && Team == 1)\n\t\t\tAmbientSound(\"blue/factory\",255);\n\t\tif(Structure == 6 && Team == 1)\n\t\t\tAmbientSound(\"blue/obelisk\",255);\n\t\tLastAttackMessage = Timer();\n\t}\n}\n\nscript 99 (int team) NET CLIENTSIDE {\n\tif (team == TEAM_RED) {\n\t\tAmbientSound(\"red/destroyed\",255);\n\t\tAmbientSound(\"red/destroyed\",255);\n\t} else {\n\t\tAmbientSound(\"blue/destroyed\",255);\n\t\tAmbientSound(\"blue/destroyed\",255);\n\t}\n}\n\n// btos call this to cause external damage\nscript 652 (int tid, int damage) {\n\tSetActivatorToTarget (0);\n\tThing_Damage (tid, damage, 0);\n}\n\nfunction void AwardBuildingDestruction (int team, int small) {\n\tint activator = ActivatorTID();\n\tfor (int k = 0; k <= 31; k++) {\n\t\tif (PlayerInGame(k) && GetPlayerInfo(k,PLAYERINFO_TEAM) == Team) {\n\t\t\tSetActivator(3800+k);\n\t\t\tACS_ExecuteAlways (318,0);\n\t\t\tGiveCredits (-1, 500);\n\t\t}\n\t}\n\n\t// restore activator for point awarding\n\tSetActivator (activator);\n\n\t// no latent functions in functions\n\tACS_ExecuteAlways (653, 0, team, small);\n}\n\nscript 653 (int team, int small) {\n\tif (BaseLeft [team] <= 0) {\n\t\tGameOver = true;\n\t\tConsoleCommand (\"pointlimit 1\");\n\t\tdelay (5);\n\t}\n\n\tint d = 0;\n\tint points;\n\n\t// Count difference, but don't let it be negative.\n\t// Give static 40 on minor structure deaths\n\tif (!small) {\n\t\tint ratio;\n\t\tif (BaseLeft[team])\n\t\t\tratio = (BaseLeft[1-team] << 16) / BaseLeft[team];\n\t\telse\n\t\t\tratio = 1.0;\n\n\t\tif (team == TEAM_RED)\n\t\t\td = BlueScore () - RedScore ();\n\t\telse\n\t\t\td = RedScore () - BlueScore ();\n\n\t\tif (d < 0)\n\t\t\tpoints = 0;\n\t\telse\n\t\t\tpoints = (ratio * (d+GetCVAR (\"aow_buildingpoints\"))) >> 16;\n\t} else {\n\t\tpoints = 40;\n\t}\n\n\tTeam_GivePoints (team, points, false);\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_botmarines.txt",
        "contents": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * All Out War 2 AI marine scripts\n * Credit to VoltlocK for originally creating the engine\n * With modifications by Eruanna, Dusk and the Omega Team\n *\n * You may use portions of this script in your project as long as you give\n * credit where credit is due. Please don't be lame and just copy-paste any\n * of this and call it your own. Thanks!\n */\n\n/* Get a free slot ID. Make sure you actually spawn one marine with the tid\n * (and ONLY one) when you do this! Marines will, however, call this by\n * themselves if you do not do so beforehand.\n */\nfunction int AI_RequestID (void) {\n\tint tid;\n\tint i = 0;\n\twhile (Bots[i] && i < MAX_MARINES)\n\t\ti++;\n\n\tif (i >= MAX_MARINES) {\n\t\tLog (s:\"AI_RequestID: Too many AI marines!\");\n\t\treturn -1;\n\t}\n\n\tAIMarineCount++;\n\tBots[i] = true;\n\treturn i;\n}\n\nfunction bool AI_ClearMarine (int i) {\n\tif (!Bots[i]) {\n\t\tLog (s:\"AI_ClearMarine: Marine \", d:i, s:\" doesn't exist.\");\n\t\treturn false;\n\t}\n\n\tAIMarineCount--;\n\tBots[i] = false;\n\n\t// death script calls this as well\n\tif (GetActorHealth (TID_MARINE + i) > 0)\n\t\tSetActorState (TID_MARINE + i, \"Dismiss\");\n\n\t// clear the TID\n\tThing_ChangeTID (TID_MARINE + i, 0);\n\treturn true;\n}\n\n// What team is a marine on?\nfunction int AI_GetTeam (int i) {\n\tif (!Bots[i]) {\n\t\tLog (s:\"AI_GetTeam: Tried to get the team of non-existant marine #\", d:i, s:\"!\");\n\t\treturn -1;\n\t}\n\n\treturn CheckActorInventory (TID_MARINE + i, \"IsRed\");\n}\n\n// Was the marine spawned by compensation?\nfunction int AI_IsCompensation (int i) {\n\tif (!Bots[i]) {\n\t\tLog (s:\"AI_GetCompensation: Tried to get the compensation status of non-existant marine #\", d:i, s:\"!\");\n\t\treturn -1;\n\t}\n\n\treturn CheckActorInventory (TID_MARINE + i, \"IsCompensationMarine\");\n}\n\n// Init a marine\nscript SC_MARINE_INIT (void) {\n\tGiveInventory (\"IsAIMarine\", 1);\n\n\t// if we haven't got an ID already, get one\n\tif (ActivatorTID() == 0) {\n\t\tint i = AI_RequestID ();\n\t\tif (i != -1)\n\t\t\tThing_ChangeTID (0, TID_MARINE + i);\n\t\telse\n\t\t\tThing_Remove (0); // oh gn0 we hit the limit!\n\t}\n\n\tSetThingSpecial (0, ACS_ExecuteAlways, SC_MARINE_DEATH, 0, ActivatorTID()-TID_MARINE);\n}\n\n// ==== TEAM UNBALANCE COMPENSATION\n// [Dusk] There are clearly unbalanced teams, and the game has already started. Even despite\n// we try balance teams via the switcher, surplus remains. Therefore, the weaker team is\n// put on on compensation and give them AI marines. We keep doing this until teams are\n// balanced out.\nfunction void AI_ManageCompensation (void) {\n\tif (Timer() <= 5*30*35 || GetCVar (\"aow_nocompensation\")) return;\n\tint n;\n\n\t// recalculate AI marine needs\n\tif (RedCount() > BlueCount() + 1 + (RedCount() > 7) && BlueCount() != 0)\n\t\tAIMarines[TEAM_BLUE] = RedCount() - (BlueCount() + 1 + (RedCount() > 7));\n\telse if (AIMarines[TEAM_BLUE] > 0)\n\t\tAIMarines[TEAM_BLUE] = 0;\n\n\tif (BlueCount() > RedCount() + 1 + (BlueCount() > 7) && RedCount() != 0)\n\t\tAIMarines[TEAM_RED] = BlueCount() - RedCount() + 1 + (BlueCount() > 7);\n\telse if (AIMarines[TEAM_RED] > 0)\n\t\tAIMarines[TEAM_RED] = 0;\n\n\t// make sure teams have the right amount of marines\n\tACS_ExecuteAlways (SC_MARINE_COMPENSATION, 0, TEAM_BLUE);\n\tACS_ExecuteAlways (SC_MARINE_COMPENSATION, 0, TEAM_RED);\n}\n\nscript SC_MARINE_COMPENSATION (int team) {\n\tint AICount;\n\tint AISpawner;\n\tint spottid;\n\n\tfor (int i = 0; i < MAX_MARINES; i++) {\n\t\tif (!Bots[i]) continue;\n\t\tif (AI_GetTeam (i) == team && AI_IsCompensation (i)) AICount++;\n\t}\n\n\tif (team == TEAM_BLUE)\n\t\tspottid = TID_REPAIR_BLUE;\n\telse\n\t\tspottid = TID_REPAIR_RED;\n\n\tint delta = AICount - AIMarines[team];\n\ti = 0;\n\tif (delta == 0)\n\t\tterminate;\n\telse if (delta > 0) {\n\t\t// Too many marines - send one of them home\n\t\tlog (s:\"Compensation: Removing \", d:delta, s:\" marines from \", s:TeamNames[team], s:\".\");\n\t\twhile (i < MAX_MARINES && delta > 0) {\n\t\t\tif (!Bots[i]) {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (AI_IsCompensation (i) && AI_GetTeam (i) == team) {\n\t\t\t\t// found one!\n\t\t\t\tAI_ClearMarine (i);\n\t\t\t\tdelta--;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t} else {\n\t\twhile (AICount < AIMarines[team]) {\n\t\t\ti = AI_RequestID ();\n\t\t\tif (i == -1) break;\n\n\t\t\tint spawned = 0;\n\t\t\tint tries = 5;\n\t\t\tint fail = 1;\n\t\t\twhile (tries > 0 && !spawned) {\n\t\t\t\t// spawn the marine initially onto the repair facility\n\t\t\t\tspawned = SpawnSpotForced (AISpawner, spottid, TID_MARINE + i, 0);\n\t\t\t\tif (spawned) {\n\t\t\t\t\tAICount += spawned;\n\n\t\t\t\t\tdelay (1);\n\n\t\t\t\t\t// flag the marine as compensation\n\t\t\t\t\tGiveActorInventory (TID_MARINE + i, \"IsCompensationMarine\", 1);\n\n\t\t\t\t\t// move the newly-spawned bot to a random spawn in the base, but\n\t\t\t\t\t// only spawn fog at the destination. don't want teleport fogs\n\t\t\t\t\t// to randomly appear in the repair facility\n\t\t\t\t\tTeleportOther (TID_MARINE + i, team+1, false);\n\t\t\t\t\tSpawnSpotForced (\"TeleportFog\", TID_MARINE + i, 0, 0);\n\t\t\t\t} else {\n\t\t\t\t\tfail = 0;\n\t\t\t\t\ttries--;\n\t\t\t\t}\n\n\t\t\t\tdelay (35);\n\t\t\t}\n\n\t\t\t// something's seriously wrong...\n\t\t\tif (fail) {\n\t\t\t\tLog (s:\"Compensation: Couldn't spawn marines to \", s:TeamNames[team], s:\"!\");\n\t\t\t\tterminate;\n\t\t\t}\n\t\t}\n\n\t\tlog (s:\"Compensation: \", d:-delta, s:\" marines spawned for \", s:TeamNames[team], s:\".\");\n\t}\n}\n\n// AI marine bounty\nscript SC_MARINE_DEATH (int i) {\n\t// no matter what happened to the marine, the slot needs to\n\t// be cleared now that it's dead. save it's team first,\n\t// we can't get it after the slot's clear\n\tint AITeam = AI_GetTeam (i);\n\tAI_ClearMarine (i);\n\n\tif (ActivatorTID() < 3800 || ActivatorTID() > 3831) terminate;\n\tif (PlayerTeam() == AITeam) terminate;\n\tLocalAmbientSound (\"game/boink\", 127);\n\tAddExperience (50);\n\tAddCredits (Credits[PlayerNumber()+1], CreditFragAward);\n\tTakeTickets (AITeam, 1);\n\n\tTeam_GivePoints (PlayerTeam(), 2, false);\n}\n\n// Dumps known information about AI marines\nscript SC_MARINE_STATS (void) {\n\tfor (int i = 0; i < MAX_MARINES; i++) {\n\t\tif (!Bots[i]) {\n\t\t\tLog (s:\"Marine \", d:i, s:\": -\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tint compensation = \"\";\n\t\tif (AI_IsCompensation (i)) {compensation = \" (compensation)\";}\n\n\t\tLog (s:\"Marine \", d:i, s:\": \", s:TeamNames[AI_GetTeam (i)], s:compensation);\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_bots.txt",
        "contents": "// BOT SUPPORT\nint BotClassCosts[13] = {0, 400, 200, 450, 550, 600, 550, 400, 600, 600, 1000, 650, 800};\nint BotClassNumbers[13] = {20, 22, 54, 24, 27, 33, 34, 53, 61, 35, 36, 44, 60};\nint BotClassBarDependencies[13]   = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\nint BotClassPlantDependencies[13] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};\n\nscript 888 ENTER {\n\tif (!PlayerIsBot(PlayerNumber())) terminate;\n\tACS_ExecuteAlways(92,0,0,0,0);\n\tint chance = random(0,100);\n\tdelay (35);\n\n\tGiveInventory(\"PurchaseToken\",1);\n\n\tdelay (10);\n\n\tint i; int team = 1-PlayerTeam();\n\tint max = 12; int x;\n\tif (!GotPlant[Team]) max = 8;\n\tif (!GotBarracks[Team]) max = 2;\n\n\t// PrintBold (n:0, s:\"\\c-: I have \\cQ$\\cD\", d:Credits[PlayerNumber()+1]);\n\n\t// [Dusk]  save some computing time - see if we can only afford an ssg\n\tif (Credits[PlayerNumber()+1] < 400) {\n\t\tif (Credits[PlayerNumber()+1] >= 200)\n\t\t\ti = 2;\n\t\telse\n\t\t\ti = 0; // if not, pick gunman\n\t} else {\n\t\twhile (x < 5) {\n\t\t\ti = random(0, max);\n\t\t\tif ((GotBarracks[Team] || !BotClassBarDependencies[i]) &&\n\t\t\t\t(GotPlant[Team] || !BotClassPlantDependencies[i]) &&\n\t\t\t\tCredits[PlayerNumber()+1] >= BotClassCosts[i])\n\t\t\t\tbreak;\n\t\t\tx++;\n\t\t}\n\n\t\t// [Dusk] can't decide? simple logic solves the problem.\n\t\tif (x == 5) {\n\t\t\tif (Credits[PlayerNumber()+1] >= 200)\n\t\t\t\ti = 2;\n\t\t\telse\n\t\t\t\ti = 0;\n\t\t}\n\t}\n\n\tACS_ExecuteAlways (BotClassNumbers[i], 0, team);\n}\n\nscript 889 RESPAWN {\n\tACS_ExecuteAlways(888, 0);\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_clientfx.txt",
        "contents": "// Clientside effects and designation actors\nint ChemSmokers[32];\n\nscript 943 OPEN CLIENTSIDE {\n\t// [SP] This script allows clients to keep track of what player# they are\n\tConsoleCommand (\"puke 944\");\n\n\tdelay (5);\n\n\t// get outside the spawn room\n\tif (!PlayerInGame (PlayerNumber ()))\n\t\tConsoleCommand (\"puke 940\");\n\n\tdelay (5);\n\n\t// effects + hud\n\tConsoleCommand (\"puke 366\");\n\n\t// bodycount clock\n\t// ConsoleCommand (\"puke 368\");\n\n\t// building HUD\n\tConsoleCommand (\"puke 945\");\n}\n\nscript 944 (void) NET CLIENTSIDE {ConsolePlayer = PlayerNumber();}\nscript 946 (void) NET CLIENTSIDE {Log(s:\"I am player \", d:ConsolePlayer, s:\" named \", n:0);}\n\nscript 366 (void) NET CLIENTSIDE {\n\tif (PlayerIsBot(PlayerNumber())) terminate;\n\tif (ConsolePlayer == -1) terminate;\n\n\t// if (GetCVAR (\"aow_nofriendinfo\") <= 0) ConsoleCommand (\"set aow_nofriendinfo 0\");\n\n\tint teammate, i;\n\twhile (1) {\n\t\tdelay (32);\n\t\tSpawnSpotForced (\"TiberiumChemSmoke\", 402, 0, 0);\n\n\t\t// display smoke on tib-carrying players\n\t\tfor (i = 0; i <= 31; i++) {\n\t\t\tif (CheckActorInventory (3800+i, \"TiberiumCrystal\") && !ChemSmokers[i])\n\t\t\t\tACS_ExecuteAlways (355, 0, i, 0);\n\t\t}\n\n\t\t// see friendly stealths\n\t\tfor (i = 0; i <= 31; i++) {\n\t\t\tteammate = GetPlayerInfo (i, PLAYERINFO_TEAM) == GetPlayerInfo (ConsolePlayer, PLAYERINFO_TEAM);\n\t\t\tif (!PlayerInGame (ConsolePlayer)) teammate = 1; // spects\n\t\t\tif (CheckActorProperty (3800+i, APROP_RenderStyle, STYLE_None) && teammate && i != ConsolePlayer)\n\t\t\t\tACS_ExecuteAlways (355, 0, i, 1);\n\t\t}\n\n\t\t// jumpjet fire\n\t\tfor (i = 0; i <= 31; i++) {\n\t\t\tif (CheckActorInventory (3800+i, \"JumpjetSwitch\") && !ChemSmokers[i])\n\t\t\t\tACS_ExecuteAlways (355, 0, i, 2);\n\t\t}\n\t}\n}\n\nscript 355 (int i, int what) CLIENTSIDE {\n\tint x;\n\tswitch (what) {\n\tcase 0:\n\t\t// chem smoke for tiberium players\n\n\t\t// no double running\n\t\tif (ChemSmokers[i]) terminate;\n\t\tChemSmokers[i] = 1;\n\n\t\tfor (x = 0; x < 5; x++) {\n\t\t\tif (!CheckActorInventory (3800+i, \"TiberiumCrystal\")) {ChemSmokers[i] = 0; terminate;}\n\t\t\tSpawnSpotForced (\"TiberiumChemSmokePlayer\", 3800+i, 0, GetActorAngle(3800+i)>>8);\n\t\t\tdelay (6);\n\t\t}\n\t\tChemSmokers[i] = 0;\n\t\tbreak;\n\tcase 1:\n\t\t// visible friendly stealths\n\t\tSetActorProperty (3800+i, APROP_RenderStyle, STYLE_Translucent);\n\t\tSetActorProperty (3800+i, APROP_Alpha, 0.4);\n\t\tfor (x = 0; x < 6; x++) {\n\t\t\tif (!CheckActorProperty (3800+i, APROP_RenderStyle, STYLE_Translucent)) terminate;\n\t\t\tif (CheckActorInventory (3800+i, \"StealthMode\") != 1) terminate;\n\t\t\tSetActorProperty (3800+i, APROP_Alpha, 0.4 + (random(0,10) << 16)/10); // flicker a bit :P\n\t\t\tdelay (5);\n\t\t}\n\t\tSetActorProperty (3800+i, APROP_RenderStyle, STYLE_None);\n\t\tSetActorProperty (3800+i, APROP_Alpha, 0.0);\n\t\tbreak;\n\tcase 2:\n\t\t// jumpjet fire\n\t\t// ChemSmokers[] is used here as well - no conflicts can happen since no\n\t\t// player can be harvester and have jumpjet at the same time.\n\t\tif (ChemSmokers[i]) terminate;\n\t\tChemSmokers[i] = 1;\n\n\t\tfor (x = 0; x < 10; x++) {\n\t\t\tif (!CheckActorInventory (3800+i, \"JumpjetSwitch\")) {ChemSmokers[i] = 0; terminate;}\n\t\t\tSpawnSpotForced (\"JumpjetFire\", 3800+i, 0, GetActorAngle(3800+i)>>8);\n\t\t\tdelay (3);\n\t\t}\n\t\tChemSmokers[i] = 0;\n\t\tbreak;\n\t}\n}\n\nscript 400 OPEN CLIENTSIDE {\n\twhile (1) {\n\t\tif (!GetCVAR (\"hud_scale\"))\n\t\t\tConsoleCommand(\"set hud_scale true\");\n\t\tdelay(1);\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_clssc.txt",
        "contents": "// All Out War 2 Class purchase scripts\n// Credit to VoltlocK for originally creating the engine\n// With modifications by Eruanna, Dusk and the Omega Team\n\n// You may use portions of this script in your project as long as you give credit where credit is\n// due. Please don't be lame and just copy-paste any of this and call it your own. Thanks!\n\n//---------------------------GUNMAN\nscript 20 (int Team) {\n\tint cost = 0; int speed = 1.0;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS01\", cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tDisplayTick();\n\tSpendCredits(Credits[PlayerNumber()+1], 0);\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfgunman!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"NewClipAmmo\",160);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory (\"TimedC4\", 1);\n\tGiveInventory (\"TimedC4Count\", 1);\n\tSetFragGrenades (1);\n\tGiveInventory(\"SubMachineGun\",1);\n\tSetWeapon(\"SubMachineGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_GUNMAN);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Gunman.\");\n}\n\n//---------------------------ENGINEER\nscript 21 (int Team) {\n\tint cost = 0; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS02\", cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tDisplayTick();\n\tSpendCredits(Credits[PlayerNumber()+1], 0);\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are an \\cfEngineer!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"NewClipAmmo\",120);\n\tGiveInventory(\"Handgun\",1);\n\tSetFragGrenades (1);\n\tGiveInventory (\"EnhancedTimedC4\",1);\n\tGiveInventory (\"TimedC4\",1);\n\tGiveInventory (\"TimedC4Count\",1);\n\tGiveInventory(\"RepairGun\",1);\n\tSetWeapon(\"RepairGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_ENGINEER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Engineer.\");\n}\n\n//---------------------------MINIGUNNER\nscript 22 (int Team) {\n\tint cost = 400; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS03\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfMinigunner!\"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tSetFont (\"SMALLFONT\");\n\tHudMessage(s:\"Use \\cfAlt-Fire\\cd for \\cjAnti-Mech attack\\cd!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 3.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"GatlingGun\",1);\n\tGiveInventory(\"MachineGunAmmo\",400);\n\tSetWeapon(\"GatlingGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_MINIGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes minigunner.\");\n}\n\n//---------------------------TECHNICIAN\nscript 23 (int Team) {\n\tint cost = 200; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS04\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfTechnician!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0, APROP_SPEED, 0.8);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\",2);\n\tGiveInventory(\"TimedC4Count\",2);\n\tGiveInventory (\"ProxyMine\", 4);\n\tGiveInventory (\"ProxyMineCount\", 4);\n\tSetFragGrenades (2);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"RepairGunUpgrade\",1);\n\tGiveInventory(\"RepairGun\",1);\n\tSetWeapon(\"RepairGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_TECHNICIAN);\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Technician.\");\n}\n\n//---------------------------FLAMER\nscript 24 (int Team) {\n\tint cost = 450; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS05\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 450);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfFlamethrower!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_FIRE);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"NewClipAmmo\",120);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"Flamer\",1);\n\tGiveInventory(\"FlamerAmmo\",400);\n\tGiveInventory(\"PhosphorusGrenadeAmmo\",4);\n\tSetWeapon(\"Flamer\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_FLAMER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Flamethrower.\");\n}\n\n//---------------------------RIFLEMAN\nscript 25 (int Team) {\n\tint cost = 200; int speed = 0.9;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS06\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfRifleman!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"NewClipAmmo\", 90);\n\tGiveInventory(\"Handgun\", 1);\n\tGiveInventory(\"TimedC4\", 1);\n\tGiveInventory(\"TimedC4Count\", 1);\n\tGiveInventory(\"FragGrenade\", 1);\n\tGiveInventory(\"FragGrenadeAmmo\", 1);\n\tACS_ExecuteAlways(91, 0);\n\tGiveInventory(\"Rifle\", 1);\n\tGiveInventory(\"RifleAmmo\", 30);\n\tGiveInventory(\"RifleGrenadeAmmo\", 4);\n\tSetWeapon(\"Rifle\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_RIFLEMAN);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Rifleman.\");\n}\n\n//---------------------------SUPPORT / MACHINE GUNNER\nscript 26 (int Team) {\n\tint cost = 300; int speed = 0.9;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS07\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are \\cfMachine Gunner!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"NewClipAmmo\", 90);\n\tGiveInventory(\"Handgun\", 1);\n\tGiveInventory(\"SubMachineGun\", 1);\n\tGiveInventory(\"TimedC4\", 1);\n\tGiveInventory(\"TimedC4Count\", 1);\n\tGiveInventory(\"MachineGunAmmo\", 160);\n\tGiveInventory(\"FragGrenade\", 1);\n\tSetAmmoCapacity(\"FragGrenadeAmmo\", 2);\n\tGiveInventory(\"FragGrenadeAmmo\", 2);\n\tACS_ExecuteAlways(91, 0);\n\tGiveInventory(\"MachineGun\", 1);\n\tSetWeapon(\"MachineGun\");\n\n\tGiveInventory(\"SpawnInvulnerability\", 1);\n\tGiveInventory (\"ClassID\", CLASS_MACHINEGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes machine gunner.\");\n}\n\n//---------------------------GRENADIER\nscript 27 (int Team) {\n\tint cost = 550; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS08\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfGrenadier!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_EXPLO);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"Rifle\",1);\n\tGiveInventory(\"RifleAmmo\",20);\n\tGiveInventory(\"RifleGrenadeAmmo\",2);\n\tSetFragGrenades (4);\n\n\tGiveInventory(\"Grenade_Launcher\",1);\n\tGiveInventory(\"GrenadeAmmo\",40);\n\tSetWeapon(\"Grenade_Launcher\");\n\n\tACS_ExecuteAlways(91,0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_GRENADIER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Grenadier.\");\n}\n\n//---------------------------ROCKET SOLDIER\nscript 28 (int Team) {\n\tint cost = 500; int speed = 0.75;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS09\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfRocket Soldier!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_EXPLO);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"Rifle\",1);\n\tGiveInventory(\"RifleAmmo\",20);\n\tGiveInventory(\"RifleGrenadeAmmo\",2);\n\tGiveInventory(\"MissileAmmo\",30);\n\tSetFragGrenades (2);\n\tGiveInventory(\"MissileLauncher\",1);\n\tSetWeapon(\"MissileLauncher\");\n\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_ROCKETEER);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Rocket Soldier.\");\n\n\tACS_ExecuteAlways (961, 0, Team);\n}\n\n//---------------------------STEALTH TROOPER\nscript 29 (int Team) {\n\tint cost = 600; int speed = 0.95;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS10\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfStealth Trooper!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use Alt-Fire to toggle \\ccStealth.\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetArmorGrade (-1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetActorProperty(0,APROP_DeathSound,\"stealth/death\");\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"LaserRifleAmmo\",200);\n\tGiveInventory(\"FragGrenade\",1);\n\tGiveInventory(\"FragGrenadeAmmo\",1);\n\tGiveInventory(\"StealthLaserRifle\",1);\n\tGiveInventory(\"Knife\",1);\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_STEALTH);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\n\t// [Dusk] workaround for stealth knife sound..\n\tdelay (1);\n\tSetWeapon(\"StealthLaserRifle\");\n\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes stealth trooper.\");\n\n\tDelay(35*6);\n\tActivatorSound(\"misc/stealth\",255);\n}\n\n//---------------------------GAUSS GUNNER\nscript 33 (int Team) {\n\tint cost = 600; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS11\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfGauss Gunner!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tSetFont (\"SMALLFONT\");\n\tHudMessage(s:\"Use \\cfAlt-Fire\\cd for \\cjAnti-Mech attack\\cd!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 3.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_LASER);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"Rifle\",1);\n\tGiveInventory(\"RifleAmmo\",40);\n\tGiveInventory(\"RifleGrenadeAmmo\",0);\n\tGiveInventory(\"GaussRifleAmmo\",50);\n\tGiveInventory(\"FragGrenade\",1);\n\tSetAmmoCapacity(\"FragGrenadeAmmo\",2);\n\tGiveInventory(\"FragGrenadeAmmo\",2);\n\tGiveInventory(\"GaussRifle\",1);\n\tSetWeapon(\"GaussRifle\");\n\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_GAUSSGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes gauss gunner.\");\n}\n\n//---------------------------CHEM WARRIOR\nscript 34 (int Team) {\n\tint cost = 550; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS12\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",275);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfChem Warrior!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_CHEM);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"ChemicalAmmo\",200);\n\tGiveInventory(\"ChemicalGrenadeAmmo\",4);\n\tGiveInventory(\"FragGrenade\",1);\n\tSetAmmoCapacity(\"FragGrenadeAmmo\",2);\n\tGiveInventory(\"FragGrenadeAmmo\",2);\n\tACS_ExecuteAlways (91,0);\n\tGiveInventory(\"ChemicalSprayer\",1);\n\tSetWeapon(\"ChemicalSprayer\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_CHEMWARRIOR);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Chem warrior.\");\n\tDelay(35*6);\n\tActivatorSound(\"misc/chem\",255);\n}\n\n//---------------------------SHOCK TROOPER\nscript 35 (int Team) {\n\tint cost = 600; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS13\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",300);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfShock Trooper!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_LASER);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"FragGrenade\",1);\n\tSetAmmoCapacity(\"FragGrenadeAmmo\",2);\n\tGiveInventory(\"FragGrenadeAmmo\",2);\n\tGiveInventory(\"ShockRifle\",1);\n\tGiveInventory(\"GeneporiumCharge\",400);\n\tSetWeapon(\"ShockRifle\");\n\t//Check for RANK to give awards\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_SHOCKTROOPER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Shock Trooper.\");\n\tDelay(35*6);\n\tActivatorSound(\"misc/volt\", 255);\n}\n\n//---------------------------COMMANDO\nscript 36 (int Team) {\n\tint cost = 1000; int speed = 0.85;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS14\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are the \\cfCommando!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\tSETFONT (\"SMALLFONT\");\n\tif(Team == 0)\n\t\tHudMessageBold (s:\"\\cGWarning: \\cARed\\cJ Commando in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\telse\n\t\tHudMessageBold (s:\"\\cGWarning: \\cNBlue\\cJ Commando in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\",1);\n\n\tCheckAndRemove (\"HasArmorUpgrade\");\n\tGiveInventory (\"HighUpgrade\", 1);\n\tGiveInventory(\"IsCommando\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tSetArmorGrade (2, ARMOD_NOCHANGE);\n\tGiveInventory(\"NewClipAmmo\",120);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\", 2);\n\tGiveInventory(\"TimedC4Count\", 2);\n\tGiveInventory(\"MissileLauncher\",1);\n\tGiveInventory(\"MissileAmmo\",15);\n\tGiveInventory(\"GatlingGun\",1);\n\tGiveInventory(\"MachineGunAmmo\",200);\n\tGiveInventory(\"Rifle\",1);\n\tGiveInventory(\"RifleAmmo\",20);\n\tGiveInventory(\"RifleGrenadeAmmo\",4);\n\tGiveInventory(\"GaussRifle\",1);\n\tGiveInventory(\"GaussRifleAmmo\",15);\n\tSetFragGrenades (4);\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_COMMANDO);\n\tACS_ExecuteAlways(91,0,0,0,0);\n\n\tSetWeapon(\"GaussRifle\");\n\n\tACS_ExecuteAlways (961, 0, Team);\n\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Commando.\");\n\tDelay(35*6);\n\tActivatorSound(\"misc/commando\",255);\n}\n\n//---------------------------PLASMA CANNON\nscript 37 (int Team)\n{\n\tint cost = 1500;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!CheckPlasmaCooldown()) terminate;\n\n\tif(CheckInventory(\"PlasmaCannon\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You already have a \\cnPlasma Cannon\\cr!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (NumPlasmaCannons[Team] >= MaxCannonsPerTeam && MaxCannonsPerTeam != -1) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"Your team already has too many of those!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (Timer() < CannonPurchaseDelay) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\t//int mins = (CannonPurchaseDelay - Timer())/(35*60);\n\t\t//int secs = 59 - (Timer()/35)%60;\n\n\t\tHudMessage(s:\"You must wait \\cF\", d:(CannonPurchaseDelay - Timer()) / 60,\n\t\t\ts:\" seconds\\nbefore you can get one of these!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP01\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tLastPurchasedCannon[PlayerNumber()+1] = Timer();\n\tNumPlasmaCannons[Team]++;\n\n\tDisplayTick();\n\tSetFont (\"BIGFONT\");\n\tHudMessage(s:\"You got \\cnPlasma Cannon!\"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\tSetFont (\"SMALLFONT\");\n\tif(Team == 0)\n\t\tHudMessageBold (s:\"\\cGWarning: \\cARed\\cJ player has \\cNPlasma Cannon!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\telse\n\t\tHudMessageBold (s:\"\\cGWarning: \\cNBlue\\cJ player has \\cNPlasma Cannon!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\tGiveInventory(\"PlasmaCannon\",1);\n\tGiveInventory(\"PlasmaCannonAmmo\",10);\n\tSetWeapon(\"PlasmaCannon\");\n\tLog(n:0, s:\" purchases Plasma Cannon.\");\n\tRecountPlasma();\n}\n\n//---------------------------SHOTGUNNER\nscript 38 (int Team) {\n\tint cost = 0; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS15\", cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 0);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfshotgunner!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"ShotgunAmmo\",50);\n\tSetFragGrenades (1);\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"Boomstick\",1);\n\tSetWeapon(\"Boomstick\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_SHOTGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Shotgunner.\");\n}\n\n//---------------------------SUICIDE BOMBER\nscript 62 (int Team) {\n\tint cost = 1750; int speed = 1.0;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS16\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\tTakeInventory(\"PurchaseToken\", 1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cFSuicide Bomber!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use the switch to explode violently.\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\tSetFont (\"SMALLFONT\");\n\tif(Team == 0)\n\t\tHudMessageBold (s:\"\\cGWarning: \\cARed\\cJ Suicide Bomber in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\telse\n\t\tHudMessageBold (s:\"\\cGWarning: \\cNBlue\\cJ Suicide Bomber in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"HighUpgrade\", 1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"BombPack\",1);\n\tSetWeapon(\"BombPack\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_SUICIDEBOMBER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" goes nuts and becomes Suicide Bomber.\");\n\t// [Dusk] after two seconds, call SetWeapon() again. Lagged users with Commando\n\t// rank may not be able to get it on the first SetWeapon().\n\tdelay(35*2);\n\tSetWeapon(\"BombPack\");\n\n\tdelay(35*4);\n\tActivatorSound(\"misc/commando\",255);\n}\n\n//---------------------------SNIPER\nscript 40 (int Team) {\n\tint cost = 750; int speed = 0.675;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS17\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\", 1);\n\tSpendCredits(Credits[PlayerNumber()+1], 750);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfSniper!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"IsSniper\", 500);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"SniperAmmo\",50);\n\tSetFragGrenades (2);\n\n\t//Check for RANK to give awards\n\tACS_ExecuteAlways(91,0,0,0,0);\n\n\tGiveInventory(\"SniperRifle\",1);\n\tSetWeapon(\"SniperRifle\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_SNIPER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Sniper.\");\n\n\tDelay(35*6);\n\tActivatorSound(\"misc/sniper\",255);\n}\n\n//---------------------------UTILITY GUY\nscript 41 (int Team) {\n\tint cost = 650; int speed = 0.75;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS18\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\", 1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are an \\cfUtility Guy!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use \\cFAlt-Fire\\cD for \\cNitem selection menu!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"RepairGun\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"UtilityGun\", 1);\n\tGiveInventory(\"Utility_Ammo\", 75);\n\n\t//Check for RANK to give awards\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_UTILITYGUY);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Utility Guy.\");\n\n\tdelay (35);\n\tSetWeapon(\"UtilityGun\");\n}\n\n//---------------------------DEMO EXPERT\nscript 42 (int Team) {\n\tint cost = 550; int speed = 0.75;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS19\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\", 1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfDemolitions Expert!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetArmorGrade (2, ARMOD_EXPLO);\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"HasClass\", 1);\n\tGiveInventory(\"Refunds\", 275);\n\tGiveInventory (\"EnhancedTimedC4\", 1);\n\tGiveInventory (\"TimedC4\", 4);\n\tGiveInventory (\"TimedC4Count\", 4);\n\tGiveInventory (\"ProxyMine\", 6);\n\tGiveInventory (\"ProxyMineCount\", 6);\n\tGiveInventory (\"RemoteC4\", 1);\n\tGiveInventory (\"RemoteC4Ammo\", 5);\n\tGiveInventory(\"Boomstick\",1);\n\tGiveInventory(\"ShotgunAmmo\",50);\n\tSetFragGrenades (4);\n\tGiveInventory(\"BombSquadGun\",1);\n\tSetWeapon(\"BombSquadGun\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_DEMOEXPERT);\n\n\t//Check for RANK to give awards\n\tACS_ExecuteAlways(91, 0);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Demo Expert.\");\n}\n\n// FIELD MEDIC\nscript 43 (int Team) {\n\tint cost = 300; int speed = 0.85;\n\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS20\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfField Medic!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Your regeneration will be carried to mechs.\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_CHEM);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory (\"ClassID\", CLASS_MEDIC);\n\tGiveInventory(\"Refunds\", cost/2);\n\tGiveInventory(\"IsMedic\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory (\"HealingRadiusItem\", 1);\n\tGiveInventory (\"HealingRadiusCount\", 1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"Boomstick\",1);\n\tGiveInventory(\"ShotgunAmmo\",50);\n\tSetFragGrenades (2);\n\tACS_ExecuteAlways(91, 0);\n\tGiveInventory(\"HealGun\",1);\n\tSetWeapon(\"HealGun\");\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\t// Medic regeneration\n\tACS_ExecuteAlways(352, 0);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Medic.\");\n}\n\n//---------------------------LASER CHAINGUNNER\nscript 44 (int Team) {\n\tint cost = 650; int speed = 0.75;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS21\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfLaser Chaingunner!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_LASER);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"LaserChaingun\",1);\n\tGiveInventory(\"LaserChaingunAmmo\",400);\n\tSetWeapon(\"LaserChaingun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_LASERCHAINGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Laser Chaingunner.\");\n}\n\n//---------------------------T-E 21cal RIFLE\nscript 49 (int Team)\n{\n\tint cost = 300;\n\tif (MitigateDoublePress()) terminate;\n\n\tif (CheckInventory(\"TiberiumAutorifleWeak\") || CheckInventory(\"TiberiumAutorifle\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You already have a \\cdTiberium Autorifle!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP02\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 300);\n\tDisplayTick();\n\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You got the \\cqTiberium Autorifle!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t// GiveInventory(\"Refunds\", 100);\n\tGiveInventory(\"TiberiumAutorifleWeak\", 1);\n\tGiveInventory(\"TE21CalAmmo\", 200);\n\tSetWeapon(\"TiberiumAutorifleWeak\");\n\tLog(n:0, s:\" purchases Tiberium Autorifle.\");\n}\n\n//---------------------------CHAINSAW (was flashbangs)\nscript 50 (int Team) {\n\tint cost = 250;\n\tif (MitigateDoublePress()) terminate;\n\tif (CheckInventory(\"EagerBeaver\")) {\n\t\tDisplayCross ();\n\t\tSetFont (\"BIGFONT\");\n\t\tHudMessage (s:\"You already have the \\cfChainsaw!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP03\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory (\"PurchaseToken\", 1);\n\tSpendCredits (Credits[PlayerNumber()+1], cost);\n\tDisplayTick ();\n\n\tSetFont (\"BIGFONT\");\n\tHudMessage(s:\"You got the \\cfChainsaw!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use Alt-Fire to throw the chainsaw!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\tGiveInventory (\"EagerBeaver\", 1);\n\tSetWeapon (\"EagerBeaver\");\n\tLog (n:0, s:\" purchases Chainsaw.\");\n}\n\n// ARTILLERY CANNON\nscript 51 (int Team) {\n\tint cost = 550;\n\tif (MitigateDoublePress()) terminate;\n\tif(CheckInventory(\"ArtilleryCannon\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You already have an \\cKArtillery Cannon!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP04\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You got the \\ckArtillery Cannon!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use Alt-Fire for \\cFAnti-Mech shells!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t// GiveInventory(\"Refunds\", 200);\n\tGiveInventory (\"ArtilleryCannon\", 1);\n\tGiveInventory (\"ArtilleryShellAmmo\", 40);\n\tSetWeapon (\"ArtilleryCannon\");\n\tLog(n:0, s:\" purchases artillery cannon.\");\n}\n\n//---------------------------JUMPJET\nscript 52 (int Team) {\n\tint cost = 600; int speed = 0.65;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS23\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfJumpJet Infantry!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use Alt-Fire to activate JumpJet\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_NOCHANGE);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"MachineGunAmmo\",400);\n\tGiveInventory(\"JumpJetFuel\",100);\n\tGiveInventory(\"JumpJetGatlingGun\",1);\n\tSetWeapon(\"JumpJetGatlingGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_JUMPJET);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes jumpjet infantry.\");\n}\n\n//---------------------------TIBERIUM AUTORIFLEMAN\nscript 53 (int Team) {\n\tint cost = 400; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS24\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfTiberium Autorifleman!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_CHEM);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"TE21CalAmmo\",200);\n\tSetFragGrenades (2);\n\tGiveInventory(\"TiberiumAutorifle\",1);\n\tSetWeapon(\"TiberiumAutorifle\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_TIBRIFLE);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Tiberium autorifleman.\");\n}\n\n//---------------------------DOUBLE SHOTGUNNER\nscript 54 (int Team) {\n\tint cost = 200; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS25\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfSuper Shotgunner!\"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_NOCHANGE);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"ShotgunAmmo\",50);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (1);\n\tACS_ExecuteAlways(91, 0);\n\tGiveInventory(\"DoubleShotgun\",1);\n\tSetWeapon(\"DoubleShotgun\");\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_DOUBLESHOTGUNNER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes super shotgunner.\");\n}\n\n//-------------------- BLUE TEAM SUPERWEAPON\n//---------------------------ION CANNON BEACON\nscript 55 (int Team) {\n\tif (PlayerTeam() == TEAM_RED) {\n\t\t// [Dusk] this message should never be displayed in casual games\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"What the \\cRfuck\\c- are you doing here?\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tint cost = 1750;\n\tif (MitigateDoublePress()) terminate;\n\n\tif(CheckInventory(\"IonCannonBeacon\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You already have the \\cnIon Cannon Beacon\\cr!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tBlueBeaconTime=BeaconPurchaseDelay-(Timer()-LastPurchasedBeacon[1])/35;\n\tif (BlueBeaconTime <= 0)\n\t\tBlueBeaconCooldown = false;\n\telse\n\t\tBlueBeaconCooldown = true;\n\n\tif(BlueBeaconCooldown) {\n\t\tint mins = BlueBeaconTime/60 - Timer()/(35*60);\n\t\tint secs = 59 - (Timer()/35)%60;\n\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You must wait \\cF\", d:BlueBeaconTime, s:\" seconds\\nbefore you can get one of these!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP05\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\tLastPurchasedBeacon[1] = Timer();\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 1750);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You got the \\cnIon Cannon Beacon!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);\n\tSetFont (\"SMALLFONT\");\n\tHudMessage(s:\"Place this in front of an \\cAenemy MCT\\cJ and guard\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_WHITE, 0.5, 0.6, 5.0, 1.0);\n\tHudMessage(s:\"it for \\cU60 seconds\\cJ for \\cKcertain destruction!\";\n\t\tHUDMSG_FADEOUT, 1880+PlayerNumber(), CR_WHITE, 0.5, 0.625, 5.0, 1.0);\n\n\tHudMessageBold (s:\"\\cGWarning: \\cNBlue\\cJ player has \\cNIon Cannon Beacon!!\";\n\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\tGiveInventory(\"IonCannonBeacon\",1);\n\tSetWeapon(\"IonCannonBeacon\");\n\n\tBlueBeaconCooldown = True;\n\tLog(n:0, s:\" purchases Ion Cannon Beacon.\");\n}\n\n//-------------------- RED TEAM SUPERWEAPON\n//---------------------------NUCLEAR STRIKE BEACON\nscript 56 (int Team) {\n\tif (PlayerTeam() == TEAM_BLUE) {\n\t\t// [Dusk] this message should never be displayed in casual games\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"What the fuck are you doing here?\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tint cost = 1750;\n\tif ( MitigateDoublePress() ) terminate;\n\n\tRedBeaconCooldown = true;\n\tRedBeaconTime = BeaconPurchaseDelay-(Timer()-LastPurchasedBeacon[2])/35;\n\tif (RedBeaconTime <= 0)\n\t\tRedBeaconCooldown = false;\n\n\tif(CheckInventory(\"NuclearStrikeBeacon\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You already have the \\ckNuclear Strike Beacon\\cr!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif(RedBeaconCooldown) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage(s:\"You must wait \\cF\", d:RedBeaconTime, s:\" seconds\\nbefore you can get one of these!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"WEAP06\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tLastPurchasedBeacon[2] = Timer();\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 1750);\n\tDisplayTick();\n\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You got the \\cANuclear Strike Beacon!\"; HUDMSG_FADEOUT, 1800+PlayerNumber(), CR_WHITE, 0.5, 0.45, 2.0, 1.0);\n\tSetFont (\"SMALLFONT\");\n\tHudMessage(s:\"Place this in front of an \\cAenemy MCT\\cJ and guard\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_WHITE, 0.5, 0.6, 5.0, 1.0);\n\tHudMessage(s:\"it for \\cU60 seconds\\cJ for \\cKcertain destruction!\";\n\t\tHUDMSG_FADEOUT, 1880+PlayerNumber(), CR_WHITE, 0.5, 0.625, 5.0, 1.0);\n\tHudMessageBold (s:\"\\cGWarning: \\cARed\\cJ player has \\cANuclear Strike Beacon!!\";\n\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\tGiveInventory (\"NuclearStrikeBeacon\", 1);\n\tSetWeapon (\"NuclearStrikeBeacon\");\n\n\tRedBeaconCooldown = True;\n\tLog(n:0, s:\" purchases Nuclear Strike Beacon.\");\n}\n\n//---------------------------ARMOUR/DAMAGE UPGRADE\nscript 57 (int Team) {\n\tint cost = 250;\n\tif (MitigateDoublePress()) terminate;\n\n\tif (CheckInventory (\"IsCommando\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage (s:\"no u :I\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif(CheckInventory(\"HasArmorUpgrade\")) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tHudMessage (s:\"You already have this \\ccupgrade!\";\n\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tterminate;\n\t}\n\n\tif (!IsSecondPress(\"UPGR01\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You got the \\ckarmor upgrade!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"You can no longer pilot mechs.\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\tGiveInventory(\"Refunds\", 200);\n\tGiveInventory(\"HasArmorUpgrade\", 1);\n\tGiveInventory(\"HighUpgrade\", 1);\n\tSetArmorGrade (1, AGF_ADDITIVE);\n\tLog(n:0, s:\" purchases armour/damage upgrade.\");\n}\n\n//---------------------------PLASMA GUNNER\nscript 60 (int Team) {\n\tint cost = 800; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!CheckPlant(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS26\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 800);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfPlasma Gunner!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_LASER);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",90);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"PlasmaRifleAmmo\",200);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_PLASMAGUNNER);\n\tGiveInventory(\"PlasmaGun\",1);\n\tSetWeapon(\"PlasmaGun\");\n\n\tACS_ExecuteAlways(91, 0);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Plasma Gunner.\");\n}\n\n// ARTILLERY SOLDIER\nscript 61 (int Team) {\n\tint cost = 600; int speed = 0.7;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS27\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\tDisplayTick();\n\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are an \\cfArtillery Soldier!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\tHudMessage(s:\"Use Alt-Fire for \\cFAnti-Mech shells!\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.5, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (2, ARMOD_EXPLO);\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\",cost/2);\n\tGiveInventory(\"IsArtillerySoldier\",1);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"NewClipAmmo\",60);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"EnhancedTimedC4\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tGiveInventory(\"Rifle\",1);\n\tGiveInventory(\"RifleAmmo\",20);\n\tGiveInventory(\"RifleGrenadeAmmo\",2);\n\tGiveInventory(\"ArtilleryShellAmmo\",30);\n\tSetFragGrenades (2);\n\tGiveInventory(\"ArtilleryCannon\",1);\n\tSetWeapon(\"ArtilleryCannon\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_ARTILLERY);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes artillery soldier.\");\n}\n\n//---------------------------TIME COP\nscript 39 (int Team) {\n\tint cost = 2000; int speed = 0.9;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckBarracks(team)) terminate;\n\tif (!CheckPlant(team)) terminate;\n\tif (MaxTimeCopsPerTeam > 0 && NumTimeCops[team] >= MaxTimeCopsPerTeam) {\n\t\tDisplayCross();\n\t\tSETFONT(\"BigFont\");\n\t\tif (MaxTimeCopsPerTeam == 1) {\n\t\t\tHudMessage(s:\"You already have a time cop in-field!\";\n\t\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\t} else {\n\t\t\tHudMessage(s:\"You already have \", d:NumTimeCops[team], s:\" time cops in-field!\";\n\t\t\t\tHUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\t}\n\n\t\tif (GetLevelInfo (LEVELINFO_LEVELNUM) == 20)\n\t\t\tThrustThing((VectorAngle(GetActorVelX(0), GetActorVelY(0)) >> 8) + 128, 25, 0, 0);\n\t\tterminate;\n\t}\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS29\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], cost);\n\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are the \\cFTime Cop!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.45, 2.0, 1.0);\n\n\tSETFONT (\"SMALLFONT\");\n\tif(Team == 0)\n\t\tHudMessageBold (s:\"\\cGWarning: \\cARed\\cJ TIME COP in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\telse\n\t\tHudMessageBold (s:\"\\cGWarning: \\cNBlue\\cJ TIME COP in-field!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\tSetActorProperty (0, APROP_SPEED, speed);\n\tSetArmorGrade (2, ARMOD_NOCHANGE);\n\tGiveInventory (\"HasClass\", 1);\n\tGiveInventory (\"HighUpgrade\", 1);\n\tGiveInventory (\"Refunds\", cost/2);\n\tGiveInventory (\"NewClipAmmo\", 120);\n\tGiveInventory (\"Handgun\", 1);\n\tGiveInventory (\"EnhancedTimedC4\", 1);\n\tGiveInventory (\"TimedC4\", 2);\n\tGiveInventory (\"TimedC4Count\", 2);\n\tSetFragGrenades (4);\n\tGiveInventory (\"SpawnInvulnerability\", 1);\n\tGiveInventory (\"ClassID\", CLASS_TIMECOP);\n\tGiveInventory(\"MachineGunAmmo\", 50);\n\tGiveInventory(\"MachineGun\", 1);\n\tGiveInventory (\"TimeGun\", 1);\n\tGiveInventory (\"TimeGunAmmo\", 100);\n\tSetWeapon (\"TimeGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog (n:0, s:\" becomes Time Cop.\");\n\tRecountTimeCops();\n\n\tDelay(35*6);\n\tActivatorSound(\"misc/commando\",255);\n}\n\n//---------------------------TIBERIUM HARVESTER //Advanced\nscript 63 (int Team) {\n\tint cost = 750; int speed = 0.8;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckRefinery(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS30\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tGiveInventory(\"Refunds\", cost/2);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 750);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are an \\cfAdvanced Tiberium Harvester!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.4, 2.0, 1.0);\n\tHudMessage(s:\"Pick-up \\cctiberium crystals \\cdand\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 2.0, 1.0);\n\tHudMessage(s:\"return them to your \\ccrefinery \\cdfor cash!\";\n\t\tHUDMSG_FADEOUT, 1880+PlayerNumber(), CR_GREEN, 0.5, 0.65, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (1, ARMOD_CHEM);\n\tGiveInventory(\"HighUpgrade\",1);\n\tGiveInventory(\"IsHarvester\",1);\n\tGiveInventory(\"TiberiumProof\",1);\n\tGiveInventory(\"Grade0Damage\",1);\n\tGiveInventory(\"NewClipAmmo\",200);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (2);\n\tGiveInventory(\"MachineGunAmmo\",160);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"MachineGun\",1);\n\tSetWeapon(\"MachineGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_ADVHARVESTER);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes advanced Tiberium Harvester.\");\n\tDelay(35*6);\n\tActivatorSound(\"misc/chem\",255);\n}\n\n//---------------------------TIBERIUM HARVESTER //Free\nscript 64 (int Team) {\n\tint cost = 0; int speed = 0.65;\n\tif (MitigateDoublePress()) terminate;\n\tif (!CheckRefinery(Team)) terminate;\n\tif (!IsResigned()) terminate;\n\tif (!IsSecondPress(\"CLSS28\", cost)) terminate;\n\tif (!CheckCredits(cost)) terminate;\n\n\tGiveInventory(\"HasClass\",1);\n\tTakeInventory(\"PurchaseToken\",1);\n\tSpendCredits(Credits[PlayerNumber()+1], 0);\n\tDisplayTick();\n\tSETFONT(\"BigFont\");\n\tHudMessage(s:\"You are a \\cfTiberium Harvester!\";\n\t\tHUDMSG_FADEOUT, 1800+PlayerNumber(), CR_GREEN, 0.5, 0.4, 2.0, 1.0);\n\tHudMessage(s:\"Pick-up \\cctiberium crystals \\cdand\";\n\t\tHUDMSG_FADEOUT, 1840+PlayerNumber(), CR_GREEN, 0.5, 0.6, 2.0, 1.0);\n\tHudMessage(s:\"return them to your \\ccrefinery \\cdfor cash!\";\n\t\tHUDMSG_FADEOUT, 1880+PlayerNumber(), CR_GREEN, 0.5, 0.65, 2.0, 1.0);\n\n\t//Set Statistics\n\tSetActorProperty(0,APROP_SPEED,speed);\n\tSetArmorGrade (0, ARMOD_CHEM);\n\tGiveInventory(\"IsHarvester\",1);\n\tGiveInventory(\"TiberiumProof\",1);\n\tGiveInventory(\"Grade0Damage\",1);\n\tGiveInventory(\"NewClipAmmo\",200);\n\tGiveInventory(\"Handgun\",1);\n\tGiveInventory(\"TimedC4\",1);\n\tGiveInventory(\"TimedC4Count\",1);\n\tSetFragGrenades (1);\n\tGiveInventory(\"SubMachineGun\",1);\n\tGiveInventory(\"SpawnInvulnerability\",1);\n\tGiveInventory (\"ClassID\", CLASS_HARVESTER);\n\tSetWeapon(\"SubMachineGun\");\n\tACS_ExecuteAlways(91, 0);\n\n\tACS_ExecuteAlways (961, 0, Team);\n\tPlayerSpeeds[PlayerNumber()] = speed;\n\tLog(n:0, s:\" becomes Tiberium harvester.\");\n\tDelay(35*6);\n\tActivatorSound(\"misc/chem\",255);\n}\n\nscript 961 (int team) {\n\tint tries, i;\n\tbool failed = true;\n\tif (GetLevelInfo (LEVELINFO_LEVELNUM) == 20 || GetLevelInfo (LEVELINFO_LEVELNUM) == 21) {\n\t\tfor (i = 0; i <= 9; i++) {\n\t\t\tif (Teleport_NoStop (1+(1-team), 0)) {\n\t\t\t\tfailed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (i = 0; i <= 9; i++) {\n\t\t\tif (Teleport (1+(1-team))) {\n\t\t\t\tfailed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (failed) {\n\t\tHudMessage (s:\"In-field teleportation \\cAfailed\\cJ - use the\\n\\cDTeleport back to Field\\cJ -terminal\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS2, 5.0, 1.0);\n\t\t\tterminate;\n\t} else TakeInventory (\"IsInSpawnRoom\", 1);\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_core.txt",
        "contents": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * All Out War 2 core mechanism scripts\n * Credit to VoltlocK for originally creating the engine\n * With modifications by Eruanna, Dusk and the Omega Team\n *\n * You may use portions of this script in your project as long as you give\n * credit where credit is due. Please don't be lame and just copy-paste any\n * of this and call it your own. Thanks!\n */\n\nscript 999 OPEN {\n\tRankTitles[0] = \"Private\";\n\tRankTitles[1] = \"Corporal\";\n\tRankTitles[2] = \"Sergeant\";\n\tRankTitles[3] = \"Master Sgt.\";\n\tRankTitles[4] = \"Officer\";\n\tRankTitles[5] = \"Lieutenant\";\n\tRankTitles[6] = \"Major\";\n\tRankTitles[7] = \"Commando\";\n\n\tif (GetCVar(\"aow_disablemechs\") == 0)\n\t\tConsoleCommand(\"set aow_mechs 1\");\n\telse\n\t\tConsoleCommand(\"set aow_mechs 0\");\n\n\t//Red\n\tGotRefinery[0] = True;\n\tGotBarracks[0] = True;\n\tGotFactory[0] = True;\n\tGotPlant[0] = True;\n\tGotRepair[0] = True;\n\tGotObelisk[0] = True;\n\tBaseLeft[0] = 5;\n\t//Blue\n\tGotRefinery[1] = True;\n\tGotBarracks[1] = True;\n\tGotFactory[1] = True;\n\tGotPlant[1] = True;\n\tGotRepair[1] = True;\n\tGotObelisk[1] = True;\n\tBaseLeft[1] = 5;\n\n\tif(GetCVAR(\"aow_tickets\") <= 1 && TicketPool == False)\n\t\tConsoleCommand(\"set aow_tickets 75\");\n\telse if(GetCVAR(\"aow_tickets\") <= 100 && TicketPool == True)\n\t\tConsoleCommand(\"set aow_tickets 250\");\n\tStartingTickets = GetCVAR(\"aow_tickets\");\n\n\tTickets[0] = StartingTickets;\n\tTickets[1] = StartingTickets;\n\n\tSetLineSpecial(159,80,342,0,0,0,0);\n\n\tdelay (5);\n\n\tSpawnSpotForced (\"CrateMapMarker\", TID_CRATE, 0, 0);\n\tSpawnSpotForced (\"TiberiumMapMarker\", TID_TIBERIUM, 0, 0);\n\n\tdelay (5);\n\t// wf unavailability\n\tif (!ThingCount (T_NONE, 107) && !ThingCount (T_NONE, 207)) {\n\t\tGotFactory[0] = 0;\n\t\tGotFactory[1] = 0;\n\t\tTeam_GivePoints (TEAM_RED, 1, 0);\n\t\tTeam_GivePoints (TEAM_BLUE, 1, 0);\n\t}\n\n\tACS_ExecuteAlways (930, 0, BUILDING_ALL, TEAM_RED);\n\tACS_ExecuteAlways (930, 0, BUILDING_ALL, TEAM_BLUE);\n\n\t// [Dusk] If ticket pool is enabled, spawn ticket counters. These counters\n\t// are used to inform clients about ticket values, since the left-hand\n\t// hud is client-sided. \"Physically\", the ticket counters are map spots\n\t// spawned at the respective team's Repair Facilities. The counters'\n\t// angle tells the starting ticket amount, their speed tells the current\n\t// ticket amount.\n\tSpawnSpotForced (\"MapSpot\", 109, TID_TICKETCOUNTER_BLUE, 0);\n\tSpawnSpotForced (\"MapSpot\", 209, TID_TICKETCOUNTER_RED, 0);\n\tSetActorAngle (TID_TICKETCOUNTER_BLUE, StartingTickets);\n\tSetActorAngle (TID_TICKETCOUNTER_RED, StartingTickets);\n\tif (TicketPool) {\n\t\tSetActorSpeed (TID_TICKETCOUNTER_BLUE, StartingTickets);\n\t\tSetActorSpeed (TID_TICKETCOUNTER_RED, StartingTickets);\n\t} else {\n\t\tSetActorSpeed (TID_TICKETCOUNTER_BLUE, 0);\n\t\tSetActorSpeed (TID_TICKETCOUNTER_RED, 0);\n\t}\n\n\t// Activate developer mode if the proper cvar is set.\n\tif (GetCVAR (\"aow_developer\")) {\n\t\tDeveloperSafetyLock = 0x7FFFFFFF;\n\t\tACS_ExecuteAlways (404, 0);\n\t}\n}\n\n// Server settings\nscript 599 OPEN {\n\tdelay (1);\n\n\t// ==================================\n\t// DMFLAGS\n\tif (!GetCVAR (\"sv_doubleammo\")) ConsoleCommand (\"sv_doubleammo 1\");\n\tif (!GetCVAR (\"sv_nofov\")) ConsoleCommand (\"sv_nofov 1\");\n\tif (!GetCVAR (\"alwaysapplydmflags\")) ConsoleCommand (\"alwaysapplydmflags 1\");\n\tif (!GetCVAR (\"sv_weapondrop\")) ConsoleCommand (\"sv_weapondrop 1\");\n\tif (!GetCVAR (\"sv_itemrespawn\")) ConsoleCommand (\"sv_itemrespawn 1\");\n\tif (!GetCVAR (\"compat_limited_airmovement\")) ConsoleCommand (\"compat_limited_airmovement 1\");\n\n\t// [Dusk] the engine assumes that players stay dead for at least a second\n\tif (GetCVAR (\"compat_instantrespawn\")) ConsoleCommand (\"compat_instantrespawn 0\");\n\n\t// [Dusk] enforce no pointlimit until game is considered over. Pointlimit is used\n\t// to end the game when needed. We don't want this script to conflict it at any\n\t// given time.\n\tif (!GameOver && GetCVAR(\"pointlimit\") != 0) ConsoleCommand(\"pointlimit 0\");\n\n\t// ==================================\n\t// CUSTOM CVARS\n\t// w/ sanity checks\n\tif (!GetCVAR (\"aow_credflow\")) ConsoleCommand (\"set aow_credflow 4\");\n\tif (GetCVAR (\"aow_startcredits\") <= 0) ConsoleCommand (\"set aow_startcredits 300\");\n\tif (GetCVAR (\"aow_creditfrag\") <= 0) ConsoleCommand (\"set aow_creditfrag 50\");\n\tif (GetCVAR (\"aow_bonusamount\") <= 0) ConsoleCommand (\"set aow_bonusamount 300\");\n\tif (GetCVAR (\"aow_bonustime\") <= 0) ConsoleCommand (\"set aow_bonustime 5\");\n\tif (GetCVAR (\"aow_medicbonusneed\") <= 0) ConsoleCommand (\"set aow_medicbonusneed 175\");\n\tif (GetCVAR (\"aow_repairbonus\") <= 0) ConsoleCommand (\"set aow_repairbonus 1\");\n\tif (GetCVAR (\"aow_guardianlimit\") <= 0) ConsoleCommand (\"set aow_guardianlimit 2\");\n\tif (GetCVAR (\"aow_ticketpool\") <= 0) ConsoleCommand (\"set aow_ticketpool 0\");\n\t//[SP]How long you can stay on a team before you are never switched.\n\tif (GetCVAR (\"aow_teamstaytime\") <= 0) ConsoleCommand(\"set aow_teamstaytime 2\");\n\n\t// Plasma Cannon initial delay\n\tif (!GetCVAR (\"aow_plasmapurchasedelay\")) ConsoleCommand(\"set aow_plasmapurchasedelay 5\");\n\t//[SP]Maximum number of plasma cannons per team. (Set to -1 for unlimited)\n\tif (!GetCVAR (\"aow_maxcannonsperteam\")) ConsoleCommand(\"set aow_maxcannonsperteam 4\");\n\t// [Dusk] Time (in minutes) to determine plasma cannon cooldown. Use -1 to disable\n\tif (!GetCVAR (\"aow_plasmacooldown\")) ConsoleCommand(\"set aow_plasmacooldown 3\");\n\n\t//[SP]How long you have to wait to buy a new superweapon beacon. (Minutes) (Set to -1 to disable wait)\n\tif (!GetCVAR (\"aow_beaconpurchasedelay\"))ConsoleCommand(\"set aow_beaconpurchasedelay 5\");\n\n\t// [SP]Maximum number of time cops per team. (Set to -1 for unlimited)\n\tif (!GetCVAR (\"aow_maxtimecopsperteam\")) ConsoleCommand(\"set aow_maxtimecopsperteam 1\");\n\n\t// [Dusk] How many minutes until Timed C4 can be used. (-1 to disable)\n\tif (!GetCVAR (\"aow_c4delay\")) ConsoleCommand(\"set aow_c4delay 5\");\n\n\t//[SP] Time (in minutes) before sudden death.\n\t// [Dusk] changed default to 45, -1 means immediate\n\tif (GetCVAR (\"aow_suddendeathtime\") == 0) ConsoleCommand(\"set aow_suddendeathtime 45\");\n\n\t// [Dusk] Sudden death degeneration\n\tif (GetCVAR (\"aow_degeneration\") <= 0) ConsoleCommand(\"set aow_degeneration 0\");\n\tif (GetCVAR (\"aow_degenerationinterval\") <= 0) ConsoleCommand(\"set aow_degenerationinterval 10\");\n\n\tif (GetCVAR (\"aow_tournamentmode\") <= 0) ConsoleCommand(\"set aow_tournamentmode 0\");\n\tif (GetCVAR (\"aow_disablemechs\") <= 0) ConsoleCommand(\"set aow_disablemechs 0\");\n\tif (GetCVAR (\"aow_surrendermode\") <= 0) ConsoleCommand(\"set aow_surrendermode 0\");\n\n\t// [Dusk] How much score does destroying a building award you, in addition to difference?\n\tif (GetCVAR (\"aow_buildingpoints\") <= 0) ConsoleCommand (\"set aow_buildingpoints 125\");\n\n\t// TODO: get rid of these variables and replace with direct GetCVAR calls\n\tStartCredits = GetCVAR(\"aow_startcredits\");\n\tCreditFlow = GetCVAR(\"aow_credflow\");\n\tCreditFlowPower = GetCVAR(\"aow_powercredflow\");\n\tCreditFragAward = GetCVAR(\"aow_creditfrag\");\n\tCreditAwardTime = GetCVAR(\"aow_bonustime\");\n\tCreditAwardAmount = GetCVAR(\"aow_bonusamount\");\n\tCreditRepairAmount = GetCVAR(\"aow_repairbonus\");\n\tGuardianLimit = GetCVAR(\"aow_guardianlimit\");\n\tMechEnabled = GetCVAR(\"aow_mechs\");\n\tTicketPool = GetCVAR(\"aow_ticketpool\");\n\tTeamStayTime = GetCVAR(\"aow_teamstaytime\");\n\tCannonPurchaseDelay = GetCVAR(\"aow_plasmapurchasedelay\") * 35 * 60;\n\tMaxCannonsPerTeam = GetCVAR(\"aow_maxcannonsperteam\");\n\tMaxTimeCopsPerTeam = GetCVAR(\"aow_maxtimecopsperteam\");\n\tTournamentMode = GetCVAR(\"aow_tournamentmode\");\n\tBeaconPurchaseDelay = GetCVAR(\"aow_beaconpurchasedelay\") * 60;\n\tPlasmaCooldownTime = GetCVAR(\"aow_plasmacooldown\") * 35 * 60;\n\tTimedC4Delay = GetCVar (\"aow_c4delay\");\n\tMedicBonusNeed = GetCVAR(\"aow_medicbonusneed\");\n\n\tdelay(35*5);\n\trestart;\n}\n\n// credit flow\nscript 4 OPEN {\n\tint i, p, redflow, blueflow;\n\twhile (1) {\n\t\tp = 25;\n\t\tif (GotPlant[0] == 1) p += 25;\n\t\tif (GotRefinery[0] == 1) p += 50;\n\t\tif (MiniRefinery[0] == 1) p += 75;\n\t\tredflow = (CreditFlow * p) / 100;\n\n\t\tp = 25;\n\t\tif (GotPlant[1] == 1) p += 25;\n\t\tif (GotRefinery[1] == 1) p += 50;\n\t\tif (MiniRefinery[1] == 1) p += 75;\n\t\tblueflow = (CreditFlow * p) / 100;\n\n\t\tfor (i = 0; i < 32; i++) {\n\t\t\tif (PlayerInGame(i) && GetActorProperty (3800+i, APROP_HEALTH) > 0 && !IsAdmin[i]) {\n\t\t\t\tif (GetPlayerInfo (i, PLAYERINFO_TEAM) == TEAM_RED)\n\t\t\t\t\tGiveCredits (i, redflow);\n\t\t\t\telse if (GetPlayerInfo (i, PLAYERINFO_TEAM) == TEAM_BLUE)\n\t\t\t\t\tGiveCredits (i, blueflow);\n\t\t\t}\n\t\t}\n\n\t\tdelay (35);\n\t}\n}\n\n//Setting Player scripts\nscript 10 RESPAWN {\n\tif (StartTime[PlayerNumber()] == 0) InitPlayer();\n\n\tGiveInventory(\"Ingame\",1);\n\tGiveInventory(\"IsInSpawnRoom\", 1);\n\tif(PlayerTeam() == TEAM_BLUE) {\n\t\tGiveInventory (\"BlueTeamArmor\",1);\n\t\tGiveInventory (\"IsBlue\",1);\n\t\tTakeInventory (\"RedTeamArmor\",1);\n\t\tTakeInventory (\"IsRed\",1);\n\t}\n\telse if(PlayerTeam() == TEAM_RED)\n\t{\n\t\tGiveInventory (\"RedTeamArmor\",1);\n\t\tGiveInventory (\"IsRed\",1);\n\t\tTakeInventory (\"BlueTeamArmor\",1);\n\t\tTakeInventory (\"IsBlue\",1);\n\t}\n\n\tThing_ChangeTID (0, PlayerNumber()+3800);\n\n\tif(GetPlayerInfo(PlayerNumber(),PLAYERINFO_GENDER) == 1) {\n\t\tSetActorProperty(0,APROP_DeathSound,\"female/death\");\n\t\tGiveInventory(\"IsFemale\",1);\n\t}\n\n\tACS_ExecuteAlways (97, 0);\n\tSetWeapon (\"Unarmed\");\n}\n\nscript 11 ENTER {\n\tdelay(5);\n\tInitPlayer();\n\n\tGiveInventory(\"Ingame\",1);\n\tGiveInventory(\"IsInSpawnRoom\", 1);\n\tif(PlayerTeam() == TEAM_BLUE)\n\t{\n\t\tGiveInventory(\"BlueTeamArmor\",1);\n\t\tGiveInventory(\"IsBlue\",1);\n\t}\n\telse if(PlayerTeam() == TEAM_RED)\n\t{\n\t\tGiveInventory(\"RedTeamArmor\",1);\n\t\tGiveInventory(\"IsRed\",1);\n\t}\n\n\tThing_ChangeTID(0,PlayerNumber()+3800);\n\n\tif(GetPlayerInfo(PlayerNumber(),PLAYERINFO_GENDER) == 1)\n\t{\n\t\tSetActorProperty(0,APROP_DeathSound,\"female/death\");\n\t\tGiveInventory(\"IsFemale\",1);\n\t}\n\n\tdelay(5);\n\tACS_ExecuteAlways (5, 0); // display credits/exp HUD\n\tACS_ExecuteAlways (92, 0);\n\n\t// If we're in developer mode, make him gamemaster.\n\tif (Developer) {\n\t\tIsAdmin[PlayerNumber()] = true;\n\n\t\tSetFont (\"BIGFONT\");\n\t\tHudMessage(s:\"This game is in developer mode. You have gamemaster access.\";\n\t\t\tHUDMSG_FADEINOUT, 0, CR_BLUE, 0.5, 0.2, 7.0, 0.5, 1.0);\n\t}\n}\n\n //--------------------------START UP MESSAGES\nscript 301 ENTER CLIENTSIDE {\n\tSetFont (\"BIGFONT\");\n\tHudMessage(s:\"Welcome to \\cFAll Out War 2!\";\n\t\tHUDMSG_FADEINOUT, 0, CR_WHITE, 0.5, 0.3, 7.0, 0.5, 1.0);\n\tSetFont (\"SMALLFONT\");\n\tHudMessage (s:\"Type \\cFAOWHelp\\cJ in console for information on how to play!\";\n\t\tHUDMSG_FADEOUT, 0, CR_WHITE, 0.5, 0.45, 7.0, 1.0);\n\tHudMessage (s:\"See \\cFOptions \\cN-> \\cFCustomise Controls\\c- for keybinds\";\n\t\tHUDMSG_FADEOUT, 0, CR_WHITE, 0.5, 0.5, 7.0, 1.0);\n\n\tdelay (20);\n\tLocalAmbientSound (\"voltlock/welcome\", 127);\n}\n\nScript 8 (int Gone) DISCONNECT {\n\tIsAdmin[Gone] = false;\n\tSetCreditsSilent(Credits[Gone+1], 0);\n\tExperience[Gone] = 0;\n\tRank[Gone] = RANK_PRIVATE;\n\tSurrender[Gone] = 0;\n\tPlasmaCooldown[Gone] = 0;\n\tStartTime[Gone] = 0;\n\n\tif (MechGetter[0] == Gone && GettingMech[0])\n\t\tGettingMech[0] = 0;\n\telse if (MechGetter[1] == Gone && GettingMech[1])\n\t\tGettingMech[1] = 0;\n\n\tif (Surrender[Gone]) {\n\t\tSurrender[Gone] = false;\n\t\tif (PlayersTeam[Gone] == TEAM_RED) {\n\t\t\tHudMessageBold (s:\"\\cD\", d:SurrenderCount (TEAM_RED), s:\"\\cQ/\\cD\", d:RedCount(), s:\" \",\n\t\t\t\ts:\"\\cJof \\cARed Team\\cJ\\n have voted to surrender\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t} else if (PlayersTeam[Gone] == TEAM_BLUE) {\n\t\t\tHudMessageBold (s:\"\\cD\", d:SurrenderCount (TEAM_BLUE), s:\"\\cQ/\\cD\", d:BlueCount(), s:\" \",\n\t\t\t\ts:\"\\cJof \\cNBlue Team\\cJ\\n have voted to surrender\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t}\n\t}\n\telse // % of players surrendering could now be higher. Al demands a recount!\n\t\tACS_Execute(751, 0);\n}\n\nscript 303 OPEN {\n\t// these maps are too small to have portals\n\tdelay (5);\n\tint levelnum = GetLevelInfo (LEVELINFO_LEVELNUM);\n\tif (levelnum ==  2) {UsePortals = 0;}\n\tif (levelnum ==  4) {UsePortals = 0;}\n\tif (levelnum ==  7) {UsePortals = 0;}\n\tif (levelnum == 15) {UsePortals = 0;}\n}\n\nfunction void InitPlayer (void) {\n\tSetCreditsSilent(Credits[PlayerNumber()+1], StartCredits);\n\tExperience[PlayerNumber()] = 0;\n\tRank[PlayerNumber()] = RANK_PRIVATE;\n\tSurrender[PlayerNumber()] = False;\n\tPlayersTeam[PlayerNumber()+1] = PlayerTeam();\n\tStartTime[PlayerNumber()]=Timer();\n\tHasTeleported[PlayerNumber()] = false;\n\tRepairBonus[PlayerNumber()] = 0;\n\tMedicBonus[PlayerNumber()] = 0;\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_crate.txt",
        "contents": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * All Out War 2 powerup crate-related scripts\n * Credit to VoltlocK for originally creating the engine\n * With modifications by Eruanna, Dusk and the Omega Team\n *\n * You may use portions of this script in your project as long as you give\n * credit where credit is due. Please don't be lame and just copy-paste any\n * of this and call it your own. Thanks!\n */\n\nscript 312 OPEN {\n\twhile (1) {\n\t\tCrateNumber += random (0, MAX_CRATE);\n\t\tCrateNumber %= MAX_CRATE;\n\t\tCrateNumber++;\n\t\tdelay (35);\n\t}\n\trestart;\n}\n\nscript 309 (int Crate, int Override) {\n\t// Crate determines which crate is given, 0 means random\n\t// Override means whether all limits should be overridden. Open Deck needs this.\n\tint i;\n\tif (!Crate) {\n\t\t// Crate = random(1, MAX_CRATE);\n\t\tCrate = CrateNumber;\n\t\tOverride = false;\n\n\t\t// bump the value to keep two simultaneous\n\t\t// crates from having the same effect\n\t\tCrateNumber += random (0, MAX_CRATE);\n\t\tCrateNumber %= MAX_CRATE;\n\t\tCrateNumber++;\n\t}\n\n\tswitch (crate) {\n\tcase 1:\n\tcase 17:\n\t\tif (GetArmorGrade () >= 5 && !Override) {crate = 0; restart;}\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cKArmor upgraded!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/armr\",255);\n\t\tSetArmorGrade (1, AGF_ADDITIVE|ARMOD_NOCHANGE);\n\t\tLog(n:0, s:\" gets Armor Upgrade crate.\");\n\t\tbreak;\n\tcase 2:\n\t\tSetFont (\"SMALLFONT\");\n\t\tAmbientSound (\"powerup/base\", 127);\n\t\tLog (n:0, s:\" gets Base Miracle.\");\n\t\tif(PlayerTeam() == TEAM_RED) {\n\t\t\tHudMessageBold (s:\"\\cARed Team\\cJ got \\cDBase Miracle!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\t\tif (GotBarracks[0]) SetActorHealth (201, GetActorSpawnHealth (201));\n\t\t\tif (GotRefinery[0]) SetActorHealth (203, GetActorSpawnHealth (203));\n\t\t\tif (GotPlant[0]) SetActorHealth (205, GetActorSpawnHealth (205));\n\t\t\tif (GotFactory[0]) SetActorHealth (207, GetActorSpawnHealth (207));\n  \t\t\tif (GotObelisk[0]) SetActorHealth (214, GetActorSpawnHealth (214));\n\t\t} else if(PlayerTeam() == TEAM_BLUE) {\n\t\t\tHudMessageBold (s:\"\\cNBlue Team\\cJ got \\cDBase Miracle!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t\tif (GotBarracks[1]) SetActorHealth (101, GetActorSpawnHealth (101));\n\t\t\tif (GotRefinery[1]) SetActorHealth (103, GetActorSpawnHealth (103));\n\t\t\tif (GotPlant[1]) SetActorHealth (105, GetActorSpawnHealth (105));\n\t\t\tif (GotFactory[1]) SetActorHealth (107, GetActorSpawnHealth (107));\n  \t\t\tif (GotObelisk[1]) SetActorHealth (114, GetActorSpawnHealth (114));\n\t\t}\n\t\tACS_ExecuteAlways (930, 0, BUILDING_ALL, PlayerTeam());\n\t\tHudMessage (s:\"\\cDBase miracle!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 3:\n\tcase 21:\n\t\tif ((CheckInventory (\"ChemicalArmor\") || CheckInventory (\"PowerChemicalProof\")) && !Override) {\n\t\t\tcrate = 1; // armor upgrade\n\t\t\trestart;\n\t\t}\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cDChemical proof!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/chem\",255);\n\t\tLocalAmbientSound (\"misc/armor_pkup\", 127);\n\t\tGiveInventory (\"ChemicalArmor\", 1);\n\t\tLog(n:0, s:\" gets Chem Proof.\");\n\t\tbreak;\n\tcase 4:\n\tcase 22:\n\t\tif (CheckInventory (\"PowerFirepowerUpgrade\") && !Override) {crate = 0; restart;}\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cKFirepower upgraded!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/dama\",255);\n\t\tGiveInventory(\"FirepowerUpgrade\",1);\n\t\tLog(n:0, s:\" gets FirePower Upgrade crate.\");\n\t\tbreak;\n\tcase 5:\n\tcase 16:\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"You got extra \\cQ$\\cD\", d:CreditAwardAmount, s:\"!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/cred\",255);\n\t\tDelay(4);\n\t\tLocalAmbientSound(\"powerup/credsound\",255);\n\t\tAddCreditsSilent(Credits[PlayerNumber()+1], CreditAwardAmount);\n\t\tLog(n:0, s:\" gets Bonus Credits Crate.\");\n\t\tbreak;\n\tcase 6:\n\tcase 23:\n\t\tif (Rank[PlayerNumber()] >= RANK_COMMANDO && !Override) {crate = 0; restart;}\n\t\tSetFont(\"SMALLFONT\");\n\t\tLog(n:0, s:\" gets Bonus XP crate.\");\n\t\tHudMessage (s:\"\\cJYou got \\cD250 \\cQXP\\cJ!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/exp\",255);\n\n\t\tfor (i = 0; i < 5; i++) {\n\t\t\tDelay(5);\n\t\t\tLocalAmbientSound(\"c4/use\",255);\n\t\t\tAddExperience (50);\n\t\t}\n\t\tbreak;\n\tcase 7:\n\tcase 18:\n\t\tif ((CheckInventory (\"FireArmor\") || CheckInventory (\"PowerFireProof\")) && !Override) {\n\t\t\tcrate = 1; // armor upgrade\n\t\t\trestart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cKFire proof!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/fire\",255);\n\t\tLocalAmbientSound (\"misc/armor_pkup\", 127);\n\t\tGiveInventory (\"FireArmor\", 1);\n\t\tLog(n:0, s:\" gets Fire Proof crate.\");\n\t\tbreak;\n\tcase 8:\n\tcase 24:\n\t\tif (!Override && (CheckInventory(\"StealthLaserRifle\") || CheckInventory (\"Knife\"))) {\n\t\t\tcrate = 0; restart;\n\t\t}\n\n\t\tif (!Override && (CheckInventory(\"PowerInvisibility\"))) {\n\t\t\tcrate = 0; restart;\n\t\t}\n\t\tLocalAmbientSound(\"powerup/invi\",255);\n\t\tLocalAmbientSound(\"powerup/invisound\",255);\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cUStealth Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cUStealth Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tSetArmorGrade (-1, AGF_ADDITIVE|ARMOD_NOCHANGE);\n\t\tGiveInventory (\"StealthLaserRifle\", 1);\n\t\tGiveInventory (\"LaserRifleAmmo\", 100);\n\t\tSetActorProperty(0,APROP_DeathSound,\"stealth/death\");\n\t\tLog(n:0, s:\" gets Stealth crate.\");\n\n\t\tHudMessage (s:\"\\cUStealth rifle!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tdelay (2*35);\n\t\tHudMessage (s:\"\\cJUse the rifle's \\cKAlt-Fire\\cJ\\nto toggle \\cUstealth!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 9:\n\tcase 25:\n\t\tif (CheckInventory (\"PowerInvulnerable\") && !Override) {crate = 0; restart;}\n\t\tif (TournamentMode) {crate = 0; restart;}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tLocalAmbientSound(\"powerup/iron\", 255);\n\t\tLocalAmbientSound(\"powerup/invisound\", 255);\n\t\tGiveInventory(\"IronCurtain\", 1);\n\t\tLog (n:0, s:\" gets Iron Curtain.\");\n\n\t\tif (PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cCIron Curtain!!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if (PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cCIron Curtain!!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tHudMessage (s:\"\\cCIron curtain!!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 10:\n\tcase 26:\n\tcase 36:\n\t\tif (CheckInventory (\"IsKamikaze\") && !Override) {crate = 0; restart;}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tif (TournamentMode) { // [SP] This crate is forbidden in tournament mode\n\t\t\tACS_ExecuteAlways(309, 0);\n\t\t\tterminate;\n\t\t}\n\t\tLocalAmbientSound(\"powerup/kama\",255);\n\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"Some crazy ass \\cARed player\\cJ got\\nthe \\cKKamikaze Crate!!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"Some crazy ass \\cNBlue player\\cJ got\\nthe \\cKKamikaze Crate!!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\tHudMessage (s:\"\\cKKamikaze!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tGiveInventory(\"IsKamikaze\",1);\n\t\tLog(n:0, s:\" gets Kamikaze.\");\n\t\tbreak;\n\tcase 11:\n\tcase 27:\n\t\tSetFont(\"SMALLFONT\");\n\t\tif (!Override && (CrateTime || CheckInventory(\"PlasmaCannon\"))) {\n\t\t\tACS_ExecuteAlways(309, 0);\n\t\t\tterminate;\n\t\t}\n\t\tLocalAmbientSound(\"powerup/plas\",255);\n\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cNPlasma Cannon Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cNPlasma Cannon Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tHudMessage (s:\"\\cNPlasma Cannon!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tGiveInventory(\"PlasmaCannon\",1);\n\t\tGiveInventory(\"PlasmaCannonAmmo\",10);\n\t\tRecountPlasma ();\n\t\tLog(n:0, s:\" gets Plasma Cannon.\");\n\t\tbreak;\n\tcase 12:\n\tcase 19:\n\t\tif (!CheckInventory (\"HasClass\") && !Override) {crate = 0; restart;}\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessage(s:\"RESIGNED\"; HUDMSG_FADEOUT, 240+PlayerNumber(), CR_DarkRed, 0.5, 0.35, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/resi\",255);\n\t\tSetFont(\"SMALLFONT\");\n\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tTeleport(71);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tTeleport(70);\n\n\t\tACS_ExecuteAlways(95, 0);\n\t\tLog(n:0, s:\" gets Resign Crate.\");\n\t\tbreak;\n\tcase 13:\n\tcase 20:\n\t\tSetFont(\"SMALLFONT\");\n\n\t\tif (!Override) {\n\t\t\tif (CheckInventory (\"PowerSpeedUpgrade\")) {crate = 0; restart;}\n\n\t\t\t// this crate ruins stealth due to speed trails\n\t\t\tif (CheckInventory (\"StealthLaserRifle\") || CheckInventory (\"Knife\")) {crate = 0; restart;}\n\n\t\t\t// also blurspheres\n\t\t\tif (CheckInventory (\"PowerInvisibility\")) {crate = 0; restart;}\n\t\t}\n\n\t\tLocalAmbientSound(\"powerup/sped\",255);\n\t\tHudMessage (s:\"\\cDSpeed upgraded!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory(\"SpeedUpgrade\",1);\n\t\tLog(n:0, s:\" gets Speed Upgrade.\");\n\t\tbreak;\n\tcase 14:\n\tcase 28:\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cJYou lost \\cQ$\\cD\", d:CreditAwardAmount;\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/stol\",255);\n\t\tDelay(4);\n\t\tLocalAmbientSound(\"powerup/stolsound\",255);\n\t\tTakeCreditsSilent(Experience[PlayerNumber()+1], CreditAwardAmount);\n\t\tLog(n:0, s:\" gets Credits Stolen.\");\n\t\tbreak;\n\tcase 15:\n\t\tif (CheckInventory (\"TimeGun\") && !Override) {crate = 0; restart;}\n\n\t\tLocalAmbientSound (\"powerup/time\", 127);\n\t\tLocalAmbientSound (\"misc/timewarp\", 64);\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cITime Gun Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cITime Gun Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory(\"TimeGunAmmo\",30);\n\t\tGiveInventory(\"TimeGun\",1);\n\n\t\tHudMessage (s:\"You got the \\cITime Gun!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tLog(n:0, s:\" gets Time Gun Crate.\");\n\t\tRecountTimeCops ();\n\t\tbreak;\n\tcase 29:\n\tcase 30:\n\tcase 31:\n\tcase 32:\n\tcase 33:\n\tcase 34:\n\tcase 56:\n\t\t// [Dusk] high rank dudes get less of these\n\t\tif (Rank[PlayerNumber()] >= RANK_LIEUTENANT && !random (0, 2)) {Crate = 0; restart;}\n\t\tSetFont(\"BIGFONT\");\n\t\tHudMessage(s:\"BOMB CRATE!\"; HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tif (GetCVar (\"aow_oldbombcrate\")) {\n\t\t\tAmbientSound(\"weapons/rocklx\",255);\n\t\t\tSetFont (\"SMALLFONT\");\n\t\t\tHudMessageBold (s:\"Some poor bugga got the bomb crate\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t\tLog (n:0, s:\" gets bomb crate and goes boom boom.\");\n\t\t\tGiveInventory (\"IsBombCrate\", 1);\n\t\t\tdelay(1);\n\t\t\tThing_Destroy (ActivatorTID(), 1); // death state spawns big boom\n\t\t\tterminate;\n\t\t}\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessageBold (n:0, s:\" is gonna blow!!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tif (PlayerTeam() == TEAM_BLUE)\n\t\t\tGiveInventory (\"BombCrateFXGiverBlue\", 1);\n\t\telse\n\t\t\tGiveInventory (\"BombCrateFXGiverRed\", 1);\n\n\t\tActivatorSound (\"powerup/bomb\", 127);\n\n\t\tfor (i = 0; i <= 3; i++) {\n\t\t\tif (GetHealth() <= 0) {\n\t\t\t\tFadeTo (0, 0, 0, 0, 1.0);\n\t\t\t\tterminate;\n\t\t\t}\n\n\t\t\t// CancelFade () doesn't work online\n\t\t\tif (PlayerTeam() == TEAM_BLUE)\n\t\t\t\tFadeTo (0, 0, 255, i*0.1, 1.0);\n\t\t\telse\n\t\t\t\tFadeTo (255, 128, 0, i*0.1, 1.0);\n\n\t\t\tdelay (35);\n\t\t}\n\n\t\tif (PlayerTeam() == TEAM_BLUE)\n\t\t\tFadeTo (0, 0, 255, 0.48, 0.8);\n\t\telse\n\t\t\tFadeTo (255, 128, 0, 0.48, 0.8);\n\n\t\tdelay (28);\n\t\tFadeTo (0, 0, 0, 0, 1.0);\n\t\tif (!CheckInventory (\"IsInSpawnRoom\")) GiveInventory (\"IsKamikaze\", 1);\n\t\tdelay (1);\n\t\tThing_Destroy (ActivatorTID(), 1);\n\t\tterminate;\n\tcase 35:\n\t\tSetFont(\"SMALLFONT\");\n\t\tif(CrateTime == True)\n\t\t{\n\t\t\tACS_ExecuteAlways(309, 0);\n\t\t\tterminate;\n\t\t}\n\t\tAmbientSound(\"weapons/rocklx\",255);\n\t\tAmbientSound(\"powerup/crsh\",255);\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t{\n\t\t\tHudMessageBold (s:\"Poor \\cARed Team\\cJ got \\cRBase Crasher\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t\tThing_Damage(201,4000,0);\n\t\t\tThing_Damage(203,4000,0);\n\t\t\tThing_Damage(205,4000,0);\n\t\t\tThing_Damage(207,4000,0);\n\t\t\tThing_Damage(214,2500,0);\n\t\t}\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t{\n\t\t\tHudMessageBold (s:\"Poor \\cNBlue Team\\cJ got \\cRBase Crasher\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t\tThing_Damage(101,4000,0);\n\t\t\tThing_Damage(103,4000,0);\n\t\t\tThing_Damage(105,4000,0);\n\t\t\tThing_Damage(107,4000,0);\n\t\t\tThing_Damage(114,2500,0);\n\t\t}\n\t\tHudMessage (s:\"\\cRBase crasher!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tACS_ExecuteAlways (930, 0, BUILDING_ALL, PlayerTeam()); // update the hud\n\t\tbreak;\n\tcase 37:\n\tcase 38:\n\t\tif (CheckInventory (\"UtilityGun\") && !Override) {crate = 0; restart;}\n\t\tSetFont(\"SMALLFONT\");\n\t\tGiveInventory(\"UtilityGun\", 75);\n\t\tGiveInventory(\"Utility_Ammo\", 75);\n\t\tLog(n:0, s:\" gets Utility Gun crate.\");\n\t\tHudMessage (s:\"You got the \\cKUtility Gun!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tdelay (2*35);\n\t\tHudMessage (s:\"Use \\cFAlt-Fire\\cJ for \\cNitem selection menu!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 39:\n\tcase 40:\n\t\tif ((CheckInventory (\"LaserArmor\") || CheckInventory (\"PowerLaserResistance\")) && !Override) {\n\t\t\tcrate = 1; // armor upgrade\n\t\t\trestart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cNLaser resistance!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/resistlaser\", 127);\n\t\tLocalAmbientSound (\"misc/armor_pkup\", 127);\n\t\tGiveInventory (\"LaserArmor\", 1);\n\t\tLog(n:0, s:\" gets Laser Resistance.\");\n\t\tbreak;\n\tcase 41:\n\tcase 42:\n\t\tif ((CheckInventory (\"ExplosionArmor\") || CheckInventory (\"PowerExplosiveResistance\")) && !Override) {\n\t\t\tcrate = 1; // armor upgrade\n\t\t\trestart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cIExplosive resistance!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/resistexplosive\", 127);\n\t\tLocalAmbientSound (\"misc/armor_pkup\", 127);\n\t\tGiveInventory (\"ExplosionArmor\", 1);\n\t\tLog(n:0, s:\" gets Explosive Resistance.\");\n\t\tbreak;\n\tcase 43:\n\tcase 44:\n\t\tif ((CheckInventory (\"BulletArmor\") || CheckInventory (\"PowerBulletResistance\")) && !Override) {\n\t\t\tcrate = 1; // armor upgrade\n\t\t\trestart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cUBulletproof Vest!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound(\"powerup/resistbullet\",255);\n\t\tLocalAmbientSound (\"misc/armor_pkup\", 127);\n\t\tGiveInventory (\"BulletArmor\", 1);\n\t\tLog(n:0, s:\" gets Bulletproof Vest.\");\n\t\tbreak;\n\tcase 45:\n\t\tif (!Override && (CrateTime || CheckInventory(\"IsMech\") || !MechEnabled || CheckInventory (\"GuardianPowerup\"))) {\n\t\t\tcrate = 0; restart;\n\t\t}\n\n\t\tLog(n:0, s:\" gets Guardian crate.\");\n\t\tGiveInventory(\"GuardianPowerup\",1);\n\t\tGiveInventory(\"FlamerAmmo\", 200);\n\t\tGiveInventory(\"NukeAmmo\", 1);\n\n\t\tLocalAmbientSound (\"switch/lrm\", 127);\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cKGuardian Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cKGuardian Crate!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tHudMessage (s:\"\\cJGuardian suit!\\nPress \\cF\", k:\"invuse\", s:\"\\cJ to enter\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\tbreak;\n\tcase 46:\n\t\tif (CrateTime || CheckInventory(\"IsMech\") || CheckInventory(\"PowerBerserk\")) {\n\t\t\tcrate = 0; restart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tGiveInventory (\"BerserkSwitch\", 1);\n\t\tdelay (5);\n\t\tGiveInventory (\"BerserkHue\", 1);\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cGBerserk!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cGBerserk!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tHudMessage (s:\"\\cGBerserk!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLog(n:0, s:\" gets Berserk Crate.\");\n\t\tbreak;\n\tcase 47:\n\tcase 48:\n\t\tif (CheckInventory (\"HealingRadiusItem\") && !Override) {crate = 0; restart;}\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cAHealing Radius!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory(\"HealingRadiusItem\",1);\n\t\tACS_ExecuteAlways (352, 0);\n\t\tLog(n:0, s:\" gets Healing Radius crate.\");\n\t\tbreak;\n\tcase 49:\n\tcase 50:\n\t\tfor (int k = 0; k<32; k++) {\n\t\t\tif ( PlayerInGame(k) && GetPlayerInfo(k,PLAYERINFO_TEAM) == PlayerTeam() )\n\t\t\t{\n\t\t\t\tif ( GetActorProperty(3800+k,APROP_Health) < GetActorProperty(3800+k,APROP_SpawnHealth) )\n\t\t\t\t\tSetActorProperty(3800+k,APROP_Health,GetActorProperty(3800+k,APROP_SpawnHealth));\n\t\t\t}\n\t\t}\n\n\t\tLog(n:0, s:\" gets Team Revival crate.\");\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tif(PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed Team\\cJ got \\cATeam Revival!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse if(PlayerTeam() == TEAM_BLUE)\n\t\t\tHudMessageBold (s:\"\\cNBlue Team\\cJ got \\cATeam Revival!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tHudMessage (s:\"\\cATeam revival!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 51:\n\tcase 52:\n\t\tif (!Override && CheckInventory (\"EagerBeaver\")) {crate = 0; restart;}\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cKA chainsaw! Find some meat!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory (\"EagerBeaver\", 1);\n\t\tLog(n:0, s:\" gets Chainsaw crate.\");\n\n\t\t// [Dusk] The chainsaw replaces unarmed, therefore\n\t\t// if we use the fists, switch to the chainsaw.\n\t\tif (CheckWeapon (\"Unarmed\"))\n\t\t\tSetWeapon (\"EagerBeaver\");\n\t\telse\n\t\t\tLocalAmbientSound (\"weapons/sawup\", 127);\n\n\t\tTakeInventory (\"Unarmed\", 1);\n\t\tbreak;\n\tcase 53:\n\tcase 54:\n\t\tif (!Override && CheckInventory(\"MarineBeaconItem\")) {crate = 0; restart;}\n\t\tif (AIMarineCount >= MAX_MARINES) {crate = 0; restart;}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cFMarine Beacon!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory(\"MarineBeaconItem\",1);\n\t\tACS_ExecuteAlways (352, 0);\n\t\tLog(n:0, s:\" gets Marine Beacon.\");\n\t\tbreak;\n\tcase 55:\n\t\tif (Timer() < 10*60*35 || CheckInventory (\"CrateChooser\") || TournamentMode) {\n\t\t\tif (!Override) {Crate = 0; restart;}\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tif (PlayerTeam() == TEAM_RED)\n\t\t\tHudMessageBold (s:\"\\cARed player\\cJ got \\cKOpen Deck!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\telse\n\t\t\tHudMessageBold (s:\"\\cNBlue player\\cJ got \\cKOpen Deck!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tHudMessage (s:\"\\cKOPEN DECK!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\n\t\tLocalAmbientSound (\"powerup/invisound\", 127);\n\t\tGiveInventory (\"CrateChooser\", 1);\n\t\tLog (n:0, s:\" gets Open Deck.\");\n\t\tbreak;\n\tcase 57:\n\tcase 58:\n\t\tSetFont(\"SMALLFONT\");\n\t\tGiveInventory (\"ThermalCloakingTime\", 90);\n\t\tACS_ExecuteAlways(953, 0);\n\t\tLog(n:0, s:\" gets Thermal Cloaking.\");\n\t\tHudMessage (s:\"\\cUThermal cloaking!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tdelay (35);\n\t\tHudMessage (s:\"Turrets cannot see you for 90 seconds\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tbreak;\n\tcase 59:\n\tcase 60:\n\t\t// high rank dudes get less of these\n\t\tif (Rank[PlayerNumber()] >= RANK_LIEUTENANT && !random (0, 2)) {Crate = 0; restart;}\n\t\tif (CheckInventory (\"IsMech\")) {crate = 0; restart;}\n\t\tSetFont (\"BIGFONT\");\n\t\tHudMessage (s:\"Disarm crate!\"; HUDMSG_FADEOUT, 240+PlayerNumber(), CR_RED, 0.5, 0.45, 2.0, 1.0);\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessageBold (s:\"Somebody went and lost all of his weapons.\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLog (n:0, s:\" gets disarm crate.\");\n\n\t\tCheckAndRemove (\"Boomstick\");\n\t\tCheckAndRemove (\"DoubleShotgun\");\n\t\tCheckAndRemove (\"Rifle\");\n\t\tCheckAndRemove (\"GaussRifle\");\n\t\tCheckAndRemove (\"Grenade_Launcher\");\n\t\tCheckAndRemove (\"StealthLaserRifle\");\n\t\tCheckAndRemove (\"LaserRifle\");\n\t\tCheckAndRemove (\"TimeGun\");\n\t\tCheckAndRemove (\"MissileLauncher\");\n\t\tCheckAndRemove (\"CrateChooser\");\n\t\tCheckAndRemove (\"LaserChaingun\");\n\t\tCheckAndRemove (\"UtilityGun\");\n\t\tCheckAndRemove (\"PlasmaCannon\");\n\t\tCheckAndRemove (\"ArtilleryCannon\");\n\t\tCheckAndRemove (\"ChemicalSprayer\");\n\t\tCheckAndRemove (\"TiberiumAutorifleWeak\");\n\t\tCheckAndRemove (\"TiberiumAutorifle\");\n\t\tCheckAndRemove (\"FragGrenade\");\n\t\tCheckAndRemove (\"RepairGunUpgrade\");\n\t\tif (Rank[PlayerNumber()] != RANK_COMMANDO) CheckAndRemove (\"RepairGun\");\n\t\tCheckAndRemove (\"HealGun\");\n\t\tCheckAndRemove (\"BombSquadGun\");\n\t\tCheckAndRemove (\"SubMachineGun\");\n\t\tCheckAndRemove (\"Flamer\");\n\t\tCheckAndRemove (\"ShockRifle\");\n\t\tCheckAndRemove (\"SniperRifle\");\n\t\tCheckAndRemove (\"SniperRifleWeak\");\n\t\tCheckAndRemove (\"PlasmaGun\");\n\t\tCheckAndRemove (\"MachineGun\");\n\t\tCheckAndRemove (\"GatlingGun\");\n\t\tCheckAndRemove (\"JumpjetGatlingGun\");\n\n\t\tif (CheckInventory (\"EagerBeaver\")) {\n\t\t\tTakeInventory (\"EagerBeaver\", 1);\n\t\t\tGiveInventory (\"Unarmed\", 1);\n\t\t}\n\n\t\tif (CheckInventory (\"Knife\"))\n\t\t\tSetWeapon (\"Knife\");\n\t\telse\n\t\t\tSetWeapon (\"Handgun\");\n\n\t\tSetActorSpeed (0, 1.0);\n\t\tPlayerSpeeds[PlayerNumber()] = 1.0;\n\n\t\tGiveCredits (-1, CheckInventory (\"Refunds\"));\n\t\tTakeInventory (\"Refunds\", CheckInventory (\"Refunds\"));\n\t\tSpawnSpotForced (\"TeleportFog\", 0, 0, 0);\n\t\tdelay (15);\n\t\tActivatorSound (\"heavy/argh\", 127);\n\t\tbreak;\n\tcase 61:\n\tcase 62:\n\t\tif (CheckInventory(\"PowerFatigue\")) {crate = 0; restart;}\n\n\t\t// this crate ruins stealth due to speed trails\n\t\tif (CheckInventory (\"StealthLaserRifle\") || CheckInventory (\"Knife\")) {\n\t\t\tCrate = 0; restart;\n\t\t}\n\n\t\tif (CheckInventory (\"PowerInvisibility\")) {\n\t\t\tCrate = 0; restart;\n\t\t}\n\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cAFatigue!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t//LocalAmbientSound(\"powerup/downsped\",255);\n\t\tGiveInventory(\"SpeedDowngrade\",1);\n\t\tLog(n:0, s:\" gets Fatigue crate.\");\n\t\tbreak;\n\tcase 63:\n\tcase 64:\n\t\tif (CheckInventory (\"RemoteC4\") && !Override) {\n\t\t\tACS_ExecuteAlways(309, 0);\n\t\t\tterminate;\n\t\t}\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cFRemote C4!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tLocalAmbientSound (\"c4/remote\", 127);\n\t\tGiveInventory (\"RemoteC4\", 1);\n\t\tGiveInventory (\"RemoteC4Ammo\", 5);\n\t\tLog(n:0, s:\" gets Remote C4 crate.\");\n\t\tbreak;\n\tcase 65:\n\tcase 66:\n\t\tif (!Override) {\n\t\t\t// stealth just breaks this\n\t\t\tif (CheckInventory (\"StealthLaserRifle\") || CheckInventory (\"Knife\")) {\n\t\t\t\tcrate = 0;\n\t\t\t\trestart;\n\t\t\t}\n\n\t\t\t// no duplicates\n\t\t\tif (CheckInventory (\"PowerInvisibility\")) {\n\t\t\t\tcrate = 0;\n\t\t\t\trestart;\n\t\t\t}\n\t\t}\n\n\t\tSetFont (\"SMALLFONT\");\n\t\tHudMessage (s:\"\\cFPartial Invisibility!\";\n\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\tGiveInventory (\"BlurSphere\", 1);\n\t\tLog (n:0, s:\" gets Partial Invisibility crate.\");\n\t\tbreak;\n\tcase 67:\n\tcase 68:\n\t\tstr RandomWeapon = -1;\n\t\tstr x;\n\n\t\t// Try determine a random weapon the player doesn't have.\n\t\tfor (i = 0; i <= 7; i++) {\n\t\t\tx = NormalWeaponNames[random (0, MAX_NORMAL_WEAPONS-1)];\n\t\t\tif (!CheckInventory (x)) {\n\t\t\t\tRandomWeapon = x;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (RandomWeapon != -1) {\n\t\t\tLocalAmbientSound (\"misc/w_pkup\", 127);\n\t\t\tHudMessage (s:\"\\cFRandom Weapon!\\nYou get a \\cF\", s:RandomWeapon;\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\n\t\t\tGiveInventory (RandomWeapon, 1);\n\t\t} else {\n\t\t\t// could not find a weapon the player doesn't have. reroll\n\t\t\tCrate = 0;\n\t\t\trestart;\n\t\t}\n\t}\n}\n\n// THERMAL CLOAKING\nscript 953 (void) {\n\tint k = 0;\n\tSetPlayerProperty(0,1,PROP_NOTARGET);\n\twhile (CheckInventory (\"ThermalCloakingTime\") > 0)\n\t{\n\t\tk = CheckInventory (\"ThermalCloakingTime\");\n\t\tSetFont(\"SMALLFONT\");\n\t\tHudMessage(s:\"Thermal Cloaking: \",d:k,s:\" seconds remaining\";\n\t\t\t0,8600+PlayerNumber(),CR_GOLD,1.0,0.0,2.0);\n\t\tdelay(35);\n\t\tTakeInventory (\"ThermalCloakingTime\", 1);\n\t}\n\tSetPlayerProperty(0,0,PROP_NOTARGET);\n\tHudMessage(s:\"WARNING! Thermal Cloaking: 0 seconds remaining\";\n\t\tHUDMSG_FADEOUT,8600+PlayerNumber(),CR_RED,1.0,0.0,5.0,2.0);\n}\n\nscript 966 (void) CLIENTSIDE {\n\t// [Dusk] Don't display this actor for the player who's currently\n\t// getting the bomb crate - said player gets a fade instead.\n\tif (ACS_ExecuteWithResult (651, 0) == ConsolePlayer) {\n\t\tSetActorState (0, \"Clear\");\n\t\tterminate;\n\t}\n\n\tif (ACS_ExecuteWithResult (964, 3) <= 0) {\n\t\tSetActorState (0, \"Clear\");\n\t\tterminate;\n\t}\n\n\tint x = ACS_ExecuteWithResult (964, 0);\n\tint y = ACS_ExecuteWithResult (964, 1);\n\tint z = ACS_ExecuteWithResult (964, 2);\n\tSetActorPosition (0, x, y, z, 0);\n}\n\n// target information\nscript 964 (int type, int value) {\n\tSetActivatorToTarget (0);\n\tSetResultValue (0);\n\tswitch (type) {\n\tcase 0: SetResultValue (GetActorX (0)); break;\n\tcase 1: SetResultValue (GetActorY (0)); break;\n\tcase 2: SetResultValue (GetActorZ (0)); break;\n\tcase 3: SetResultValue (GetHealth ()); break;\n\tcase 4: SetResultValue (GetActorAngle (0)); break;\n\tcase 5: SetResultValue (ActivatorTID ()); break;\n\tcase 6: SetPlayerProperty (0, value, PROP_FROZEN); break;\n\tcase 7: SetPlayerProperty (0, value, PROP_TOTALLYFROZEN); break;\n\tcase 8: SetResultValue (CheckInventory (value)); break;\n\tcase 9: SetResultValue (PlayerNumber ()); break;\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_death.txt",
        "contents": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * All Out War 2 death script\n * Credit to VoltlocK for originally creating the engine\n * With modifications by Eruanna, Dusk and the Omega Team\n *\n * You may use portions of this script in your project as long as you give\n * credit where credit is due. Please don't be lame and just copy-paste any\n * of this and call it your own. Thanks!\n */\n\n// death script: victim POV\nscript 994 DEATH {\n\tThing_ChangeTID (0, 9999);\n\tTakeInventory (\"ThermalCloakingTime\", 90);\n\tTakeInventory (\"InUtilMenu\", 1);\n\tSetPlayerProperty (0, 0, PROP_FROZEN);\n\tSetPlayerProperty (0, 0, PROP_TOTALLYFROZEN);\n\n\t// tiberium dropped by dead harvesters\n\tif (CheckInventory (\"TiberiumCrystal\") && !CheckInventory (\"IsInSpawnRoom\"))\n\t\tSpawnSpotForced (\"TiberiumCrystalDropped\", 0, 0, 0);\n\n\t// bomb pack disarm sound\n\tif (CheckWeapon (\"BombPack\") && !CheckInventory (\"IsTerrorist\")) ActivatorSound (\"c4/disarm\", 127);\n\n\t// activate plasma cannon cooldown, if player had a plasma cannon\n\tif (CheckInventory (\"PlasmaCannon\")) PlasmaCooldown[PlayerNumber()] = Timer() + PlasmaCooldownTime;\n\n\t// how much is this thing worth?\n\tint points = 1;\n\tif (CheckInventory (\"IsMech\")) {\n\t\tif (CheckInventory (\"OrcaWeapons\") ||\n\t\t\tCheckInventory (\"RavenWeapons\")) {\n\n\t\t\tpoints = 3;\n\t\t} else if (CheckInventory (\"WolverineWeapons\") ||\n\t\t\tCheckInventory (\"MadCatWeapons\") ||\n\t\t\tCheckInventory (\"TitanWeapons\") ||\n\t\t\tCheckInventory (\"GuardianWeapons\")) {\n\n\t\t\tpoints = 4;\n\t\t}\n\t}\n\n\t// were we on a spree?\n\tint killer_t = ACS_ExecuteWithResult (964, 5);\n\tint killer_p = ACS_ExecuteWithResult (964, 9);\n\t//Log (n:0, s:\"\\c-: I am \", d:ActivatorTID(), s:\" and was killed by \", d:killer_t, s:\" (\", n:killer_p+1, s:\")\");\n\tif (CheckInventory (\"SpreeCount\") >= 5) {\n\t\tSetFont (\"SMALLFONT\");\n\t\tif (killer_p != PlayerNumber() && killer_p != -1) {\n\t\t\t// killed by a player\n\t\t\tHudMessageBold (n:0, s:\"\\c-'s killing spree was ended by \", n:killer_p+1, s:\".\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t} else if (killer_t == 115) {\n\t\t\t// killed by blue obelisk\n\t\t\tHudMessageBold (n:0, s:\"\\c-'s killing spree was ended by the \\chBlue Obelisk\\c-.\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t} else if (killer_t == 215) {\n\t\t\t// killed by red obelisk\n\t\t\tHudMessageBold (n:0, s:\"\\c-'s killing spree was ended by the \\cgRed Obelisk\\c-.\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t} else if (killer_p == PlayerNumber ()) {\n\t\t\t// killed by something (self, env. kills, etc)\n\t\t\tHudMessageBold (n:0, s:\"\\c- was lookin' good until he tripped over a log!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS, 2.0, 1.0);\n\t\t}\n\t}\n\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * KILLER POV STARTS HERE\n\t */\n\n\tint n0 = PlayerNumber();\n\tint t0 = PlayerTeam();\n\tSetActivatorToTarget (0);\n\tif ((ActivatorTID () < 3800 || ActivatorTID () > 3831) && ActivatorTID () != 9999) terminate;\n\n\tint n1 = PlayerNumber();\n\tint t1 = PlayerTeam();\n\n\t// remove tickets from the victim team\n\tTakeTickets (t0, points);\n\n\t// no points for suicides\n\tif (n0 != n1 && n1 != -1) {\n\t\tGivePoints (2*points);\n\t\tACS_ExecuteAlways (931, 0);\n\n\t\tLocalAmbientSound (\"game/boink\", 127);\n\t\tGiveCredits (-1, CreditFragAward);\n\t\tAddExperience (50);\n\n\t\tdelay (5);\n\n\t\tif (!FirstBlood) {\n\t\t\t// we got first blood!\n\t\t\tFirstBlood = true;\n\n\t\t\tHudMessageBold (n:0, s:\"\\c- gets first blood!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t}\n\n\t\t// check sprees\n\t\tGiveInventory (\"SpreeCount\", 1);\n\t\tSetFont (\"SMALLFONT\");\n\t\tswitch (CheckInventory (\"SpreeCount\")) {\n\t\tcase 5:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is on a killing spree!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is on a rampage!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_WHITE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\tcase 15:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is dominating!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_TAN,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\tcase 20:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is unstoppable!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_YELLOW,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\tcase 25:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is Godlike!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_ORANGE,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\tcase 30:\n\t\t\tHudMessageBold (n:0, s:\"\\c- is Wicked Sick!\";\n\t\t\t\tHUDMSG_FADEOUT, 15000, CR_RED,\n\t\t\t\tINTEL_XPOS, INTEL_YPOS2, 2.0, 1.0);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tACS_ExecuteAlways (992, 0);\n}\n\n// Guardian stomp health\nscript 923 (void) {\n\tSetActivatorToTarget (0);\n\tif (!CheckWeapon (\"GuardianWeapons\")) terminate;\n\tSetHealth (GetHealth () + 100);\n\tif (GetHealth () > GetSpawnHealth ()) SetHealth (GetSpawnHealth ());\n}\n\n// [SP] Fragging a monster\nScript 947 (int Amount) {\n\tif (ActivatorTID() >= 3800 && ActivatorTID() <= 3831) {\n\t\tLocalAmbientSound(\"game/boink\",255);\n\t\tAddExperience(10 * Amount);\n\t\tAddCredits(Credits[PlayerNumber()+1], 15 * Amount);\n\t}\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_dmgovertime.txt",
        "contents": "//Player burnt and is burning script, unfortunately the killer who set the player alight is not awarded for this.\nscript 360 (void) {\n\tdelay (1);\n\n\tif (CheckInventory(\"CrispyPlayer\")) terminate;\n\n\tGiveInventory(\"CrispyPlayer\",1);\n\tint n = 10;\n\twhile (n > 0 && GetHealth() > 1) {\n\t\tThing_Damage2 (0, 1, \"FireSpecial\");\n\t\tdelay(5);\n\t\tn--;\n\t}\n\n\tTakeInventory(\"CrispyPlayer\",1);\n}\n\n//Player poisoned and is burning script, unfortunately the killer who set the player alight is not awarded for this.\nscript 361 (void) {\n\tdelay(1);\n\n\tif (CheckInventory(\"CrispyPlayer2\")) terminate;\n\n\tGiveInventory(\"CrispyPlayer2\", 1);\n\tint n = 20;\n\twhile (n > 0 && GetHealth() > 1) {\n\t\tThing_Damage2 (0, 1, \"ChemicalSpecial\");\n\t\tdelay(8);\n\t\tn--;\n\t}\n\tTakeInventory (\"CrispyPlayer2\", 1);\n}"
      },
      {
        "source": "pk3",
        "name": "acs_source/a_donate.txt",
        "contents": "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * All Out War 2 donation script\n * Credit to VoltlocK for originally creating the engine\n * With modifications by Eruanna, Dusk and the Omega Team\n *\n * You may use portions of this script in your project as long as you give\n * credit where credit is due. Please don't be lame and just copy-paste any\n * of this and call it your own. Thanks!\n */\n\nint Donor[32];\n\nFunction int DonateCredits (int Player, int NewCredits) {\n\tCredits[PlayerNumber()+1] -= NewCredits;\n\tif(Credits[PlayerNumber()+1] < 0)\n\t\tCredits[PlayerNumber()+1] = 0;\n\n\tCredits[CheckInventory(\"DonationName\")+1] += NewCredits;\n\n\t// int donor = PlayerNumber()+1;\n\tLocalAmbientSound(\"powerup/stolsound\",255);\n\n\tSETFONT(\"SMALLFONT\");\n\tHudMessage(s:\"You have donated \\cf$\",d:NewCredits,s:\"\\cd to \", n:CheckInventory(\"DonationName\")+1;\n\t\tHUDMSG_FADEOUT, 480+PlayerNumber(), CR_Green, 0.5, 0.55, 2.0, 1.0);\n\n\tDonor[CheckInventory(\"DonationName\")] = PlayerNumber(); // used in the message to the donatee\n\tGiveActorInventory (3800+CheckInventory(\"DonationName\"), \"DonationMessage\", 1);\n\n\treturn NewCredits;\n}\n\nfunction void ShowCurrentDonationMenu (void)\n{\n\tint DonationName = CheckInventory(\"DonationName\");\n\n\tif (DonationName > 31)\n\t\tTakeInventory(\"DonationName\", 31);\n\n\tint color = CR_BLUE;\n\tif (PlayerTeam() == TEAM_RED) color = CR_RED;\n\n\tSETFONT(\"DoomFont\");\n\tHudMessage(s:\"\\cJ== Make a donation!\",\n\ts:\"\\n\\cFChange Name \\cK-> \\cI\", k:\"DonationName\",\n\ts:\"\\n\\cFDonate \\cQ$\\cD100 \\cK-> \\cI\", k:\"DonationGive\",\n\ts:\"\\n\\n\", n:DonationName+1, s:\"\\n\\cKCredits: \\cQ$\\cD\", d:Credits[DonationName+1],\n\ts:\"\\n\\cKHealth: \", d:GetActorHealth (3800+DonationName), s:\" / \", d:GetActorSpawnHealth (3800+DonationName),\n\ts:\"\\n\\cK\", s:DisplayName (DonationName);\n\t\tHUDMSG_PLAIN, 6000+PlayerNumber(), color, -0.65, 0.65, 1.15);\n}\n\n//Donations\nscript 333 (void) NET\n{\n\tif(CheckInventory(\"DonateMenu\") == 0)\n\t\tterminate;\n\n\tif(CheckInventory(\"InGame\") == 0)\n\t\tterminate;\n\n\tShowCurrentDonationMenu();\n\n\tdelay(35);\n\trestart;\n\n}\n\nscript 334 (int Which) NET {\n\tint CheckValid = 1;\n\n\tif(CheckInventory(\"InGame\") == 0)\n\t\tterminate;\n\n\tif(Which == 1 && CheckInventory(\"DonateMenu\") == 1)\n\t{\n\t\tGiveInventory(\"DonationName\",1);\n\t\twhile ( CheckValid )\n\t\t{\n\t\t\tif ( GetPlayerInfo(0+CheckInventory(\"DonationName\"),PLAYERINFO_TEAM) != PlayerTeam() )\n\t\t\t\tGiveInventory(\"DonationName\",1);\n\t\t\telse\n\t\t\t\tCheckValid = 0;\n\t\t\tif ( CheckInventory(\"DonationName\") > 32 )\n\t\t\t\tTakeInventory(\"DonationName\",100);\n\t\t}\n\t\tShowCurrentDonationMenu();\n\t}\n\telse if(Which == 2 && CheckInventory(\"DonateMenu\") == 1)\n\t{\n\t\tif(GetPlayerInfo(0+CheckInventory(\"DonationName\"),PLAYERINFO_TEAM) != PlayerTeam()) {\n\t\t\tSETFONT(\"BigFont\");\n\t\t\tHudMessage(s:\"That player is not on your team!!\";\n\t\t\t\tHUDMSG_FADEOUT, 480+PlayerNumber(), CR_DarkRed, 0.5, 0.55, 2.0, 1.0);\n\t\t\tterminate;\n\t\t}\n\n\t\tif (CheckInventory(\"DonationName\") == PlayerNumber()) {\n\t\t\tSETFONT(\"BigFont\");\n\t\t\tHudMessage(s:\"You cannot donate to yourself!\";\n\t\t\t\tHUDMSG_FADEOUT, 480+PlayerNumber(), CR_DarkRed, 0.5, 0.55, 2.0, 1.0);\n\t\t\tterminate;\n\t\t}\n\n\t\tif (Credits[PlayerNumber()+1] < 100) {\n\t\t\tSETFONT(\"BigFont\");\n\t\t\tHudMessage(s:\"You can't afford this!\";\n\t\t\t\tHUDMSG_FADEOUT, 480+PlayerNumber(), CR_DarkRed, 0.5, 0.55, 2.0, 1.0);\n\t\t\tterminate;\n\t\t}\n\t\tDonateCredits(CheckInventory(\"DonationName\"), 100);\n\t}\n\telse if(Which == 3)\n\t{\n\t\tSETFONT(\"SMALLFONT\");\n\t\tHudMessage(s:\"You have been donated \\cf$100\"; HUDMSG_FADEOUT, 480+PlayerNumber(), CR_Green, 0.5, 0.55, 2.0, 1.0);\n\t}\n}\n\nscript 335 (void) NET\n{\n\tint CheckValid = 1;\n\n\tif(CheckInventory(\"InGame\") == 0)\n\t\tterminate;\n\n\tif(CheckInventory(\"DonateMenu\") == 1)\n\t{\n\t\tTakeInventory(\"DonateMenu\",1);\n\t\tHudMessage(s:\"\"; HUDMSG_PLAIN, 6000+PlayerNumber(), CR_Green, 0.0, 0.2, 0.4); // clear donation menu\n\t\tterminate;\n\t}\n\telse\n\t{\n\t\tGiveInventory(\"DonateMenu\",1);\n\t\twhile (CheckValid) {\n\t\t\tif (GetPlayerInfo(0+CheckInventory(\"DonationName\"),PLAYERINFO_TEAM) != PlayerTeam())\n\t\t\t\tGiveInventory(\"DonationName\", 1);\n\t\t\telse\n\t\t\t\tCheckValid = 0;\n\t\t\tif (CheckInventory(\"DonationName\") > 31)\n\t\t\t\tTakeInventory(\"DonationName\", 31);\n\t\t}\n\t\tShowCurrentDonationMenu();\n\t\tACS_ExecuteAlways(333, 0);\n\t}\n}"
      }
    ]
  },
  "maps": []
}

gib.gg runs on open-source software and freely licensed replacement game assets from the Freedoom project. gib.gg is not affiliated with Bethesda Softworks, id Software, or ZeniMax Media. All trademarks belong to their respective owners. Some WADs and associated metadata on this site are sourced from WAD Archive. User-submitted content remains the responsibility of its respective authors. If you believe content on this site violates your rights, please send DMCA requests to dmca@gib.gg.