#include "zcommon.acs"

#DEFINE TAGS_GRAVITY 7

int sif = 0;
int valkTest = 0;
int owlsGame = 0;
int gravityTags[7] = {39,40,41,42,43,45,71};
str futhark[6] = {"Fehu","Uruz","Thurisaz","Ansaz","Raidho","Kenaz"};
bool valkNames[6] = {false,false,false,false,false,false};

SCRIPT 01 OPEN	//Sets line and sector specials
{
	//ceiling_Waggle(255,64,8,0,0);	//Water Tide
	ceiling_Waggle(57,256,8,0,0);	//Water Tide
	Sector_SetColor(const:57, 64, 128, 255); // Water
	//Sector_SetFade(57,0,128,255);
	SetLineSpecial (1, ForceField);
	SetCameraToTexture(44,"TCAMTEX1",90);
	for(int count = 0; count < TAGS_GRAVITY; count++)
		Sector_SetGravity (gravityTags[count], 4, 0);
}

//change indoor and outdoor music
SCRIPT 02 (int area)
{
	switch(area)
	{
		case 1:
			localsetmusic("SPECIFIC");
			break;
		default:
			localsetmusic("*");
			break;
	}
}

//set colored lights
SCRIPT 03 OPEN
{
  Sector_SetColor(const:2,255,0,0);
  Sector_SetColor(const:3,0,255,0);
  Sector_SetColor(const:4,0,0,255);
  delay(4);
  Sector_SetColor(const:2,224,0,0);
  Sector_SetColor(const:3,0,224,0);
  Sector_SetColor(const:4,0,0,224);
  delay(4);
  Sector_SetColor(const:2,192,0,0);
  Sector_SetColor(const:3,0,192,0);
  Sector_SetColor(const:4,0,0,192);
  delay(4);
  Sector_SetColor(const:2,160,0,0);
  Sector_SetColor(const:3,0,160,0);
  Sector_SetColor(const:4,0,0,160);
  delay(4);
  Sector_SetColor(const:2,128,0,0);
  Sector_SetColor(const:3,0,128,0);
  Sector_SetColor(const:4,0,0,128);
  delay(4);
  Sector_SetColor(const:2,160,0,0);
  Sector_SetColor(const:3,0,160,0);
  Sector_SetColor(const:4,0,0,160);
  delay(4);
  Sector_SetColor(const:2,192,0,0);
  Sector_SetColor(const:3,0,192,0);
  Sector_SetColor(const:4,0,0,192);
  delay(4);
  Sector_SetColor(const:2,224,0,0);
  Sector_SetColor(const:3,0,224,0);
  Sector_SetColor(const:4,0,0,224);
  delay(4);
  restart;
}

//read rune signs
SCRIPT 04 (int rune)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 SetFont("BILFONT");
 HudMessage(s:futhark[rune]; HUDMSG_PLAIN, 1, CR_TAN, -0.21, -0.01, 0);
 setPlainMsgBox();
 
 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();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//open elevator doors
SCRIPT 05 (int floor)
{
	polywait(3);
	polywait(4);
	polywait(5);
	polywait(6);
	polywait(7);
	polywait(8);
	polywait(9);
	polywait(10);
	tagwait(5);
	tagwait(46);
	
	//TeleportInSector (tag, source_tid, dest_tid, fog?, group_tid)
	switch(floor)
	{
		case 1:
				tagwait(5);
				tagwait(46);
				Polyobj_DoorSlide(3,64,0,64,64);
				Polyobj_DoorSlide(4,64,0,64,64);
				break;
		case 2:
				tagwait(5);
				tagwait(46);
				Polyobj_DoorSlide(5,64,0,64,64);
				Polyobj_DoorSlide(6,64,0,64,64);
				break;
		case 3:
				tagwait(5);
				tagwait(46);
				Polyobj_DoorSlide(7,64,0,64,64);
				Polyobj_DoorSlide(8,64,0,64,64);
				break;
		case 4:
				tagwait(5);
				tagwait(46);
				Polyobj_DoorSlide(9,64,0,64,64);
				Polyobj_DoorSlide(10,64,0,64,64);
				break;
		default:
				tagwait(5);
				tagwait(46);
				Polyobj_DoorSlide(3,64,0,64,64);
				Polyobj_DoorSlide(4,64,0,64,64);
				break;
	}
}

