Eight ball oracle? Sort of


Wrote this program originally for the Trs-80 model 1 and sort of kept it around for all these years. What it does is emulate the old number eight black ball toy that would give you the answers to your questions. There are no fancy graphics, but it seems to work.




oracle.html

[code]
 <html>
<body bgcolor="lightblue">
<center><h1>The Oracle</h1>
<hr>
<form method="post" action="oracle.php">
  Enter your question of the future to the oracle:
  <br>
  <br>
  <input type="text" name="message" />
  <input type="submit" />
</form>
<br>
<br>
When you press submit, this page will disappear. Then after cogitating, the Oracle will give you the answer.
</center>
<hr>
<br>
<a href="http://oeorgan1/game/">Return to the game menu</a>
<br>
<a href="http://oeorgan1">Return to the homepage!</a>
</body>
</html>
[/code]




oracle.php
 [code]
 <html>
<body bgcolor= "tan">
<center><h1> The Oracle</h1></center>

<hr>
Your question was:
<br>
<center>
<?php echo $_POST["message"]; ?>
</center>
<br>
Your answer is:

<br>
<br>
<center>
<?PHP
$lines = file('odata');

// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line) {
}
//show result
 echo $lines[rand(1,63)] . "<br />";
?>
</center>
<hr>
<br>
<a href="http://oeorgan1/game/oracle.html">Restart game</a>
<br>
<br>
<a href="http://oeorgan1/game/">Return to the game menu</a>
<br>
<a href="http://oeorgan1">Return to the homepage!</a>
</body>
</html>

[/code]

The data file: odata

[code]
 Yes, if you are creative.
Yes, if you are receptive.
Anything is possible, but you will have a difficult start.
What a youthful folly to ask!
You must wait and ask again.
Only conflict will come of the result, please pray.
It will take many who are organized to accomplish your request.
Yes, if you keep it together.
Be meek and you will get your answer.
You are lucky to get this far!
You must have the fellowship of men.
In great measure will the possession result.
One must be modest to attain their goal.
You will do good to have enthusiasm for your quest.
Let someone else take the lead to your quest.
Atone for what has been spoiled, then reask your question.
You are too far away to get the answer.
Meditation will lead you to your answer.
Bite through to your goal.
If you handle life with grace!
There is to be a coming apart for fate to be realized.
All must return to what is.
Not knowing the true answer will be better.
You must tame the power of the great.
Watch the corners of the mouth.
The greatest preponderance will be fate.
It will be the abysmals, sorry!
You will be lucky to hold on to what you have.
Influence will be the steeping stone to your quest.
Just be patient for a while.
It is a time for getting away.
The power of the great is upon you.
Yes, there is a progression to be attained.
The crytal ball is losing light and no answer may be attained now.
Everyone close will be part of your answer.
No, there is too much opposition.
Not likely, there are obstructions in the way.
Yes, deliverance will come.
Not as much as you might as supposed.
Yes and more than was planned.
Yes, if there is a breakthrough.
Maybe if you come to meet.
Now is the time to gather together for the answer.
Yes, only if there is a push upward.
No, oppression will stop your quest.
Yes, no, and maybe.......
What the oracle says is opposite to your true answer.
The answer will take longer and you will pay for the wait.
Only through an arousing!
It is not time for a move, you must keep still.
Let fate develop as it will.
You must see the marrying maiden first.
More than you ever imagined.
You may wonder and wander, but it is time to move.
Only if you act gently.
Yes, with great joy!
No, so you must let go of it to spread out.
Only with limitations.
Look within yourself and you can find the answer.
Only with preponderance of the small.
It will come to be after completion.
Only before completion.
I love Elizabeth!
Only God knows...
[/code]

Comments

Popular posts from this blog

Guiless?

Web.com and Network Solutions, the Walmart of the internet.

MSOffice vs Libreoffice