
/*
SCRIPT 252 (VOID) // Water Fountain
{
 if (CheckInventory("Jar") == 0)
 {
  health_gain[PlayerNumber()] += 256;
 }
 else
 {
  health_gain[PlayerNumber()] += 256;
  TakeInventory("Jar", 1);
  GiveInventory("Water", 1);
 }
}

SCRIPT 253 (VOID) // Latte Fountain
{
 if (CheckInventory("Jar") == 0)
 {
  heka_gain[PlayerNumber()] += 256;
 }
 else
 {
  heka_gain[PlayerNumber()] += 256;
  TakeInventory("Jar", 1);
  GiveInventory("Latte", 1);
 }
}
*/

SCRIPT 254 (int liquid) // BananaMilk Fountain
{
 ActivatorSound("ANKH_WORK",127);
 switch (liquid)
 {
 	case 0:	//water
			if (CheckInventory("Jar") == 0)
			{
			  	health_gain[PlayerNumber()] += 256;
			}
			else
			{
				health_gain[PlayerNumber()] += 256;
				TakeInventory("Jar", 1);
				GiveInventory("Water", 1);
			}
			break;
	case 1:	//latte
			if (CheckInventory("Jar") == 0)
			{
			  heka_gain[PlayerNumber()] += 256;
			}
			else
			{
			  heka_gain[PlayerNumber()] += 256;
			  TakeInventory("Jar", 1);
			  GiveInventory("Latte", 1);
			}
			break;
	case 2:	//banana milk
			if (CheckInventory("Jar") == 0)
 			{
  				health_gain[PlayerNumber()] += 256;
				heka_gain[PlayerNumber()] += 256;
			}
			else
			{
				health_gain[PlayerNumber()] += 256;
				heka_gain[PlayerNumber()] += 256;
				TakeInventory("Jar", 1);
				GiveInventory("BananaMilk", 1);
			}
			break;
	default:
			if (CheckInventory("Jar") == 0)
 			{
  				health_gain[PlayerNumber()] += 256;
				heka_gain[PlayerNumber()] += 256;
			}
			else
			{
				health_gain[PlayerNumber()] += 256;
				heka_gain[PlayerNumber()] += 256;
				TakeInventory("Jar", 1);
				GiveInventory("BananaMilk", 1);
			}
			break;
 }
}

SCRIPT 255 (VOID) // Fountain Message
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN); 
 LocalAmbientSound("misc/chat", 127);

 messageBox_Plain("THIS IS AN ULTRA-FOUNTAIN.\n\nPRESS THE USE KEY TO DRINK FROM IT.","BILFONT",HUDMSG_PLAIN, CR_TAN);
 
 int buttons;
 bool ok = false;
 delay(8);
  while (ok == false)
  {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
  }
 messageBox_Clear();
 LocalAmbientSound("menu/change", 127);
 
 messageBox_Plain("IT ALSO FILLS ALL YOUR EMPTY BOTTLES:\n\nBLUE WATER FULLY RESTORES MORTALITY.\nBROWN LATTE FULLY RESTORES POWER.\nAND YELLOW BANANA MILK IS A FULL RESTORE.","BILFONT",HUDMSG_PLAIN, CR_TAN);
 
 ok = false;
 delay(8);
  while (ok == false)
  {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
  }
 messageBox_Clear();
 LocalAmbientSound("menu/change", 127);
 
 messageBox_Plain("ENJOY!","BILFONT",HUDMSG_PLAIN, CR_TAN);
 
 ok = false;
 delay(8);
  while (ok == false)
  {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
  }
 messageBox_Clear();
 LocalAmbientSound("menu/change", 127);
 
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN); 
}