//use elevator lift
SCRIPT 06 (int floor)
{
	polywait(3);
	polywait(4);
	polywait(5);
	polywait(6);
	polywait(7);
	polywait(8);
	polywait(9);
	polywait(10);
	tagwait(5);
	tagwait(46);
	
	//TeleportInSector (tag, source_tid, dest_tid, fog?, group_tid)
	switch(floor)
	{
		case 1:
				Floor_MoveToValue(5, 16, 256, 1);
				Ceiling_MoveToValue(5, 16, 184, 1);
				Floor_MoveToValue(46, 16, 224, 1);
				Ceiling_MoveToValue(46, 16, 192, 1);
				Floor_MoveToValue(47, 16, 256, 1);
				Ceiling_MoveToValue(47, 16, 184, 1);
				Floor_MoveToValue(48, 16, 224, 1);
				Ceiling_MoveToValue(48, 16, 192, 1);
				Floor_MoveToValue(49, 16, 256, 1);
				Ceiling_MoveToValue(49, 16, 184, 1);
				Floor_MoveToValue(50, 16, 224, 1);
				Ceiling_MoveToValue(50, 16, 192, 1);
				Floor_MoveToValue(51, 16, 256, 1);
				Ceiling_MoveToValue(51, 16, 184, 1);
				Floor_MoveToValue(52, 16, 224, 1);
				Ceiling_MoveToValue(52, 16, 192, 1);
				tagwait(5);
				tagwait(46);
				tagwait(47);
				tagwait(48);
				tagwait(49);
				tagwait(50);
				tagwait(51);
				tagwait(52);
				delay(4);
				TeleportInSector(5, 5, 5, 0, 0);
				TeleportInSector(47, 6, 5, 0, 0);
				TeleportInSector(49, 7, 5, 0, 0);
				TeleportInSector(51, 8, 5, 0, 0);
				Polyobj_DoorSlide(3,64,0,64,64);
				Polyobj_DoorSlide(4,64,0,64,64);
				break;
		case 2:
				Floor_MoveToValue(5, 16, 512, 1);
				Ceiling_MoveToValue(5, 16, 440, 1);
				Floor_MoveToValue(46, 16, 480, 1);
				Ceiling_MoveToValue(46, 16, 448, 1);
				Floor_MoveToValue(47, 16, 512, 1);
				Ceiling_MoveToValue(47, 16, 440, 1);
				Floor_MoveToValue(48, 16, 480, 1);
				Ceiling_MoveToValue(48, 16, 448, 1);
				Floor_MoveToValue(49, 16, 512, 1);
				Ceiling_MoveToValue(49, 16, 440, 1);
				Floor_MoveToValue(50, 16, 480, 1);
				Ceiling_MoveToValue(50, 16, 448, 1);
				Floor_MoveToValue(51, 16, 512, 1);
				Ceiling_MoveToValue(51, 16, 440, 1);
				Floor_MoveToValue(52, 16, 480, 1);
				Ceiling_MoveToValue(52, 16, 448, 1);
				tagwait(5);
				tagwait(46);
				tagwait(47);
				tagwait(48);
				tagwait(49);
				tagwait(50);
				tagwait(51);
				tagwait(52);
				delay(4);
				TeleportInSector(5, 5, 6, 0, 0);
				TeleportInSector(47, 6, 6, 0, 0);
				TeleportInSector(49, 7, 6, 0, 0);
				TeleportInSector(51, 8, 6, 0, 0);
				Polyobj_DoorSlide(5,64,0,64,64);
				Polyobj_DoorSlide(6,64,0,64,64);
				break;
		case 3:
				Floor_MoveToValue(5, 16, 768, 1);
				Ceiling_MoveToValue(5, 16, 696, 1);
				Floor_MoveToValue(46, 16, 736, 1);
				Ceiling_MoveToValue(46, 16, 704, 1);
				Floor_MoveToValue(47, 16, 768, 1);
				Ceiling_MoveToValue(47, 16, 696, 1);
				Floor_MoveToValue(48, 16, 736, 1);
				Ceiling_MoveToValue(48, 16, 704, 1);
				Floor_MoveToValue(49, 16, 768, 1);
				Ceiling_MoveToValue(49, 16, 696, 1);
				Floor_MoveToValue(50, 16, 736, 1);
				Ceiling_MoveToValue(50, 16, 704, 1);
				Floor_MoveToValue(51, 16, 768, 1);
				Ceiling_MoveToValue(51, 16, 696, 1);
				Floor_MoveToValue(52, 16, 736, 1);
				Ceiling_MoveToValue(52, 16, 704, 1);
				tagwait(5);
				tagwait(46);
				tagwait(47);
				tagwait(48);
				tagwait(49);
				tagwait(50);
				tagwait(51);
				tagwait(52);
				delay(4);
				TeleportInSector(5, 5, 7, 0, 0);
				TeleportInSector(47, 6, 7, 0, 0);
				TeleportInSector(49, 7, 7, 0, 0);
				TeleportInSector(51, 8, 7, 0, 0);
				Polyobj_DoorSlide(7,64,0,64,64);
				Polyobj_DoorSlide(8,64,0,64,64);
				break;
		case 4:
				Floor_MoveToValue(5, 16, 1024, 1);
				Ceiling_MoveToValue(5, 16, 952, 1);
				Floor_MoveToValue(46, 16, 992, 1);
				Ceiling_MoveToValue(46, 16, 960, 1);
				Floor_MoveToValue(47, 16, 1024, 1);
				Ceiling_MoveToValue(47, 16, 952, 1);
				Floor_MoveToValue(48, 16, 992, 1);
				Ceiling_MoveToValue(48, 16, 960, 1);
				Floor_MoveToValue(49, 16, 1024, 1);
				Ceiling_MoveToValue(49, 16, 952, 1);
				Floor_MoveToValue(50, 16, 992, 1);
				Ceiling_MoveToValue(50, 16, 960, 1);
				Floor_MoveToValue(51, 16, 1024, 1);
				Ceiling_MoveToValue(51, 16, 952, 1);
				Floor_MoveToValue(52, 16, 992, 1);
				Ceiling_MoveToValue(52, 16, 960, 1);
				tagwait(5);
				tagwait(46);
				tagwait(47);
				tagwait(48);
				tagwait(49);
				tagwait(50);
				tagwait(51);
				tagwait(52);
				delay(4);
				TeleportInSector(5, 5, 8, 0, 0);
				TeleportInSector(47, 6, 8, 0, 0);
				TeleportInSector(49, 7, 8, 0, 0);
				TeleportInSector(51, 8, 8, 0, 0);
				Polyobj_DoorSlide(9,64,0,64,64);
				Polyobj_DoorSlide(10,64,0,64,64);
				break;
		default:
				Floor_MoveToValue(5, 16, 256, 1);
				Ceiling_MoveToValue(5, 16, 184, 1);
				Floor_MoveToValue(46, 16, 224, 1);
				Ceiling_MoveToValue(46, 16, 192, 1);
				Floor_MoveToValue(47, 16, 256, 1);
				Ceiling_MoveToValue(47, 16, 184, 1);
				Floor_MoveToValue(48, 16, 224, 1);
				Ceiling_MoveToValue(48, 16, 192, 1);
				Floor_MoveToValue(49, 16, 256, 1);
				Ceiling_MoveToValue(49, 16, 184, 1);
				Floor_MoveToValue(50, 16, 224, 1);
				Ceiling_MoveToValue(50, 16, 192, 1);
				Floor_MoveToValue(51, 16, 256, 1);
				Ceiling_MoveToValue(51, 16, 184, 1);
				Floor_MoveToValue(52, 16, 224, 1);
				Ceiling_MoveToValue(52, 16, 192, 1);
				tagwait(5);
				tagwait(46);
				tagwait(47);
				tagwait(48);
				tagwait(49);
				tagwait(50);
				tagwait(51);
				tagwait(52);
				delay(4);
				TeleportInSector(5, 5, 5, 0, 0);
				TeleportInSector(47, 6, 5, 0, 0);
				TeleportInSector(49, 7, 5, 0, 0);
				TeleportInSector(51, 8, 5, 0, 0);
				Polyobj_DoorSlide(3,64,0,64,64);
				Polyobj_DoorSlide(4,64,0,64,64);
				break;
	}
}

//read kids only sign
SCRIPT 07 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 SetFont("BILFONT");
 setPlainMsgText("KIDS ONLY!","BILFONT",HUDMSG_PLAIN, CR_TAN);
 setPlainMsgBox();
 
 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();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//read blow up the world button message
