
script 233 ENTER					// player TID changer

{
Thing_ChangeTID (0, PlayerNumber()+1337);
}

script 234 ENTER					// clip checker

{
ammo1 = CheckInventory ("Clip");

if(ammo1 < capacity1)
{
    setthingspecial (1020, 249, 0, 20, 0, 0);
}

if(ammo1 == capacity1)
{
    setthingspecial (1020, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 235 ENTER					// rocket checker

{
ammo3 = CheckInventory ("RocketAmmo");

if(ammo3 < capacity3)
{
    setthingspecial (1051, 226, 249, 0, 51, 0, 0);
    setthingspecial (1055, 226, 249, 0, 55, 0, 0);
}

if(ammo3 == capacity3)
{
    setthingspecial (1051, 0, 0, 0, 0, 0, 0);
    setthingspecial (1055, 0, 0, 0, 0, 0, 0);
}


delay(1);
Restart;
}

script 236 ENTER					// chainsaw checker

{
weapon1 = CheckInventory ("Chainsaw");

if(weapon1 == 0)
{
    setthingspecial (1001, 226, 249, 0, 1, 0, 0);
}

if(weapon1 > 0)
{
    setthingspecial (1001, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 237 ENTER					// pistol checker

{
weapon2 = CheckInventory ("Pistol");
ammo1 = CheckInventory ("Clip");

if(ammo1 < capacity1)
{
    setthingspecial (1002, 226, 249, 0, 2, 0, 0);
}

if(weapon2 == 0)
if(ammo1 == capacity1)
{
    setthingspecial (1002, 226, 249, 0, 2, 0, 0);
}

if(weapon2 > 0)
if(ammo1 == capacity1)
{
    setthingspecial (1002, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 238 ENTER					// shotgun checker

{
weapon3 = CheckInventory ("Shotgun");
ammo2 = CheckInventory ("Shell");

if(ammo2 < capacity2)
{
    setthingspecial (1003, 226, 249, 0, 3, 0, 0);
}

if(weapon3 == 0)
if(ammo2 == capacity2)
{
    setthingspecial (1003, 226, 249, 0, 3, 0, 0);
}

if(weapon3 > 0)
if(ammo2 == capacity2)
{
    setthingspecial (1003, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 239 ENTER					// super shotgun checker

{
weapon33 = CheckInventory ("SuperShotgun");
ammo2 = CheckInventory ("Shell");

if(ammo2 < capacity2)
{
    setthingspecial (1033, 226, 249, 0, 33, 0, 0);
}

if(weapon33 == 0)
if(ammo2 == capacity2)
{
    setthingspecial (1033, 226, 249, 0, 33, 0, 0);
}

if(weapon33 > 0)
if(ammo2 == capacity2)
{
    setthingspecial (1033, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}


script 240 ENTER					// chaingun checker

{
weapon4 = CheckInventory ("Chaingun");
ammo1 = CheckInventory ("Clip");

if(ammo1 < capacity1)
{
    setthingspecial (1004, 226, 249, 0, 4, 0, 0);
}

if(weapon4 == 0)
if(ammo1 == capacity1)
{
    setthingspecial (1004, 226, 249, 0, 4, 0, 0);
}

if(weapon4 > 0)
if(ammo1 == capacity1)
{
    setthingspecial (1004, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 241 ENTER					// rocket launcher checker

{
weapon5 = CheckInventory ("PhoenixRod");
ammo3 = CheckInventory ("RocketAmmo");

if(ammo3 < capacity3)
{
    setthingspecial (1005, 226, 249, 0, 5, 0, 0);
}

if(weapon5 == 0)
if(ammo3 == capacity3)
{
    setthingspecial (1005, 226, 249, 0, 5, 0, 0);
}

if(weapon5 > 0)
if(ammo3 == capacity3)
{
    setthingspecial (1005, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 242 ENTER					// plasma gun checker

{
weapon6 = CheckInventory ("PlasmaRifle");
ammo4 = CheckInventory ("Cell");

if(ammo4 < capacity4)
{
    setthingspecial (1006, 226, 249, 0, 6, 0, 0);
}

if(weapon6 == 0)
if(ammo4 == capacity4)
{
    setthingspecial (1006, 226, 249, 0, 6, 0, 0);
}

if(weapon6 > 0)
if(ammo4 == capacity4)
{
    setthingspecial (1006, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 243 ENTER					// bfg checker

{
weapon7 = CheckInventory ("BFG9000");
ammo4 = CheckInventory ("Cell");

if(ammo4 < capacity4)
{
    setthingspecial (1007, 226, 249, 0, 7, 0, 0);
}

if(weapon7 == 0)
if(ammo4 == capacity4)
{
    setthingspecial (1007, 226, 249, 0, 7, 0, 0);
}

if(weapon7 > 0)
if(ammo4 == capacity4)
{
    setthingspecial (1007, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 244 ENTER					// railgun checker

{
weapon8 = CheckInventory ("RocketLauncher");
ammo4 = CheckInventory ("Cell");

if(ammo4 < capacity4)
{
    setthingspecial (1008, 226, 249, 0, 8, 0, 0);
}

if(weapon8 == 0)
if(ammo4 == capacity4)
{
    setthingspecial (1008, 226, 249, 0, 8, 0, 0);
}

if(weapon8 > 0)
if(ammo4 == capacity4)
{
    setthingspecial (1008, 0, 0, 0, 0, 0, 0);
}

delay(1);
Restart;
}

script 245 ENTER					// flame orb/rocket checker

{
ammo3 = CheckInventory ("RocketAmmo");
ammo5 = CheckInventory ("PhoenixRodAmmo");

if(ammo5 < ammo3)
{
    TakeInventory ("RocketAmmo", ammo3 - ammo5);
}

else if(ammo5 > ammo3)
{
    GiveInventory ("RocketAmmo", ammo5 - ammo3);
}
delay(1);
Restart;
}

script 246 (void)					// ring

{
GiveInventory ("HealthBonus", 1);
}

script 247 (void)					// backpack

{

}

script 248 ENTER					// capacity checker

{
pack = CheckInventory ("Backpack");

if(pack == 0)
{
    capacity1 = 150;
    capacity2 = 40;
    capacity3 = 20;
    capacity4 = 200;
}

else if(pack > 0)
{
    capacity1 = 300;
    capacity2 = 80;
    capacity3 = 40;
    capacity4 = 400;
}
delay(1);
Restart;
}

script 249 (int arg0)					// grab stuff

{
if(arg0 == 1)
{
    GiveInventory ("Chainsaw", 1);
}

else if(arg0 == 2)
{
    GiveInventory ("Pistol", 1);
}

else if(arg0 == 20)
{
    GiveInventory ("Clip", 1);
}

else if(arg0 == 3)
{
    GiveInventory ("Shotgun", 1);
}

else if(arg0 == 33)
{
    GiveInventory ("SuperShotgun", 1);
}

else if(arg0 == 4)
{
    GiveInventory ("Chaingun", 1);
}

else if(arg0 == 5)
{
    GiveInventory ("PhoenixRod", 1);
}

else if(arg0 == 51)
{
    GiveInventory ("PhoenixRodAmmo", 1);
}

else if(arg0 == 55)
{
    GiveInventory ("PhoenixRodAmmo", 5);
}

else if(arg0 == 6)
{
    GiveInventory ("PlasmaRifle", 1);
}

else if(arg0 == 7)
{
    GiveInventory ("BFG9000", 1);
}

else if(arg0 == 8)
{
    GiveInventory ("RocketLauncher", 1);
}

else if(arg0 == 50)
{
GiveInventory ("ArmorBonus", (50 - armour));
}

else if(arg0 == 200)
{
   GiveInventory ("HealthBonus", 50);
}

}

script 250 (void)					// water splash

{
activatorsound ("splash", 127);
}

script 251 (int arg0, int arg1)				// spring (horizontal)

{
activatorsound ("spring", 127);
ThrustThing (arg1, arg0, 1);
}

script 252 (int arg0, int arg1)				// spring (vertical)

{
activatorsound ("spring", 127);
ThrustThingZ (0, arg0, arg1, 0);
}

script 253 ENTER					// golden health potion checker

{
health =  CheckInventory ("Health");

if(health < 200)
{
   setthingspecial (1200, 226, 249, 0, 200, 0, 0);
}

else if(health == 200)
{
   setthingspecial (1200, 0, 0, 0, 0, 0, 0);
}
delay(1);
Restart;
}

script 254 ENTER					// light armour checker

{
armour =  CheckInventory ("Armor");

if(armour < 50)
{
   setthingspecial (1050, 226, 249, 0, 50, 0, 0);
}

else if(armour > 49)
{
   setthingspecial (1050, 0, 0, 0, 0, 0, 0);
}
delay(1);
Restart;
}