SCRIPT 258 OPEN //sets liquid colors
{
/*
Sector_SetColor(const:255, 0, 64, 160); // Water
Sector_SetFade(255,0,32,128);
Sector_SetColor(const:254, 0, 160, 64); // Slime
Sector_SetFade(254,0,128,0);
Sector_SetColor(const:253, 200, 0, 0); // BananaMilk
Sector_SetFade(253,192,64,0);
Sector_SetColor(const:252, 180, 180, 0); // BananaMilk
Sector_SetFade(252,128,128,0);
*/

//number change

/*
Sector_SetColor(const:255, 0, 144, 240); // Water
Sector_SetFade(255,0,144,240);
Sector_SetColor(const:254, 0, 160, 64); // Slime
Sector_SetFade(254,0,160,64);
Sector_SetColor(const:253, 144, 64, 48); // Latte
Sector_SetFade(253,144,64,48);
Sector_SetColor(const:255, 224, 192, 0); // BananaMilk
Sector_SetFade(252,224,192,0);
*/


Sector_SetColor(const:255, 64, 128, 255); // Water
//Sector_SetFade(255,0,128,255);
Sector_SetColor(const:254, 0, 160, 64); // Slime
//Sector_SetFade(254,0,128,32);
Sector_SetColor(const:253, 144, 64, 48); // Latte
//Sector_SetFade(253,112,32,16);
Sector_SetColor(const:252, 208, 64, 0); // BananaMilk
//Sector_SetFade(252,192,160,0);

}

SCRIPT 259 OPEN //sets colored lights
{
//Sector_SetColor(const:110, 0, 0, 255); // Blue
//Sector_SetColor(const:111, 0, 255, 0); // Green
//Sector_SetColor(const:112, 255, 0, 0); // Red
//Sector_SetColor(const:113, 255, 0, 255); // Purple
//Sector_SetColor(const:114, 255, 255, 0); // Yellow
//Sector_SetColor(const:115, 255, 128, 0); // Orange

// Number Change

Sector_SetColor(const:251, 0, 0, 255); // Blue
Sector_SetColor(const:250, 0, 255, 0); // Green
Sector_SetColor(const:249, 255, 0, 0); // Red
Sector_SetColor(const:248, 255, 0, 255); // Purple
Sector_SetColor(const:247, 255, 255, 0); // Yellow
Sector_SetColor(const:246, 0, 255, 255); // Cyan
Sector_SetColor(const:245, 255, 96, 0); // Orange
}

SCRIPT 335 (int TrampolineForce)
{
 ActivatorSound("BOUNCE",127);
 ThrustThingZ(0,TrampolineForce,0,0);
}

SCRIPT 336 (int TrampolineForce, int TrampolineAngle)
{
 ThrustThing(TrampolineAngle,TrampolineForce,0,0);
 ThrustThingZ(0,TrampolineForce,0,0);
}

//fades the screen to a color
SCRIPT 343(int r, int g, int b)
{
	fadeto(r,g,b,1.0,0.125);
}

//fades the screen to a color at half intensity
SCRIPT 344(int r, int g, int b)
{
	fadeto(r,g,b,0.5,0.125);
}

//gives the player's view back
SCRIPT 345(VOID)
{
	fadeto(0,0,0,0.0,0.125);
}

//Check if the gametype is a multiplayer game and returns the value.
//This is used for DECORATE jumps.
SCRIPT 354 (VOID)
{
	SetResultValue(0);

	if (GameType () == GAME_SINGLE_PLAYER)
		SetResultValue(0);
		
	else if (GameType () == GAME_NET_COOPERATIVE)
		SetResultValue(1);
		
	else if (GameType () == GAME_NET_DEATHMATCH)
		SetResultValue(2);
		
	else if (GameType () == GAME_TITLE_MAP)
		SetResultValue(3);
}

SCRIPT 900 (VOID)
{
 localsetmusic("ACTION1");
}

SCRIPT 901 (VOID)
{
 localsetmusic("ACTION2");
}

SCRIPT 902 (VOID)
{
 localsetmusic("ACTION3");
}

SCRIPT 903 (VOID)
{
 localsetmusic("END");
}

script 904 (VOID)
{
	setGravity(gravityAmount[gravitycounter]);
	printbold(s: planet[gravitycounter], s: " Gravity");

	gravitycounter++;
	if (gravitycounter == 19)
		gravitycounter = 0;
}