koan village 2: the deep dark woods

[php]
$randcheck = rand(1,5);
$nooption = false;
if ($_COOKIE[‘protracker’] == 6) { [/php]
the guru could not investigate the deep dark woods, because he was in jail.
[php]} elseif ($_COOKIE[‘protracker’] == 9) { [/php]
the guru could not investigate the deep dark woods because he was currently eating at the all-you-can-eat lettuce buffet.
[php]} elseif ($_COOKIE[‘protracker’] == 10) {
$nooption = true;[/php]
this time, the guru did not get lost in the woods. he traveled effortlessly through the woods to the cabin.
[php]} elseif (!isset($_REQUEST[‘p’])) { // if there’s no specification
$_SESSION[‘totalsteps’] = 0;
echo “the guru stepped into the woods. the trees blotted out the sky. he was immediately, entirely lost.”;
} elseif ($_REQUEST[‘p’] == ‘tre’) { // that tree over there
if ($_SESSION[‘signpostcall’] == 1) {
echo “the guru stumbled out onto the path.”;
} else {
if ($randcheck == 1) echo “the guru walked over to that tree. it was a lot further than he thought it was, and much bigger.”;
if ($randcheck == 2) echo “the guru walked to a tree. a lot of squirrels were playing in it. the guru liked squirrels, and he respected them enough not to climb into their home. in fact, he should probably leave them alone. they had their own lives.”;
if ($randcheck == 3) echo “the guru walked toward a tree. he thought about how much he missed his village. but he missed his tortoise, as well, and he had to find his friend. while thinking about this, he completely lost track of the tree he was walking toward.”;
if ($randcheck == 4) echo “the guru walked over to the tree. now what?”;
if ($randcheck == 5) echo “the guru decided to just think about walking over to that tree. but really, he just stood in the same place.”;
} // end the non-signpost
} elseif ($_REQUEST[‘p’] == ‘roc’) { // the rock [/php]
the guru headed over to that rock. it was nothing special.
[php]} elseif ($_REQUEST[‘p’] == ‘und’) { // under the rock
if (!isset($_SESSION[‘rockcount’])) $_SESSION[‘rockcount’] == 0;
$_SESSION[‘rockcount’]++;
if ($_SESSION[‘rockcount’] < 21) { echo "

the guru picked up the rock and looked underneath it. someone had hidden a note. the guru opened the note and read the message. it said:

“;
if ($_SESSION[‘rockcount’] == 1) echo “how did i know you were going to read this, guru?”;
if ($_SESSION[‘rockcount’] == 2) echo “i mean, really. i could have put this note under any rock in the woods, too. and yet you looked under exactly the one i hid this note.”;
if ($_SESSION[‘rockcount’] == 3) echo “not only that, but i knew the order you were going in which to look”;
if ($_SESSION[‘rockcount’] == 4) echo “do you know who i am?”;
if ($_SESSION[‘rockcount’] == 5) echo “i’m you, guru.”;
if ($_SESSION[‘rockcount’] == 6) echo “haha, i’m just kidding.”;
if ($_SESSION[‘rockcount’] == 7) echo “this is the tortoise.”;
if ($_SESSION[‘rockcount’] == 8) echo “i know this is really confusing.”;
if ($_SESSION[‘rockcount’] == 9) echo “but you need to go back to town.”;
if ($_SESSION[‘rockcount’] == 10) echo “and forget any of this.”;
if ($_SESSION[‘rockcount’] == 11) echo “i’m saying this as your friend.”;
if ($_SESSION[‘rockcount’] == 12) echo “tell mrs tortoise that i miss her.”;
if ($_SESSION[‘rockcount’] == 13) echo “tell her that i’m doing this for her.”;
if ($_SESSION[‘rockcount’] == 14) echo “seriously? just go home.”;
if ($_SESSION[‘rockcount’] == 15) echo “are you lost?”;
if ($_SESSION[‘rockcount’] == 16) echo “oh man, you’re totally lost.”;
if ($_SESSION[‘rockcount’] == 17) echo “haha, this is too funny.”;
if ($_SESSION[‘rockcount’] == 18) echo “but then again, i knew this was going to happen. because i left the notes.”;
if ($_SESSION[‘rockcount’] == 19) {
echo “go to that tree over there and you’ll see the signpost.”;
$_SESION[‘signpostcall’] = 1;
}
if ($_SESSION[‘rockcount’] == 20) echo “you should have listened, now you’re lost for good.”;
echo “

“;
} else {
echo “the guru picked up the rock. the only thing underneath it was a bunch of bugs.”;
} // end the rock-count
} elseif ($_REQUEST[‘p’] == ‘cli’) { // that tree over there
$nooption = true; [/php]
the guru climbed up a tree. [php]if ($_COOKIE[‘protracker’] < 7) { // the guru has escaped [/php]in every direction, he could see nothing but trees.[php]} elseif ($_COOKIE['protracker'] >= 7) {[/php]in the distance, the guru could see the faint outline of a cabin.[php]}[/php]

then, he climbed down.

[php]} elseif ($_REQUEST[‘p’] == ‘cab’) { // go to the cabin
$nooption = true; [/php]
the guru climbed down the tree and walked toward the cabin.

when he arrived, he had a vague recollection of it, a sense of déjà vu. had he dreamt of this place before?

[php]if ($_COOKIE[‘protracker’] < 8) {[/php]he walked toward the door of the cabin when he heard a growl behind him.[php]} else {[/php]he approached the cabin.
[php]}} elseif ($_REQUEST[‘p’] == ‘tyg’) { // the tyger
$nooption = true;[/php]

the tyger said, “i will spare your life, and leave you be, if you will give me a single lock of the Goddess’s hair.”

[php]$attach = $_COOKIE[‘attach’];
if (strpos($attach,”a lock of hair”) == false) {[/php]
the guru did not have a lock of the Goddess’s hair. he said as much, and the tyger snarled.
[php]} else {[/php]
the guru had a choice: he could give the tyger a lock of the Goddess’s hair, or fight the tyger.
[php]} // end the tyger switch
} elseif ($_REQUEST[‘p’] == ‘ty2’) { // the tyger
$nooption = true;
$attach = $_COOKIE[‘attach’];
if ((strpos($attach,”a compromise”) == false) or ($_SESSION[‘tygerthreat’] == true)) {
$_SESSION[‘tygerthreat’] = false;
[/php]

the tyger snarled at the guru, and the guru knew it would be a fight.

strike the tyger.
meditate.
run away.

the guru’s health: 100
the tyger’s health: 100


[php]} else {

} // end another one, I think
} elseif ($_REQUEST[‘p’] == ‘giv’) { // give the lock
$nooption = true; [/php]
the guru handed the tyger a lock of the Goddess’s hair.

[php]$_SESSION[‘delitem’] = “a lock of hair”;
$_SESSION[‘delcolor’] = “yellow”;
$_SESSION[‘delurl’] = “https://koanoftheday.com/village2/temple/”;[/php]

[php function=17]

in return, the tyger promised not to hurt the guru.

[php]$_SESSION[‘newitem’] = “a deal with the tyger”;
$_SESSION[‘zencolor’] = “red”;
if ($_COOKIE[‘protracker’] < 8) setcookie("protracker", 8, $cooltime, "/", ".koanoftheday.com"); [/php]

[php function=13]

the guru walked over to the cabin.
[php]} elseif ($_REQUEST[‘p’] == ‘dow’) { // climb down[/php]
the guru climbed down out of the tree and looked around.
[php]} elseif ($_REQUEST[‘p’] == ‘bac’) { // turn around
if ($randcheck == 1 ) echo “the guru turned around. strangely, nothing seemed familiar.”;
if ($randcheck == 2 ) echo “the guru took several steps backwards, but he quickly lost track of which way he had been.”;
if ($randcheck == 3 ) echo “the guru turned around and started walking. unfortunately, he had turned all the way around.”;
if ($randcheck == 4 ) echo “

the guru turned around and saw something he had never before seen.

it wasn’t anything special. it was just something he’d never seen.

“;
if ($randcheck == 5 ) echo “the guru decided not to turn around and instead kept going forward.”;
}[/php]
[php]if ($nooption == false) {[/php]

he could either walk toward that tree over there, head over to that rock, or try to turn around and go back.

[php]}
$_SESSION[‘totalsteps’]++;
if ($_SESSION[‘totalsteps’] > 12) echo “

the guru felt rather sleepy and thought about taking a nap.”;
[/php]

bodhi: 1 ·  main  ·  archives  ·  read "love stories"  ·  #zen