xxxxxxxxxx
1094
<html>
<head>
<style>
/* Overlays Character on BG. Can alternatively place this in a separate css file at the end, instead of style tags. */
.image-overlay {
position: relative;
top: 0;
left: 0;
}
/* Could have something like top 30px and left 70px if I wanted to offset it. */
.char-image {
position: absolute;
top: 0;
left: 0;
}
.char-image2 {
position: absolute;
top: 0;
left: 0;
}
.bg-image {
position: relative;
top: 0;
left: 0;
}
img {
/* border: 1px solid white;
border-radius: 1em; */
display: block;
margin-left: auto;
margin-right: auto;
width: 100%;
padding: 0px;
min-width: 100px;
}
table#tdChoice {
border: 5px solid gray;
padding-left: 20px;
padding-right: 10px;
text-align: left;
border-radius: 15px;
height:460px;
vertical-align: top;
}
table#tdStory {
padding-left: 50px;
padding-right: 0px;
text-align: left;
vertical-align: top;
}
button.choice {
background: none;
border: none;
font-size: 40px;
color: white;
font-family: monospace;
}
button.choice:hover {
background-color: blue;
}
button.progressCSS {
background: cadetblue;
border: none;
font-size: 40px;
color: white;
font-family: monospace;
text-align: right;
}
button.progressCSS:hover {
background-color: lightgray;
}
body {
background-color: black;
color: white;
font-family: monospace;
font-size: 100%;
align-content: right;
}
think {
color: "#d38787";
}
</style>
</head>
<body>
<!-- Change the locationDiv when he finds out where he is/when he gets to Bushcow's Office -->
<br><h1><div id="locationDiv" align="center">???</div></h1>
<table style="width:95%" cellspacing="1" cellpadding="1" border="0" align="center">
<tr align="center">
<td width="75%" height="67">
<!-- Character/BG Images on the Left -->
<div class="image-overlay">
<img class="bg-image" id="bgID" src="images/BG_Begin.png" />
<img class="char-image" id="charID" src="" />
<img class="char-image2" id="charID2" src="" />
</div>
</td>
<!-- Examine/Talk Buttons on Side -->
<td style="vertical-align: top"><table style="width:100%" id="tdChoice" >
<tr><td>
<button class="choice" onClick="choice1" div id="choice1"></button><br><br>
<button class="choice" onClick="choice2" div id="choice2"></button><br><br>
<button class="choice" onClick="choice3" div id="choice3"></button><br><br>
<button class="choice" onClick="choice4" div id="choice4"></button><br><br>
<h1></h1><br><br>
<h1></h1><br><br>
</td></tr>
</table>
</tr>
</table>
<br>
<table style="width:95%" id="tdStory">
<tr>
<td align=left width="90%" valign="top"><h1><div id="speakerDiv"></div><div id="storyDiv">"It's... so bright..."</div></h1><br></td>
<td align="right" width="5%" valign="top"><br><button h1 class="progressCSS" onClick="progressFunction();buttonpress++" div id="progressDiv"> > </button></td>
</tr>
</table>
<br>
<table style="width:95%">
<tr>
<td>
</td>
<tr><iframe width="95%" height="100" src="https://www.youtube.com/embed/lCmiyOhSc8k?&autoplay=1" frameborder="0" allowfullscreen id="musicPlay"></iframe></tr>
</table>
<!-- JavaScript Begins Here -->
<script>
/* TO DO */
// Remove the "..." after each choice <--- Kinda wishlist... doesn't seem to be a good way
// Could maybe make music work better so you don't have to press the YT button at first <--- Definitely wishlist!!
var buttonpress = 0;
var currentSpeaker = "";
var questioning = false;
var gosigo = 0;
var pubby = 0;
var gair = 0;
var crazy = false;
var firebreath = false;
var bushcow = false;
var adrian = false;
var direction = false;
var straight = false;
var leftDir = false;
var rightDir = false;
// Buttons
var button1 = document.getElementById("choice1");
var button2 = document.getElementById("choice2");
var button3 = document.getElementById("choice3");
var button4 = document.getElementById("choice4");
var b1Click = 0;
var b2Click = 0;
var b3Click = 0;
var b4Click = 0;
var select1 = false;
var select2 = false;
var select3 = false;
var select4 = false;
// Button Functions
button1.onclick = function() { // Right now you have to click through the "..." text. I want to find a way where it auto-plays next part instead.
// Maybe I could use choice1 function instead of button.onclick function??; If statements don't seem to work in here for some reason
b1Click++;
document.getElementById("storyDiv").innerHTML = '...'; // The current ... part that I wanna remove.
//console.log(b1Click);
currentSpeaker = " ";
//straight = true;
select1 = true;
document.getElementById("choice1").innerHTML = "";
document.getElementById("choice2").innerHTML = "";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = " > ";
}
button2.onclick = function() {
b2Click++;
document.getElementById("storyDiv").innerHTML = '...';
//console.log(b2Click);
currentSpeaker = " ";
//leftDir = true;
select2 = true;
document.getElementById("choice1").innerHTML = "";
document.getElementById("choice2").innerHTML = "";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = " > ";
}
button3.onclick = function() {
b3Click++;
document.getElementById("storyDiv").innerHTML = '...';
//console.log(b3Click);
currentSpeaker = " ";
//rightDir = true;
select3 = true;
document.getElementById("choice1").innerHTML = "";
document.getElementById("choice2").innerHTML = "";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = " > ";
}
button4.onclick = function() {
b4Click++;
document.getElementById("storyDiv").innerHTML = '...';
//console.log(b4Click);
currentSpeaker = " ";
select4 = true;
document.getElementById("choice1").innerHTML = "";
document.getElementById("choice2").innerHTML = "";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = " > ";
}
// THE ENTIRE STORY IS HERE!
function progressFunction() {
if (buttonpress == 0) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Where am I?"';
}
if (buttonpress == 1) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = "I can't remember where I was last... I think I was just watching TV... but now I'm in this weird place. I guess I should go somewhere.";
direction = true;
b1Click = 0;
b2Click = 0;
b3Click = 0;
b4Click = 0;
}
// ======================= GOSIGO =======================
if (b1Click == 1 && direction == true && gosigo == 0 && select1 == true && gair < 1 && pubby < 1) {
straight = true;
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = "When I go straight I run into... someone kinda weird looking...";
questioning = true;
button2.disabled = false;
button3.disabled = false;
button4.disabled = false;
select1 = false;
gosigo = 1;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/hf4o7jlfUWg?&autoplay=1";
}
if (gosigo > 0) {
rightDir = false;
leftDir = false;
}
// IF TALK (1st Choice)
if (b1Click == 2 && straight == true && gosigo == 1 && select1 == true) {
currentSpeaker = "gosigo";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"I am... TV!!"';
questioning = false;
gosigo = 2;
} else if (gosigo == 2 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"You are a TV...?"';
gosigo = 3;
} else if (gosigo == 3 && select1 == true) {
currentSpeaker = "gosigo";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"No, I am... Gosigo! But TV is very good."';
gosigo = 4;
} else if (gosigo == 4 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"Oh yeah, I love watching TV! As a matter of fact, I was just watching it before I got here."';
gosigo = 5;
} else if (gosigo == 5 && select1 == true) {
currentSpeaker = "gosigo";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"Then I have good news for you... We happen to be INSIDE of the TV!"';
document.getElementById("locationDiv").innerHTML = "Inside the TV";
gosigo = 6;
} else if (gosigo == 6 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"We' + "'re inside... of the TV!? " + 'But... how did that even happen?"';
gosigo = 7;
} else if (gosigo == 7 && select1 == true) {
currentSpeaker = "gosigo";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"It happens when you watch it... And if you go forward, you can become even more immersed in TV!!"';
gosigo = 8;
select1 = false;
// console.log(b1Click);
}
// If TALK MORE (1st Choice of Talk)
if (b1Click == 3 && straight == true && gosigo == 8 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"Oh... okay... That sounds nice, but can you tell me a little bit more?"';
gosigo = 9;
} else if (b1Click == 3 && straight == true && gosigo == 9 && select1 == true) {
currentSpeaker = "gosigo";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"There is no more. There is either more TV or no more. Make your choice."';
gosigo = 8;
b1Click = 2;
select1 = false;
}
// IF WALK FURTHER (2nd Choice of Talk)
if (b2Click == 1 && straight == true && gosigo == 8 && select2 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"That sounds... really cool!"';
gosigo = 9;
} else if (b2Click == 1 && straight == true && gosigo == 9 && select2 == true) {
currentSpeaker = "gosigo";
var charPic = document.getElementById("charID").src = "images/Gosigo.png";
document.getElementById("storyDiv").innerHTML = '"You won' + "'t regret it, " + 'trust me."';
gosigo = 10;
} else if (b2Click == 1 && straight == true && gosigo == 10 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = 'I decide to continue forward to see what this is like.';
gosigo = 11;
} else if (b2Click == 1 && straight == true && gosigo == 11 && select2 == true) {
var charPic = document.getElementById("charID").src = "images/FirebreathCrazy.png";
var bgPic = document.getElementById("bgID").src = "images/BG_CrazyFirebreath.png";
document.getElementById("storyDiv").innerHTML = "I walk for awhile... But I'm starting to lose track of what's going on...";
gosigo = 12;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/th31DPulh8c?&autoplay=1";
} else if (b2Click == 1 && straight == true && gosigo == 12 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "I... am TV?";
gosigo = 13;
} else if (b2Click == 1 && straight == true && gosigo == 13 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "Yeah, that's right... I can stay here forever...";
gosigo = 14;
} else if (b2Click == 1 && straight == true && gosigo == 14 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "Tee Vee...";
gosigo = 15;
} else if (b2Click == 1 && straight == true && gosigo == 15 && select2 == true) {
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = "THE END.";
document.getElementById("progressDiv").innerHTML = "";
gosigo = 16;
select2 = false;
}
// IF GO BACK (3rd Choice of Talk)
if (b3Click == 1 && straight == true && gosigo == 8 && select3 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = '"Thanks for the offer... but I think I' + "'m gonna go back" + '..."';
gosigo = 9;
} else if (b3Click == 1 && straight == true && gosigo == 9 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = "I decide to go back to where I started. I'm not gonna try going back that way anymore.";
gosigo = 0;
b1Click = 0;
straight = false;
direction = true;
questioning = false;
buttonpress = 1;
button1.disabled = true;
select3 = false;
b3Click = 0;
}
// IF CHECK (2nd Choice)
if (b2Click == 1 && straight == true && gosigo == 1 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = "This kid looks like he fits with the whole atmosphere here. His eyes are really mesmerizing...";
b2Click = 0;
select2 = false;
}
// IF THINK (3rd Choice)
if (b3Click == 1 && straight == true && gosigo == 1 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/GosigoClose.png";
document.getElementById("storyDiv").innerHTML = "I don't know who this is... Maybe he knows where we are though?";
b3Click = 0;
select3 = false;
}
// IF GO BACK (4th Choice)
if (b4Click == 1 && straight == true && gosigo == 1 && select4 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = "I decide to just turn around and go back...";
gosigo = 0;
b4Click = 0;
straight = false;
direction = false;
questioning = false;
buttonpress = 0;
select4 = false;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/lCmiyOhSc8k?&autoplay=1";
}
// ======================= PUBBY =======================
if (b2Click == 1 && direction == true && pubby == 0 && select2 == true && gair < 1 && gosigo < 1) {
leftDir = true;
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = "When I go left I run into... OH!! My best friend!!!";
questioning = true;
button1.disabled = false;
button2.disabled = false;
button3.disabled = false;
button4.disabled = false;
pubby = 1;
select2 = false;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/PjDkMHr4whU?&autoplay=1";
}
if (pubby > 0) {
rightDir = false;
straight = false;
}
// IF TALK (1st Choice)
if (b1Click == 1 && leftDir == true && pubby == 1 && select1 == true) {
currentSpeaker = "pubby";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/Pubby.png";
document.getElementById("storyDiv").innerHTML = '"Firebreath... I found you!"';
questioning = false;
pubby = 2;
} else if (b1Click == 1 && leftDir == true && pubby == 2 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = '"Oh, Pubby, you were looking for me?"';
pubby = 3;
} else if (b1Click == 1 && leftDir == true && pubby == 3 && select1 == true) {
currentSpeaker = "pubby";
var charPic = document.getElementById("charID").src = "images/Pubby.png";
document.getElementById("storyDiv").innerHTML = '"Well... don' + "'t just stand around! Firebreath, you need to come back with me right away." + '"';
questioning = false;
pubby = 4;
} else if (b1Click == 1 && leftDir == true && pubby == 4 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = '"Pubby...?"';
pubby = 5;
} else if (b1Click == 1 && leftDir == true && pubby == 5 && select1 == true) {
currentSpeaker = "pubby";
var charPic = document.getElementById("charID").src = "images/Pubby.png";
document.getElementById("storyDiv").innerHTML = '"Firebreath, I don' + "'t have time to explain this. Let's go!" + '"';
questioning = false;
pubby = 6;
select1 = false;
}
// If TALK MORE (1st Choice of Talk)
if (b1Click == 2 && leftDir == true && pubby == 6 && select1 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = '"Hold on... can you at least explain what' + "'s going on?" + '"';
pubby = 7;
} else if (b1Click == 2 && leftDir == true && pubby == 7 && select1 == true) {
currentSpeaker = "pubby";
var charPic = document.getElementById("charID").src = "images/Pubby.png";
document.getElementById("storyDiv").innerHTML = '"If you don' + "'t come right now, you'll be stuck in here forever!" + '"';
questioning = false;
select1 = false;
b1Click = 1;
button1.disabled = true;
pubby = 6;
}
// If IGNORE (2nd Choice of Talk)
if (b2Click == 2 && leftDir == true && pubby == 6 && select2 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = '"Pubby, you' + "'re acting kind of weird..." + '"';
pubby = 7;
} else if (b2Click == 2 && leftDir == true && pubby == 7 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/FirebreathCrazy.png";
var bgPic = document.getElementById("bgID").src = "images/BG_CrazyFirebreath.png";
document.getElementById("storyDiv").innerHTML = "I run past Pubby and ignore him... why am I running away when he finally wanted to talk to me...?";
pubby = 8;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/th31DPulh8c?&autoplay=1";
} else if (b2Click == 2 && leftDir == true && pubby == 8 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "Where am I even going...?";
pubby = 9;
} else if (b2Click == 2 && leftDir == true && pubby == 9 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "I guess I'll just... stay here forever.";
pubby = 10;
} else if (b2Click == 2 && leftDir == true && pubby == 10 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "Tee Vee...";
pubby = 11;
} else if (b2Click == 2 && leftDir == true && pubby == 11 && select2 == true) {
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = "THE END.";
document.getElementById("progressDiv").innerHTML = "";
pubby = 12;
select1 = false;
}
// If GO WITH PUBBY (3rd Choice of Talk)
if (b3Click == 1 && leftDir == true && pubby == 6 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = 'I need to trust him... even if he is acting kind of different...';
button1.disabled = false;
pubby = 7;
} else if (b3Click == 1 && leftDir == true && pubby == 7 && select3 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Okay, Pubby, let' + "'s go!" + '"';
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/nQ3OKJc-ndA?&autoplay=1";
pubby = 8;
} else if (b3Click == 1 && leftDir == true && pubby == 8 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = 'Pubby grabs onto my hand, smiling. He starts to run off and take me somewhere.';
pubby = 9;
} else if (b3Click == 1 && leftDir == true && pubby == 9 && select3 == true) {
document.getElementById("storyDiv").innerHTML = "I'm starting to wonder why Pubby seemed so worried... and he seems to be taking everything so seriously.";
pubby = 10;
} else if (b3Click == 1 && leftDir == true && pubby == 10 && select3 == true) {
document.getElementById("storyDiv").innerHTML = "I wonder what's really going on here...";
pubby = 11;
} else if (b3Click == 1 && leftDir == true && pubby == 11 && select3 == true) {
document.getElementById("storyDiv").innerHTML = "I don't question anything anymore and just trust him. Eventually I see a light... and then...";
pubby = 12;
} else if (b3Click == 1 && leftDir == true && pubby == 12 && select3 == true) {
firebreath = true;
var charPic = document.getElementById("charID").src = "images/FirebreathNormal.png";
document.getElementById("storyDiv").innerHTML = "I see... myself?";
pubby = 13;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/mfq-tBeaVZo?&autoplay=1";
} else if (b3Click == 1 && leftDir == true && pubby == 13 && select3 == true) {
document.getElementById("storyDiv").innerHTML = "It... looks like a mirror... but I look different... right?";
pubby = 14;
} else if (b3Click == 1 && leftDir == true && pubby == 14 && select3 == true) {
document.getElementById("storyDiv").innerHTML = "Everything... is darker...";
pubby = 15;
} else if (b3Click == 1 && leftDir == true && pubby == 15 && select3 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Where... am I?"';
pubby = 16;
} else if (b3Click == 1 && leftDir == true && pubby == 16 && select3 == true) {
currentSpeaker = "???";
document.getElementById("storyDiv").innerHTML = '"Aha, it worked!"';
pubby = 17;
} else if (b3Click == 1 && leftDir == true && pubby == 17 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = "Who's... voice is that...?";
pubby = 18;
} else if (b3Click == 1 && leftDir == true && pubby == 18 && select3 == true) {
currentSpeaker = "";
bushcow = true;
document.getElementById("storyDiv").innerHTML = "I decide to turn around... and I see someone there.";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
pubby = 19;
} else if (b3Click == 1 && leftDir == true && pubby == 19 && select3 == true) {
currentSpeaker = "???";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Good morning, Firebreath. My name is Dr. Bushcow."';
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
pubby = 20;
} else if (b3Click == 1 && leftDir == true && pubby == 20 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "I need to get to the bottom of this...";
pubby = 21;
select3 = false;
}
// If TALK (1st Choice of Go With Pubby)
if (b1Click == 2 && leftDir == true && pubby == 21 && select1 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = '"You... said you were a doctor..."';
pubby = 22;
} else if (b1Click == 2 && leftDir == true && pubby == 22 && select1 == true) {
currentSpeaker = "bushcow";
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
document.getElementById("storyDiv").innerHTML = '"Ah yes, I am here to help, of course."';
pubby = 23;
} else if (b1Click == 2 && leftDir == true && pubby == 23 && select1 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "This is kind of suspicious... maybe I should ask him some questions.";
b1Click = 1;
pubby = 21;
select1 = false;
button1.disabled = true;
}
// If ASK (2nd Choice of Go With Pubby) <----------- THE LAST MIMZY
if (b2Click == 2 && leftDir == true && pubby == 21 && select2 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = '"How do you... know my name?"';
pubby = 22;
} else if (b2Click == 2 && leftDir == true && pubby == 22 && select2 == true) {
currentSpeaker = "bushcow";
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
document.getElementById("storyDiv").innerHTML = '"The truth is... you' + "'ve actually been coming to see me quite frequently. I'm your regular doctor." + '"';
document.getElementById("locationDiv").innerHTML = "Dr. Bushcow's Office?";
pubby = 23;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/TakIGbr11PI?&autoplay=1";
} else if (b2Click == 2 && leftDir == true && pubby == 23 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "Is he really telling the truth? He can't be... I don't recognize him at all!";
pubby = 24;
} else if (b2Click == 2 && leftDir == true && pubby == 24 && select2 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"I haven' + "'t even met you before! Don't lie to me... Where's Pubby!?" + '"';
pubby = 25;
} else if (b2Click == 2 && leftDir == true && pubby == 25 && select2 == true) {
currentSpeaker = "bushcow";
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
document.getElementById("storyDiv").innerHTML = '"I understand your frustrations. I suppose I have no choice but to tell you why you have been paying visits."';
pubby = 26;
} else if (b2Click == 2 && leftDir == true && pubby == 26 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "Does he think I'm stupid or something? I don't have any reasons for being here...";
pubby = 27;
} else if (b2Click == 2 && leftDir == true && pubby == 27 && select2 == true) {
currentSpeaker = "bushcow";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
document.getElementById("storyDiv").innerHTML = '"You have been visiting to resolve a recent obsession. Your obsession with television."';
pubby = 28;
} else if (b2Click == 2 && leftDir == true && pubby == 28 && select2 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = '"That' + "'s not true! I watch TV sometimes, but it's not anything like what you're saying." + '"';
pubby = 29;
} else if (b2Click == 2 && leftDir == true && pubby == 29 && select2 == true) {
currentSpeaker = "bushcow";
var charPic = document.getElementById("charID").src = "images/Bushcow.png";
document.getElementById("storyDiv").innerHTML = '"Ah yes, that is quite okay. Everything is better now thanks to the tests."';
pubby = 30;
} else if (b2Click == 2 && leftDir == true && pubby == 30 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "Tests...? He's just looking at me smiling... not giving me any real answers! Maybe I should just leave.";
pubby = 31;
} else if (b2Click == 2 && leftDir == true && pubby == 31 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").innerHTML = "At least I think... until I hear a familiar voice.";
pubby = 32;
} else if (b2Click == 2 && leftDir == true && pubby == 32 && select2 == true) {
currentSpeaker = "adrian";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Is that... Firebreath that I hear!?';
pubby = 33;
} else if (b2Click == 2 && leftDir == true && pubby == 33 && select2 == true) {
// ADRIAN TALKING TO BUSHCOW SCENE
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = "I turn to see Adrian talking to this guy now.";
var charPic = document.getElementById("charID").src = "images/BushcowSideClose.png";
var charPic2 = document.getElementById("charID2").src = "images/AdrianClose.png";
pubby = 34;
adrian = true;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/fUv6rxF1oKE?&autoplay=1";
} else if (b2Click == 2 && leftDir == true && pubby == 34 && select2 == true) {
document.getElementById("storyDiv").innerHTML = "But why does he look so happy?";
pubby = 35;
} else if (b2Click == 2 && leftDir == true && pubby == 35 && select2 == true) {
currentSpeaker = "adrian";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = '"Is his condition really all cured, doctor?"';
var charPic2 = document.getElementById("charID2").src = "images/Adrian.png";
pubby = 36;
} else if (b2Click == 2 && leftDir == true && pubby == 36 && select2 == true) {
currentSpeaker = "bushcow";
document.getElementById("storyDiv").innerHTML = '"That is correct, Mr. Ragger. I owe it to your friend Pubby for his assistance by the way."';
var charPic = document.getElementById("charID").src = "images/BushcowSide.png";
var charPic2 = document.getElementById("charID2").src = "images/AdrianClose.png";
pubby = 37;
} else if (b2Click == 2 && leftDir == true && pubby == 37 && select2 == true) {
currentSpeaker = "adrian";
document.getElementById("storyDiv").innerHTML = '"Thank goodness! I' + "'ll have to thank him next time I see him, too." + '"';
var charPic = document.getElementById("charID").src = "images/BushcowSideClose.png";
var charPic2 = document.getElementById("charID2").src = "images/Adrian.png";
pubby = 38;
} else if (b2Click == 2 && leftDir == true && pubby == 38 && select2 == true) {
document.getElementById("storyDiv").innerHTML = '"So, what do you say, Firebreath? Ready to head back home for a nice big meal? I hear Celia' + "'s cooking up some pancakes!" + '"';
var charPic2 = document.getElementById("charID2").src = "images/AdrianFB.png";
pubby = 39;
} else if (b2Click == 2 && leftDir == true && pubby == 39 && select2 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").innerHTML = '"Did you say... pancakes!?"';
var charPic2 = document.getElementById("charID2").src = "images/AdrianFBClose.png";
pubby = 40;
} else if (b2Click == 2 && leftDir == true && pubby == 40 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = "Before I know it, I head outside of the hospital with Adrian and head home for some pancakes. This was a weird day, but I'm glad we had a happy ending!";
pubby = 41;
} else if (b2Click == 2 && leftDir == true && pubby == 41 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = "THE END.";
document.getElementById("progressDiv").innerHTML = "";
pubby = 42;
// b2Click = 1;
select2 = false;
}
// END OF THE STORY.
// If CHECK (3rd Choice of Go With Pubby)
if (b3Click == 2 && leftDir == true && pubby == 21 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "This Dr. Bushcow guy doesn't look very familiar, but he seems to know who I am...";
select3 = false;
b3Click = 1;
}
// If THINK (4th Choice of Go With Pubby)
if (b4Click == 1 && leftDir == true && pubby == 21 && select4 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/BushcowClose.png";
document.getElementById("storyDiv").innerHTML = "Just... where am I exactly? And where did Pubby go...?";
select4 = false;
b4Click = 0;
}
// IF CHECK (2nd Choice)
if (b2Click == 2 && leftDir == true && pubby == 1 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = "Does Pubby look kind of worried or...?";
b2Click = 0;
select2 = false;
}
// IF THINK (3rd Choice)
if (b3Click == 1 && leftDir == true && pubby == 1 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/PubbyClose.png";
document.getElementById("storyDiv").innerHTML = "It's Pubby! He's my best friend, but... why's he here?";
b3Click = 0;
select3 = false;
}
// IF GO BACK (4th Choice)
if (b4Click == 1 && leftDir == true && pubby == 1 && select4 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = "I decide to just turn around and go back...";
pubby = 0;
b4Click = 0;
leftDir = false;
direction = false;
questioning = false;
buttonpress = 0;
select4 = false;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/lCmiyOhSc8k?&autoplay=1";
}
// ======================= GAIR =======================
if (b3Click == 1 && direction == true && gair == 0 && select3 == true && gosigo < 1 && pubby < 1) {
rightDir = true;
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/GairClose.png";
document.getElementById("storyDiv").innerHTML = "When I go right I run into... someone familiar!";
questioning = true;
button1.disabled = false;
button2.disabled = false;
button4.disabled = false;
gair = 1;
select3 = false;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/2iPEbZbduLc?&autoplay=1";
}
if (gair > 0) {
straight = false;
leftDir = false;
}
// IF TALK (1st Choice)
if (b1Click == 1 && rightDir == true && gair == 1 && select1 == true) {
currentSpeaker = "gair";
document.getElementById("storyDiv").style.color = "white";
var charPic = document.getElementById("charID").src = "images/Gair.png";
document.getElementById("storyDiv").innerHTML = '"Haw, hey Firebreath!"';
questioning = false;
gair = 2;
} else if (b1Click == 1 && rightDir == true && gair == 2 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GairClose.png";
document.getElementById("storyDiv").innerHTML = '"Oh, Gair, what are you doing here?"';
gair = 3;
} else if (b1Click == 1 && rightDir == true && gair == 3 && select1 == true) {
currentSpeaker = "gair";
var charPic = document.getElementById("charID").src = "images/Gair.png";
document.getElementById("storyDiv").innerHTML = '"Uhh... wit... is... going on...?"';
gair = 4;
} else if (b1Click == 1 && rightDir == true && gair == 4 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "images/GairClose.png";
document.getElementById("storyDiv").innerHTML = '"Gair!?"';
gair = 5;
} else if (b1Click == 1 && rightDir == true && gair == 5 && select1 == true) {
currentSpeaker = "firebreath";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = '"Uh oh... where did he go!?"';
gair = 6;
} else if (b1Click == 1 && rightDir == true && gair == 6 && select1 == true) {
currentSpeaker = "firebreath";
document.getElementById("storyDiv").innerHTML = '"Gaaaiiiiirrr!!"';
gair = 7;
} else if (b1Click == 1 && rightDir == true && gair == 7 && select1 == true) {
document.getElementById("storyDiv").innerHTML = '"..."';
gair = 8;
} else if (b1Click == 1 && rightDir == true && gair == 8 && select1 == true) {
document.getElementById("storyDiv").innerHTML = '"He' + "'s not answering... I guess there's only one thing left to do" + '..."';
gair = 9;
select1 = false;
}
// If SEARCH FOR GAIR (1st Choice of Talk)
if (b1Click == 2 && rightDir == true && gair == 9 && select1 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
document.getElementById("storyDiv").innerHTML = 'I decide to continue forward to see if I can find him.';
gair = 10;
} else if (b1Click == 2 && rightDir == true && gair == 10 && select1 == true) {
var charPic = document.getElementById("charID").src = "images/FirebreathCrazy.png";
var bgPic = document.getElementById("bgID").src = "images/BG_CrazyFirebreath.png";
document.getElementById("storyDiv").innerHTML = "I walk for awhile... But I'm starting to lose track of what's going on...";
gair = 11;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/th31DPulh8c?&autoplay=1";
} else if (b1Click == 2 && rightDir == true && gair == 11 && select1 == true) {
document.getElementById("storyDiv").innerHTML = "What am I even looking for..?";
gair = 12;
} else if (b1Click == 2 && rightDir == true && gair == 12 && select1 == true) {
document.getElementById("storyDiv").innerHTML = "Oh wait... I can stay here forever...";
gair = 13;
} else if (b1Click == 2 && rightDir == true && gair == 13 && select1 == true) {
document.getElementById("storyDiv").innerHTML = "Tee Vee...";
gair = 14;
} else if (b1Click == 2 && rightDir == true && gair == 14 && select1 == true) {
document.getElementById("storyDiv").style.color = "white";
document.getElementById("storyDiv").innerHTML = "THE END.";
document.getElementById("progressDiv").innerHTML = "";
gair = 15;
select1 = false;
}
// If GO BACK (2nd Choice of Talk)
if (b2Click == 1 && rightDir == true && gair == 9 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = "I decide to just turn around and go back...";
gair = 0;
b2Click = 0;
rightDir = false;
direction = false;
questioning = false;
buttonpress = 0;
select2 = false;
button3.disabled = true;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/lCmiyOhSc8k?&autoplay=1";
}
// IF CHECK (2nd Choice)
if (b2Click == 1 && rightDir == true && gair == 1 && select2 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/GairClose.png";
document.getElementById("storyDiv").innerHTML = "Hmm for some reason Gair looks kinda different than the last time I saw him...";
b2Click = 0;
select2 = false;
}
// IF THINK (3rd Choice)
if (b3Click == 2 && rightDir == true && gair == 1 && select3 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "images/GairClose.png";
document.getElementById("storyDiv").innerHTML = "Oh, it's my friend Gair! Maybe he knows what this place is!";
b3Click = 0;
select3 = false;
}
// IF GO BACK (4th Choice)
if (b4Click == 1 && rightDir == true && gair == 1 && select4 == true) {
currentSpeaker = "";
document.getElementById("storyDiv").style.color = "#d38787";
var charPic = document.getElementById("charID").src = "";
document.getElementById("storyDiv").innerHTML = "I decide to just turn around and go back...";
gair = 0;
b4Click = 0;
rightDir = false;
direction = false;
questioning = false;
buttonpress = 0;
select4 = false;
var musicPlayer = document.getElementById("musicPlay").src = "https://www.youtube.com/embed/lCmiyOhSc8k?&autoplay=1";
}
// Background
if (adrian == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_Adrian.png";
} else if (bushcow == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_Bushcow.png";
} else if (firebreath == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_Firebreath.png";
} else if (crazy == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_CrazyFirebreath.png";
} else if (straight == true && gosigo < 11) {
var bgPic = document.getElementById("bgID").src = "images/BG_Gosigo.png";
} else if (straight == true && gosigo >= 11) {
var bgPic = document.getElementById("bgID").src = "images/BG_CrazyFirebreath.png";
} else if (leftDir == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_Pubby.png";
} else if (rightDir == true) {
var bgPic = document.getElementById("bgID").src = "images/BG_Gair.png";
} else {
var bgPic = document.getElementById("bgID").src = "images/BG_Begin.png";
}
// Speaker Text
if (currentSpeaker == "firebreath") {
document.getElementById("speakerDiv").innerHTML = "Firebreath: ";
} else if (currentSpeaker == "gosigo") {
document.getElementById("speakerDiv").innerHTML = "Gosigo: ";
} else if (currentSpeaker == "pubby") {
document.getElementById("speakerDiv").innerHTML = "Pubby: ";
} else if (currentSpeaker == "gair") {
document.getElementById("speakerDiv").innerHTML = "Gair: ";
} else if (currentSpeaker == "bushcow") {
document.getElementById("speakerDiv").innerHTML = "Dr. Bushcow: ";
} else if (currentSpeaker == "adrian") {
document.getElementById("speakerDiv").innerHTML = "Adrian: ";
} else if (currentSpeaker == "???") {
document.getElementById("speakerDiv").innerHTML = "???: ";
} else {
document.getElementById("speakerDiv").innerHTML = "";
}
// Questioning, Controlling Whole Side Bar
if (buttonpress == 1) {
document.getElementById("choice1").innerHTML = "Go Straight";
document.getElementById("choice2").innerHTML = "Go Left";
document.getElementById("choice3").innerHTML = "Go Right";
document.getElementById("choice4").innerHTML = "";
direction = true;
//console.log(direction);
document.getElementById("progressDiv").innerHTML = "";
} else if (questioning == true) {
document.getElementById("choice1").innerHTML = "Talk";
document.getElementById("choice2").innerHTML = "Check";
document.getElementById("choice3").innerHTML = "Think";
document.getElementById("choice4").innerHTML = "Go Back";
document.getElementById("progressDiv").innerHTML = "";
} else if (gosigo == 8) {
document.getElementById("choice1").innerHTML = "Talk More";
document.getElementById("choice2").innerHTML = "Walk Further";
document.getElementById("choice3").innerHTML = "Go Back";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = "";
} else if (pubby == 6) {
document.getElementById("choice1").innerHTML = "Talk More";
document.getElementById("choice2").innerHTML = "Ignore Pubby";
document.getElementById("choice3").innerHTML = "Go with Pubby";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = "";
} else if (pubby == 21) {
document.getElementById("choice1").innerHTML = "Talk";
document.getElementById("choice2").innerHTML = "Ask";
document.getElementById("choice3").innerHTML = "Check";
document.getElementById("choice4").innerHTML = "Think";
document.getElementById("progressDiv").innerHTML = "";
} else if (gair == 9){
document.getElementById("choice1").innerHTML = "Search for Gair";
document.getElementById("choice2").innerHTML = "Go Back";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = "";
} else {
document.getElementById("choice1").innerHTML = "";
document.getElementById("choice2").innerHTML = "";
document.getElementById("choice3").innerHTML = "";
document.getElementById("choice4").innerHTML = "";
document.getElementById("progressDiv").innerHTML = " > ";
}
}
</script>
</body>
</html>