SCRIPT 08 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 SetFont("BILFONT");
 setPlainMsgText("BLOW UP THE WORLD BUTTON:\n\nDO NOT PRESS!","BILFONT",HUDMSG_PLAIN, CR_RED);
 setPlainMsgBox();
 
 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();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//Sif's first speech
SCRIPT 09 (VOID)
{
 
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 SetFont("BILFONT");
 switch (sif)
 {
 case 0:
		setPlainMsgText("DUST DUST, CLEAN CLEAN.\nWHAT ARE YOU BACTERIA-RIDDLED ORGANISMS DOING IN THE LAB? *BZZT!*\nMY HUSBAND CAN'T GET ANY WORK DONE WITH YOUR FEET\nPATTERING ALL OVER THE FLOOR ABOVE HIM! *CLANK!* *WHIRR!*","BILFONT",HUDMSG_PLAIN, CR_TAN);
		sif = 1;
		break;
 case 1:
		setPlainMsgText("DUST DUST, CLEAN CLEAN.\nA CLEAN LAB IS A HAPPY LAB! *PING!*","BILFONT",HUDMSG_PLAIN, CR_TAN);
		break;
 default:
		setPlainMsgText("DUST DUST, CLEAN CLEAN.\nA CLEAN LAB IS A HAPPY LAB! *PING!*","BILFONT",HUDMSG_PLAIN, CR_TAN);
		break;
 }
 setPlainMsgBox();
 
 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();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//Specific's first speech
SCRIPT 10 (VOID)
{
 str classFace = "SQAR";
 LocalAmbientSound("misc/chat", 127);
 switch (PlayerClass(PlayerNumber()))
 {
 	case CLASS_ADULT_MALE_AKHET :
		classFace = "SQAR";
		break;
	case CLASS_ADULT_FEMALE_AKHET :
		classFace = "SINE";
		break;
	default:
		classFace = "SQAR";
		break;
 } 
 
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Portrait("...Hmm... if I add some of this stuff\nto this thingy, it will cause a reaction that will...","BILFONT","SPECIFIC",0,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_Portrait("OH, MY!\nHello.","BILFONT","SPECIFIC",0,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_Portrait("Are you Dr. Specific?","BILFONT",classFace,0,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_Portrait("That's me, alright!\nI'm doing research on this planet's agricultural properties.\nThe diverse tolerance to alien plantlife in the soil is quite fascinating.\nThe fruit I brought from Midgard sprouted up with no delay!","BILFONT","SPECIFIC",0,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);
 switch (PlayerClass(PlayerNumber()))
 {
 	case CLASS_ADULT_MALE_AKHET :
		messageBox_Portrait("Oh yeah!\nThere are date trees in my home that came straight from Akhet!","BILFONT",classFace,0,CR_TAN);
		break;
	case CLASS_ADULT_FEMALE_AKHET :
		messageBox_Portrait("Uhhh....","BILFONT",classFace,0,CR_TAN);
		break;
	default:
		messageBox_Portrait("Uhhh....","BILFONT",classFace,0,CR_TAN);
		break;
 } 
 
 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_Portrait("Hmmm...\nHmmm...\nHMMMMM.","BILFONT","SPECIFIC",0,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);
 switch (PlayerClass(PlayerNumber()))
 {
 	case CLASS_ADULT_MALE_AKHET :
		messageBox_Portrait("...\n...Okay...\n...Why are you looking at me so funny?","BILFONT",classFace,0,CR_TAN);
		break;
	case CLASS_ADULT_FEMALE_AKHET :
		messageBox_Portrait("Keep your eyes to yourself old man.\nI don't go for the gray haired wrinkly type.","BILFONT",classFace,0,CR_TAN);
		break;
	default:
		messageBox_Portrait("...\n...Okay...\n...Why are you looking at me so funny?","BILFONT",classFace,0,CR_TAN);
		break;
 } 
 
 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_Portrait("Oh, sorry.  I can't help myself.\nYou are a member of the Akhet race that migrated here 49 years ago,\nyes?  I've never seen one before, I just have to observe you.","BILFONT","SPECIFIC",0,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_Portrait("You must be the demigod Crepe told me about.","BILFONT","SPECIFIC",0,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_Portrait("Crepe talked to you, too?\nSo you know about the breadmonsters that are coming here?","BILFONT",classFace,0,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_Portrait("That's right.\nI saw a space-flying thingy on my look-a-ma-doodad.\nThis isn't good.  After their long battle with the gorgons,\nthey must be desperate for land.","BILFONT","SPECIFIC",0,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_Portrait("Crepe told us to come find you if we wanted to go to the underworld.\nBut I have no idea why.\nWhat can you do to help?","BILFONT",classFace,0,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_Portrait("Hmm...\nWell, I can provide a shortcut via one of my inventions,\nthe Whatsit-mac-bobner v.2.048!\nIt lets you teleport to great distances!","BILFONT","SPECIFIC",0,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_Portrait("But the device is currently non-functional.\nBefore I can fix it, I'll need you to retrieve\nsome stuff.","BILFONT","SPECIFIC",0,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_Portrait("You can find them all around the mountain.\nOne is a thingy you can find in the lake to the south.\nThere is another thingy in the purple caves.\n2 more things are somewhere in the northern cliffs.","BILFONT","SPECIFIC",0,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_Portrait("One thing I need is in the lab downstairs.\nI've been doing gravitational experiments, so jumping\nmight be more difficult than you're used to.\nOh, and some of my robot thingies are going haywire.\nWatch out for them.","BILFONT","SPECIFIC",0,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_Portrait("Those valkyries in the hall up north have the last thing I need.\nThey keep me up all day with their frivolous banter!\nJust once I'd like a good few hours after working all night.\nI can't possibly face them, I'm sorry to make you handle it.","BILFONT","SPECIFIC",0,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_Portrait("Umm..... thingies?","BILFONT",classFace,0,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_Portrait("YES!\n Not just things, but STUFF too!","BILFONT","SPECIFIC",0,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_Portrait("How am I supposed to know what they look like?","BILFONT",classFace,0,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_Portrait("Oh, you'll know them when you see them.\nThey ARE macguffins, after all.","BILFONT","SPECIFIC",0,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_Portrait("One last thing:\nCan I ask you for a blood sample?","BILFONT","SPECIFIC",0,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_Portrait("Excuse me?","BILFONT",classFace,0,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_Portrait("I want to study the mechanics of how your\ngoddess-enchanted body works, if you don't mind.","BILFONT","SPECIFIC",0,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_Portrait("...\n*BZZZT!*\n...","BILFONT","SPECIFIC",0,CR_TAN);
 
 ok = false;
 delay(8);
 while (ok == false)
 {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
 }
 messageBox_Clear();
 
 Spawn("ChemicalYellow",GetActorX(72),GetActorY(72),GetActorFloorZ(72));
 
 LocalAmbientSound("menu/change", 127);
 messageBox_Portrait("Ah, a god's blood really is gold.\nThis is so intriguing.\nOkay, I'm done.  You can go find\nmy thingies now!","BILFONT","SPECIFIC",0,CR_TAN);
 
 ok = false;
 delay(8);
 while (ok == false)
 {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
 }
 messageBox_Clear();

 //end dialogue
 Thing_SetSpecial(67,80,12,0,0);	//change Dr.Specific's script
 Thing_SetSpecial(60,80,20,0,0);	//change Fehu's script
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//remove a forcefield
SCRIPT 11 (VOID)
{
	SetLineBlocking(2, BLOCK_NOTHING);
	SetLineTexture(2, SIDE_FRONT, TEXTURE_MIDDLE, "-");
	suspend;
	Door_Open(71,16);
}

//Dr. Specific's second speech
SCRIPT 12 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Portrait("Do you have the thingies I need?\n\n...","BILFONT","SPECIFIC",0,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);
 }
 
 if (CheckInventory("Knife") > 0 && CheckInventory("Mayonaise") > 0 && CheckInventory("Lettuce") > 0 && CheckInventory("Bread") > 0 && CheckInventory("TechnoChip") > 0 && CheckInventory("GoatLegUsable") > 0)
 {
	 LocalAmbientSound("FANFARE", 127);
	 messageBox_Portrait("OH JA!","BILFONT","SPECIFIC",0,CR_TAN);
	 
	 takeInventory("Knife",1);
	 takeInventory("Mayonaise",1);
	 takeInventory("Lettuce",1);
	 takeInventory("Bread",1);
	 takeInventory("TechnoChip",1);
	 takeInventory("GoatLegUsable",1);
	 delay(32);
	 
	 LocalAmbientSound("menu/change", 127);
	 messageBox_Portrait("This butterknife, mayonaise, lettuce, bread, and goat meat\nyou brought me will make an excellent lunch!\nYou even found the computer chip I need to fix the bread toaster!","BILFONT","SPECIFIC",0,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_Portrait("Okay, now to get the teleporty-thingy online....","BILFONT","SPECIFIC",0,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_Portrait("Normally it would work, but it's missing\none vital component:\nA Warp Owl.","BILFONT","SPECIFIC",0,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_Portrait("Warp owls are bird thingies with the power\nto teleport great distances at will.\nIt is becaue of these animals that we now have\ninter-galactic travel.","BILFONT","SPECIFIC",0,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_Portrait("If my research is valid, there should be\nsome warp owls living on this mountain.\nThey're active at night, so now's the perfect time\nto find one.","BILFONT","SPECIFIC",0,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_Portrait("Go find one and bring it back here.\nYou can insert it into the slot downstairs\nto activate my thingy.\n","BILFONT","SPECIFIC",0,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_Portrait("At it's current settings, the teleporty\nthing should take you to gorgon island,\nwhich is perfect.  The people there\nknow secrets about this planet to find\nyou a path to the underworld.","BILFONT","SPECIFIC",0,CR_TAN);
	 
	 ok = false;
	 delay(8);
	 while (ok == false)
	 {
		buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		   ok = true;
		delay(1);
	 }
	 messageBox_Clear();
	 
	 Thing_Spawn(68, T_OWL, 0, 71);
	 owlsGame = 1;
	 Thing_SetSpecial(67,80,13,0,0);	//change Dr.Specific's script
 }
 
 else
 {
	 LocalAmbientSound("menu/change", 127);
	 messageBox_Portrait("No, there are still some thingies out there\nyou need to find for me before I can\nbegin working.","BILFONT","SPECIFIC",0,CR_TAN);
	 
	 ok = false;
	 delay(8);
	 while (ok == false)
	 {
		buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		   ok = true;
		delay(1);
	 }
	 messageBox_Clear();
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

//Dr. Specific's final speech
SCRIPT 13 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,1,PROP_INVULNERABILITY);
 LocalAmbientSound("misc/chat", 127);

 int buttons;
 bool ok = false;
 messageBox_Portrait("I have examined your blood sample, and what I found\nis astonishing.  It's properties are...","BILFONT","SPECIFIC",0,CR_TAN);
	 
	 
	 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_Portrait("Impossible!  It cannot exist!\nYet here it is.\nThis truly is the power of the gods.","BILFONT","SPECIFIC",0,CR_TAN);
 
 ok = false;
 delay(8);
 while (ok == false)
 {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
 }

 LocalAmbientSound("menu/change", 127);
 messageBox_Portrait("The teleporter needs a creature called a warp owl\nfor it's final component.  It may not get you\ndirectly to the underworld, but the people on Gorgon Island know a bit\nabout underground passages, they should help you.\nGood luck!","BILFONT","SPECIFIC",0,CR_TAN);
 
 ok = false;
 delay(8);
 while (ok == false)
 {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
 //SetPlayerProperty(0,0,PROP_INVULNERABILITY);
}

/********************/
//THE VALKYRIES******/
/********************/
/*PART 1*************/
/********************/

//Fehu's first speech
SCRIPT 14 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("This is valkyrie team Futhark!\nWould you like a drink?","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("If you're looking for the Midgardian scientist,\nhe's in a labratory south of here.\nWe're his bodyguards, preventing his research\nfrom falling into the wrong hands.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Uruz's first speech
SCRIPT 15 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("We're all Valkyries from Asgard,\na plane above planet Midgard.\nBut one of us is only half valkyrie....","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Thurisaz's first speech
SCRIPT 16 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("......","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Ansaz's first speech
SCRIPT 17 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Do you think my wings are pretty?","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Raidho's first speech
SCRIPT 18 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("The milk from the female 'bananasauros'\ncreatures of this planet is delicious!","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Kenaz's first speech
SCRIPT 19 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("We're valkyrie team Futhark!\nWe explore the multiverse with Dr. Specific\nlooking for new things to discover.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

/********************/
//THE VALKYRIES******/
/********************/
/*PART 2*************/
/********************/

//Fehu asks for name
SCRIPT 20 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 
 str classFace = "SQAR";
 switch (PlayerClass(PlayerNumber()))
 {
 	case CLASS_ADULT_MALE_AKHET :
		classFace = "SQAR";
		break;
	case CLASS_ADULT_FEMALE_AKHET :
		classFace = "SINE";
		break;
	default:
		classFace = "SQAR";
		break;
 } 
 
 int buttons;
 bool ok = false;
	 
 if(valkTest == 0)
 {
	 messageBox_Portrait("Umm... excuse me.\nDo you have a 'thing' that Dr. Specific wants?","BILFONT",classFace,0,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);
	 ok = false;
	 messageBox_Plain("Urrrg!  That Dr. Specific keeps us up with his\nnoise all night, then he has the gall to ask\nus for some of our greatest prize!","BILFONT",HUDMSG_PLAIN, CR_TAN);
	 delay(8);
	 while (ok == false)
	 {
		buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		   ok = true;
		delay(1);
	 }
	 
	 LocalAmbientSound("menu/change", 127);
	 ok = false;
	 messageBox_Plain("Okay, okay, I got it.","BILFONT",HUDMSG_PLAIN, CR_TAN);
	 delay(8);
	 while (ok == false)
	 {
		buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		   ok = true;
		delay(1);
	 }
	 
	 LocalAmbientSound("menu/change", 127);
	 
	 Thing_SetSpecial(61,80,21,0,0);	//change Uruz's script
	 Thing_SetSpecial(62,80,22,0,0);	//change Thurisaz's script
	 Thing_SetSpecial(63,80,23,0,0);	//change Ansaz's script
	 Thing_SetSpecial(64,80,24,0,0);	//change Raidho's script
	 Thing_SetSpecial(65,80,25,0,0);	//change Kenaz's script
	 valkTest = 1;
 }

 /*
 ok = false;
 delay(8);
 while (ok == false)
 {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
       ok = true;
    delay(1);
 }
 */
 
 ok = false;
	 delay(8);
	 messageBox_Plain("If you can guess all of our names\n-That's each and EVERY one of us -\nI'll let you have it.","BILFONT",HUDMSG_PLAIN, CR_TAN);
	 delay(8);
	 while (ok == false)
	 {
		buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		   ok = true;
		delay(1);
	 }
	 
 ACS_EXECUTE(32,0,0,0,0);
 scriptWait(32);
 
 if(valkNames[0] == true)
 {
	
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Well, I'm so flattered to hear my fame precedes me!\nYes, I am Fehu, leader of team Futhark!","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);
	}
	Thing_SetSpecial(60,80,26,0,0);	//change Fehu's script
 }
 
 else if(valkNames[0] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Nice try, but that's not my name!","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Uruz asks for name
SCRIPT 21 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("I'd like to just tell you my name,\nbut orders are orders....","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);
 }
 
 ACS_EXECUTE(32,0,1,0,0);
 scriptWait(32);
 
 if(valkNames[1] == true)
 {
	
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Yeah, that's right!  How did you know?","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);
	}
	Thing_SetSpecial(61,80,27,0,0);	//change script
 }
 
 else if(valkNames[1] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Nope, that's not my name.","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Thurisaz asks for name
SCRIPT 22 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("...","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);
 }
 
 ACS_EXECUTE(32,0,2,0,0);
 scriptWait(32);
 
 if(valkNames[2] == true)
 {
	
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("... Yes...\n...that's right.","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);
	}
	Thing_SetSpecial(62,80,28,0,0);	//change script
 }
 
 else if(valkNames[2] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("... That's not my name.","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Ansaz asks for name
SCRIPT 23 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("I put in a lot of time and work\nbrushing my plumage.  Oh?\nYou want to guess my name?","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);
 }
 
 ACS_EXECUTE(32,0,3,0,0);
 scriptWait(32);
 
 if(valkNames[3] == true)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Oh, you love my wings so much you\ntook the time to learn my name is\nAnsaz!  Nice job!","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);
	}
	Thing_SetSpecial(63,80,29,0,0);	//change script
 }
 
 else if(valkNames[3] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Hmph!\nThat's not my name!\nHow insulting!","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Raidho asks for name
SCRIPT 24 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Haha!\nI can't believe Fe... I MEAN... our LEADER\nis making you guess our names!  If you don't\nknow the runes, you'll never figure it out!\nOops!  That wasn't a hint or anything.","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);
 }
 
 ACS_EXECUTE(32,0,4,0,0);
 scriptWait(32);
 
 if(valkNames[4] == true)
 {
	
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Wow, you're smarter than I thought.\nThat's my name alright!","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);
	}
	Thing_SetSpecial(64,80,30,0,0);	//change script
 }
 
 else if(valkNames[4] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Heheh, this test is too tough for you.\nThat isn't even close to my name!","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Kenaz asks for name
SCRIPT 25 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Well?  Do you want to try?","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);
 }
 
 ACS_EXECUTE(32,0,5,0,0);
 scriptWait(32);
 
 if(valkNames[5] == true)
 {
	
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("Yes, that's my name.\nI hope you get the others right, too.\nThis thing we have is meant to be shared!","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);
	}
	Thing_SetSpecial(65,80,31,0,0);	//change script
 }
 
 else if(valkNames[5] == false)
 {
	LocalAmbientSound("menu/change", 127);
	messageBox_Plain("I'm sorry.  You didn't get it...","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);
	}
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

/********************/
//THE VALKYRIES******/
/********************/
/*END****************/
/********************/

//Fehu's last speech
SCRIPT 26 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 
 int buttons;
 bool ok = false;
 
 if(valkNames[0] == true && valkNames[1] == true && valkNames[2] == true && valkNames[3] == true && valkNames[4] == true && valkNames[5] == true && valkTest == 1)
 {
	messageBox_Plain("Okay, you win.\nYou can have a piece of our greatest possession.","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);
	}
	
	LocalAmbientSound("FANFARE", 127);
	messageBox_Plain("GOT A GOAT LEG!","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);
	}
	
	GiveInventory("GoatLegUsable", 1);
	valkTest = 2;
	LocalAmbientSound("menu/change", 127);
 }

 messageBox_Plain("We'll be leaving this planet soon to explore\nmore of the multiverse.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Uruz's last speech
SCRIPT 27 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Fehu is the oldest and she's our leader,\nbut Thurisaz is the strongest of us all.\nI know she's quiet, but she's my best friend.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Thurisaz's last speech
SCRIPT 28 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("......","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Ansaz's last speech
SCRIPT 29 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("My wings are gorgeous, right?","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Raidho's last speech
SCRIPT 30(VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Maybe I misjudged you.\nYou're pretty cool for a human.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Kenaz's last speech
SCRIPT 31 (VOID)
{
 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
 LocalAmbientSound("misc/chat", 127);
 messageBox_Plain("Good luck.\nI hope you find what you're looking for.","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);
 }
  
 //end dialogue
 messageBox_Clear();
 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//Valkyrie name selection
SCRIPT 32 (int valkNum) // Hippo analysis #1-7
{
  int buttons;
  bool ok = false;
  bool answer = true;
  int nameSelection = 1;
  SetPlayerProperty(0,1,PROP_TOTALLYFROZEN); 
  
  SetFont("BILFONT");
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFEHU"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n                      Kenaz\nUruz\nThurisaz\nAnsaz\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
  
  delay(8);
  while (ok == false)
  {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
	{
	   //LocalAmbientSound("menu/change", 127);
       ok = true;
	}
	if (buttons & BT_BACK)
	{
	   LocalAmbientSound("menu/change", 127);
	   messageBox_Clear();
	   
	   nameSelection++;
	   if(nameSelection > 6)
			nameSelection = 1;
	}
	if (buttons & BT_FORWARD)
	{
       LocalAmbientSound("menu/change", 127);
       messageBox_Clear();
	   
	   nameSelection--;
	   if(nameSelection < 1)
			nameSelection = 6;
	}

	switch(nameSelection)
	{
	case 1:
			   if(valkNum == 0)
					answer = true;
			   else if(valkNum != 0)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFEHU"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n                      Kenaz\nUruz\nThurisaz\nAnsaz\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	case 2:
			   if(valkNum == 1)
					answer = true;
			   else if(valkNum != 1)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\nURUZ"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFehu                Kenaz\n\nThurisaz\nAnsaz\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	case 3:
			   if(valkNum == 2)
					answer = true;
			   else if(valkNum != 2)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\nTHURISAZ"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFehu                Kenaz\nUruz\n\nAnsaz\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	case 4:
			   if(valkNum == 3)
					answer = true;
			   else if(valkNum != 3)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\nANSAZ"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFehu                Kenaz\nUruz\nThurisaz\n\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	case 5:
			   if(valkNum == 4)
					answer = true;
			   else if(valkNum != 4)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\n\nRAIDHO"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFehu                Kenaz\nUruz\nThurisaz\nAnsaz"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	case 6:
			   if(valkNum == 5)
					answer = true;
			   else if(valkNum != 5)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n                      KENAZ"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFehu\nUruz\nThurisaz\nAnsaz\nRaidho"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	default:
			   if(valkNum == 0)
					answer = true;
			   else if(valkNum != 0)
					answer = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"What is my name?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\nFEHU"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n                      Kenaz\nUruz\nThurisaz\nAnsaz\nRaidho\nKenaz"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			   break;
	}
	   
    delay(4);
  }
  
  if (answer == true)
	valkNames[valkNum] = true;
  else if (answer == false)
	valkNames[valkNum] = false;
	
	//end dialogue
	messageBox_Clear();
	//SetPlayerProperty(0,0,PROP_TOTALLYFROZEN); 
}

//Warp owl warps away from player a couple times
//when it appears
SCRIPT 33 ENTER
{
	while(TRUE)
	{
		if (GetActorX(0) >= (GetActorX(71) - 128.0) && GetActorX(0) <= (GetActorX(71) + 128.0) &&
			GetActorY(0) >= (GetActorY(71) - 128.0) && GetActorY(0) <= (GetActorY(71) + 128.0) &&
			GetActorZ(0) >= (GetActorZ(71) - 128.0) && GetActorZ(0) <= (GetActorZ(71) + 128.0))
		{
			switch(owlsGame)
			{
				case 1:
						TeleportOther (71, 69, 1);
						owlsGame = 2;
						break;
				case 2:
						TeleportOther (71, 70, 1);
						owlsGame = 3;
						break;
				case 3:
						TeleportOther (71, 68, 1);
						owlsGame = 4;
						break;
				default:
						break;
			}
		}
		delay(1);
	}
}

//Warp owl component.
SCRIPT 34 (VOID)
{
	if(CheckInventory("WarpOwl") > 0)
	{
		AmbientSound("HOOT",127);
		takeInventory("WarpOwl",1);
		SetLineTexture(4, SIDE_FRONT, TEXTURE_MIDDLE, "SWIOWL2");
		SetLineTexture(2, SIDE_FRONT, TEXTURE_MIDDLE, "HPORTA01");
		setLineSpecial(2,Exit_Normal,0);
	}
	
	else if(CheckInventory("WarpOwl") == 0)
	{
		print(s:"Looks like something's missing here...");
		delay(128);
		print(s:"");
	}
}

//player goes into an inner conflict with pressing the blow up the world button.
SCRIPT 35 (VOID)
{
	 bool press = true;
	 SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
	 LocalAmbientSound("misc/chat", 127);
	 
	 int buttons;
	 bool ok = false;
	 
	 SetFont("BILFONT");
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"Will you press it?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
  
  ok = false;
  delay(8);
  while (ok == false)
  {
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
    if (buttons & BT_USE)
	{
	   LocalAmbientSound("menu/change", 127);
       ok = true;
	}
	if (buttons & BT_LEFT)
	{
	   LocalAmbientSound("menu/change", 127);
       press = true;
	   messageBox_Clear();
	   SetFont("BILFONT");
	   HudMessage(s:"Will you press it?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
	   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
	   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
	   setPlainMsgBox();
	}
	if (buttons & BT_RIGHT)
	{
	   LocalAmbientSound("menu/change", 127);
       press = false;
	   messageBox_Clear();
	   SetFont("BILFONT");
	   HudMessage(s:"Will you press it?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
	   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
	   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
	   setPlainMsgBox();
	}
    delay(4);
  }
  
  if (press == true)
  {
      bool press2 = true;
	  ok = false;
	  
	  SetFont("BILFONT");
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"Are you sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
		
	  delay(8);
	  while (ok == false)
	  {
	    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
		if (buttons & BT_USE)
		{
		   LocalAmbientSound("menu/change", 127);
		   ok = true;
		}
		if (buttons & BT_LEFT)
		{
		   LocalAmbientSound("menu/change", 127);
		   press2 = true;
		   messageBox_Clear();
		   SetFont("BILFONT");
		   HudMessage(s:"Are you sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
		   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
		   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
		   setPlainMsgBox();
		}
		if (buttons & BT_RIGHT)
		{
		   LocalAmbientSound("menu/change", 127);
		   press2 = false;
		   messageBox_Clear();
		   SetFont("BILFONT");
		   HudMessage(s:"Are you sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
		   HudMessage(s:"\n\n\n\nYes"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
		   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
		   setPlainMsgBox();
		}
		delay(4);
	  }
	  
	  if (press2 == true)
	  {
		  bool press3 = true;
		  ok = false;
		  
		  SetFont("BILFONT");
				   messageBox_Clear();
				   SetFont("BILFONT");
				   HudMessage(s:"Are you really, REALLY sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\nYES!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
				   setPlainMsgBox();
				   
		  delay(8);
		  while (ok == false)
		  {
			buttons = GetPlayerInput(-1, INPUT_BUTTONS);
			if (buttons & BT_USE)
			{
			   LocalAmbientSound("menu/change", 127);
			   ok = true;
			}
			if (buttons & BT_LEFT)
			{
			   LocalAmbientSound("menu/change", 127);
			   press3 = true;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"Are you really, REALLY sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\nYES!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
			   setPlainMsgBox();
			}
			if (buttons & BT_RIGHT)
			{
			   LocalAmbientSound("menu/change", 127);
			   press3 = false;
			   messageBox_Clear();
			   SetFont("BILFONT");
			   HudMessage(s:"Are you really, REALLY sure?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\nYES!"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
			   HudMessage(s:"\n\n\n\n                      No"; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
			   setPlainMsgBox();
			}
			delay(4);
		  }
		  
		  if (press3 == true)
		  {
			  bool press4 = true;
			  ok = false;
			  
			  SetFont("BILFONT");
					   messageBox_Clear();
					   SetFont("BILFONT");
					   HudMessage(s:"You know that if you press this,\neveryone will die."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
					   HudMessage(s:"\n\n\n\nI DON'T CARE!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
					   HudMessage(s:"\n\n\n\n                                      okay."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
					   setPlainMsgBox();
					   
			  delay(8);
			  while (ok == false)
			  {
				buttons = GetPlayerInput(-1, INPUT_BUTTONS);
				if (buttons & BT_USE)
				{
				   LocalAmbientSound("menu/change", 127);
				   ok = true;
				}
				if (buttons & BT_LEFT)
				{
				   LocalAmbientSound("menu/change", 127);
				   press4 = true;
				   messageBox_Clear();
				   SetFont("BILFONT");
				   HudMessage(s:"You know that if you press this,\neveryone will die."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\nI DON'T CARE!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\n                                      Okay."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
				   setPlainMsgBox();
				}
				if (buttons & BT_RIGHT)
				{
				   LocalAmbientSound("menu/change", 127);
				   press4 = false;
				   messageBox_Clear();
				   SetFont("BILFONT");
				   HudMessage(s:"You know that if you press this,\neveryone will die."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\nI DON'T CARE!"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
				   HudMessage(s:"\n\n\n\n                                      Okay."; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
				   setPlainMsgBox();
				}
				delay(4);
			  }
			  
			  if (press4 == true)
			  {
				  bool press5 = true;
				  ok = false;
				  
				  SetFont("BILFONT");
						   messageBox_Clear();
						   SetFont("BILFONT");
						   HudMessage(s:"I'm warning you, don't do it.\nYou'll seriously regret it."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\nPRESS THE BUTTON!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\n                                      Fine."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
						   setPlainMsgBox();
						   
				  delay(8);
				  while (ok == false)
				  {
					buttons = GetPlayerInput(-1, INPUT_BUTTONS);
					if (buttons & BT_USE)
					{
					   LocalAmbientSound("menu/change", 127);
					   ok = true;
					}
					if (buttons & BT_LEFT)
					{
					   LocalAmbientSound("menu/change", 127);
					   press5 = true;
					   messageBox_Clear();
					   SetFont("BILFONT");
					   HudMessage(s:"I'm warning you, don't do it.\nYou'll seriously regret it."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\nPRESS THE BUTTON!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\n                                      Fine."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
					   setPlainMsgBox();
					}
					if (buttons & BT_RIGHT)
					{
					   LocalAmbientSound("menu/change", 127);
					   press5 = false;
					   messageBox_Clear();
					   SetFont("BILFONT");
					   HudMessage(s:"I'm warning you, don't do it.\nYou'll seriously regret it."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\nPRESS THE BUTTON!"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
						   HudMessage(s:"\n\n\n\n                                      Fine."; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
					   setPlainMsgBox();
					}
					delay(4);
				  }
				  
				  if (press5 == true)
				  {
					  bool press6 = true;
					  ok = false;
					  
					  SetFont("BILFONT");
							   messageBox_Clear();
							   SetFont("BILFONT");
							   HudMessage(s:"Didn't you read the sign?  It was clearly marked,\nBLOW UP THE WORLD BUTTON.  DO NOT PRESS."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\nPRESS IT!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\n                                      I give up."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
							   setPlainMsgBox();
							   
					  delay(8);
					  while (ok == false)
					  {
						buttons = GetPlayerInput(-1, INPUT_BUTTONS);
						if (buttons & BT_USE)
						{
						   LocalAmbientSound("menu/change", 127);
						   ok = true;
						}
						if (buttons & BT_LEFT)
						{
						   LocalAmbientSound("menu/change", 127);
						   press6 = true;
						   messageBox_Clear();
						   SetFont("BILFONT");
						   HudMessage(s:"Didn't you read the sign?  It was clearly marked,\nBLOW UP THE WORLD BUTTON.  DO NOT PRESS."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\nPRESS IT!"; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\n                                      I give up."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
						   setPlainMsgBox();
						}
						if (buttons & BT_RIGHT)
						{
						   LocalAmbientSound("menu/change", 127);
						   press6 = false;
						   messageBox_Clear();
						   SetFont("BILFONT");
						   HudMessage(s:"Didn't you read the sign?  It was clearly marked,\nBLOW UP THE WORLD BUTTON.  DO NOT PRESS."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\nPRESS IT!"; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
							   HudMessage(s:"\n\n\n\n                                      I give up."; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
						   setPlainMsgBox();
						}
						delay(4);
					  }
					  
					  if (press6 == true)
					  {
						  bool press7 = true;
						  ok = false;
						  
						  SetFont("BILFONT");
								   messageBox_Clear();
								   SetFont("BILFONT");
								   HudMessage(s:"Okay, maybe it's a lie to hide what the button really does.\nMaybe it won't really destroy the world.  I'm nothing more than\na voice in your head, but do you really want to take that chance?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\nYes."; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\n                                      No."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
								   setPlainMsgBox();
								   
						  delay(8);
						  while (ok == false)
						  {
							buttons = GetPlayerInput(-1, INPUT_BUTTONS);
							if (buttons & BT_USE)
							{
							   LocalAmbientSound("menu/change", 127);
							   ok = true;
							}
							if (buttons & BT_LEFT)
							{
							   LocalAmbientSound("menu/change", 127);
							   press7 = true;
							   messageBox_Clear();
							   SetFont("BILFONT");
							   HudMessage(s:"Okay, maybe it's a lie to hide what the button really does.\nMaybe it won't really destroy the world.  I'm nothing more than\na voice in your head, but do you really want to take that chance?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\nYes."; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\n                                      No."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
							   setPlainMsgBox();
							}
							if (buttons & BT_RIGHT)
							{
							   LocalAmbientSound("menu/change", 127);
							   press7 = false;
							   messageBox_Clear();
							   SetFont("BILFONT");
							   HudMessage(s:"Okay, maybe it's a lie to hide what the button really does.\nMaybe it won't really destroy the world.  I'm nothing more than\na voice in your head, but do you really want to take that chance?"; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\nYes."; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
								   HudMessage(s:"\n\n\n\n                                      No."; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
							   setPlainMsgBox();
							}
							delay(4);
						  }
						  
						  if (press7 == true)
						  {
							  bool press8 = true;
							  ok = false;
							  
							  SetFont("BILFONT");
									   messageBox_Clear();
									   SetFont("BILFONT");
									   HudMessage(s:"This is your last warning."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\nPress the button."; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\n                                      Don't press it."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
									   setPlainMsgBox();
									   
							  delay(8);
							  while (ok == false)
							  {
								buttons = GetPlayerInput(-1, INPUT_BUTTONS);
								if (buttons & BT_USE)
								{
								   LocalAmbientSound("menu/change", 127);
								   ok = true;
								}
								if (buttons & BT_LEFT)
								{
								   LocalAmbientSound("menu/change", 127);
								   press8 = true;
								   messageBox_Clear();
								   SetFont("BILFONT");
								   HudMessage(s:"This is your last warning."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\nPress the button."; HUDMSG_PLAIN, 2, CR_GREEN, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\n                                      Don't press it."; HUDMSG_PLAIN, 3, CR_RED, -0.01, -0.01, 0);
								   setPlainMsgBox();
								}
								if (buttons & BT_RIGHT)
								{
								   LocalAmbientSound("menu/change", 127);
								   press8 = false;
								   messageBox_Clear();
								   SetFont("BILFONT");
								   HudMessage(s:"This is your last warning."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\nPress the button."; HUDMSG_PLAIN, 2, CR_RED, -0.01, -0.01, 0);
									   HudMessage(s:"\n\n\n\n                                      Don't press it."; HUDMSG_PLAIN, 3, CR_GREEN, -0.01, -0.01, 0);
								   setPlainMsgBox();
								}
								delay(4);
							  }
							  
							  if (press8 == true)
							  {
								  ok = false;
								  SetFont("BILFONT");
										   messageBox_Clear();
										   SetFont("BILFONT");
										   HudMessage(s:"Go ahead.  I Dare You."; HUDMSG_PLAIN, 1, CR_TAN, -0.01, -0.01, 0);
										   setPlainMsgBox();
								  delay(8);
								  while (ok == false)
								  {
									buttons = GetPlayerInput(-1, INPUT_BUTTONS);
									if (buttons & BT_USE)
									{
									   LocalAmbientSound("menu/change", 127);
									   ok = true;
									}
									delay(4);
								  }
								  
								  ClearLineSpecial();
								  SetLineSpecial(3,ACS_EXECUTE,36);
								  messageBox_Clear();
								  SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
							  }
							  else if (press8 == false)
							  {
									messageBox_Clear();
									SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
							  }
							  //press5
						  }
						  else if (press7 == false)
						  {
								messageBox_Clear();
								SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
						  }
						  //press6
					  }
					  else if (press6 == false)
					  {
							messageBox_Clear();
							SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
					  }
					  //press6
				  }
				  else if (press5 == false)
				  {
						messageBox_Clear();
						SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
				  }
				  //press5
			  }
			  else if (press4 == false)
			  {
					messageBox_Clear();
					SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
			  }
			  //press4
		  }
		  else if (press3 == false)
		  {
				messageBox_Clear();
				SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
		  }
		  //press3
	  }
	  else if (press2 == false)
	  {
			messageBox_Clear();
			SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
	  }
	  //press2
  }
  else if (press == false)
  {
		messageBox_Clear();
		SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
  }
  //press

	 messageBox_Clear();
	 SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
}

//player presses the blow up the world button.
SCRIPT 36 (VOID)
{
	//scriptWait(37);
	
	messageBox_Clear();
	SetPlayerProperty(1,1,PROP_TOTALLYFROZEN);
	
	delay(16);
	
	SetMusic("");
	SetFont("POTASIUM");
	SetHudSize(320, 200, 0);
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(64);
	
	AmbientSound("GLOBAL_DESTRUCT1", 127);
	
	SetFont("EXPLDPT1");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	SetFont("EXPLDPT2");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	SetFont("EXPLDPT3");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	SetFont("EXPLDPT4");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	AmbientSound("GLOBAL_DESTRUCT2", 127);
	
	SetFont("EXPLDPT5");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	SetFont("EXPLDPT6");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	SetFont("EXPLDPT7");
  	HudMessageBold(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(4);
	
	Thing_Destroy (0, 1);
	Thing_Destroy (1000, 1);
	Thing_Destroy (1001, 1);
	Thing_Destroy (1002, 1);
	Thing_Destroy (1003, 1);
	Thing_Destroy (1004, 1);
	Thing_Destroy (1005, 1);
	Thing_Destroy (1006, 1);
	Thing_Destroy (1007, 1);
}