print $startdiv."The following people have contributed to <a href=\"http://www.apolitical.info/webgame\" onMouseover=\"window.status='back to the starting page'; return true\">Age of Fable</a>:";
print $line;
print $line;
print $startdiv."<b>Your adventures were faithfully chronicled</div>";
print $startdiv."with nothing false set down, nor anything true omitted,</b></div>";
print $startdiv."by <a href=\"http://www.apolitical.info/aboutme\" target=\"_blank\">James Hutchings</a>.</div>";
print $line;
print $line;
print $startdiv."<b>The people, places, gods and monsters";
print $startdiv."of Karrakara and the islands around have been accurately depicted by the following artists.</b></div>";
print $line;
print $startdiv."Thanks are due to these artists for permission to use their work.</div>";
print $startdiv."each of these miniatures must be unlocked by the cunning use of an arrow, and a mouse.</div>";
print $startdiv."do so to the picture, to see a larger version,</div>";
print $startdiv."or to the artist's name to visit them.</div>";
print $line;
print "<table align=\"center\"><tr>";
$row=0;
for ($loop=1;$loop<=$artworks;$loop++) {
if ($artists[$loop][1]<>"public" OR $artists[$loop][0]=="Peter Seckler") {
print "<td align=\"center\">";
print "<a href=\"http://www.apolitical.info/webgame/gallery?p=".$artists[$loop][2]."&a=".$artists[$loop][0]."&h=".$artists[$loop][1]."\" onMouseover=\"window.status='see a bigger version of this picture'; return true\">";
print "<img src=\"".$site.$artists[$loop][2]."-thumb.jpg\">";
print "</a>";
print "<br>";
$name=$artists[$loop][0];
if ($name<>"Peter Seckler") {
print "<a href=\"http://".$artists[$loop][1]."\" target=\"_blank\">";
}
print $name;
if ($name=="Peter Seckler") {
print "<br><a href=\"http://creativecommons.org/licenses/by/3.0/us\" target=\"_blank\">free license";
} elseif ($name=="Scott Harshbarger") {
print "</a><br><a href=\"http://creativecommons.org/licenses/by-nc-nd/3.0\" target=\"_blank\">free license";
} elseif ($name=="Dominique Signoret</a> (slightly altered)") {
print "<br><a href=\"http://commons.wikimedia.org/wiki/Commons:GNU_Free_Documentation_License\" target=\"_blank\">free license";
}
print "</a></td>";
$row++;
if ($row==5) {
$row=0;
print "</tr><tr>";
}
}
}
print "</tr></table>";
print $line;
print $startdiv."The pictures in the letters at the start of the game are by <a href=\"http://dcrouzet.chez-alice.fr\" target=\"_blank\">Dominique Crouzet</a>.</div>";
print $line;
print $line;
print $startdiv."This artwork is in the public domain:";
print $line;
print "<table align=\"center\"><tr>";
$row=0;
for ($loop=1;$loop<=$artworks;$loop++) {
if ($artists[$loop][1]=="public" AND $artists[$loop][0]<>"Peter Seckler") {
print "<td align=\"center\">";
print "<a href=\"http://www.apolitical.info/webgame/gallery?p=".$artists[$loop][2]."&a=".$artists[$loop][0]."&h=public\" onMouseover=\"window.status='see a bigger version of this picture'; return true\">";
print "<img src=\"".$site.$artists[$loop][2]."-thumb.jpg\">";
print "</a>";
print "<br>";
print $artists[$loop][0];
print "</td>";
$row++;
if ($row==4) {
$row=0;
print "</tr><tr>";
}
}
}
print "</tr></table>";
print $line;
print $line;
print $startdiv."<b>Many things which were foretold have come to pass:</b></div>";
print $startdiv."Gnome named by Nadia Menon.</div>";
print $startdiv."The description of the pyramid taken from Robert E. Howard.</div>";
print $startdiv."Cthulhu invented by H.P. Lovecraft.</div>";
print $startdiv."The rebel's speech by <a href=\"http://en.wikipedia.org/wiki/John Ball (priest)\" target=\"_blank\">John Ball</a>.</div>";
print $startdiv."The idea of Janooth by the <a href=\"http://www.vitalspot.f9.co.uk\" target=\"_blank\">Vital Spot</a>.</div>";
print $startdiv."The original idea of the Grim Mockery by <a href=\"http://www.myspace.com/phoenixofborg\" target=\"_blank\">Phoenix Talion</a>.</div>";
print $startdiv."The phrase 'Ape-Rajahs' is inspired by <a href=\"http://www222.pair.com/sjohn/encounter-critical.htm\" target=\"_blank\">Encounter Critical</a>.</div>";
print $startdiv."Prince Dimitri originally inspired by a character in the <a href=\"http://www.the-underdogs.info/showbook.php?id=33\" target=\"_blank\">Fabled Lands</a> series.</div>";
print $startdiv."The mad orc inspired by the Fabled Lands series. His speech by <a href=\"http://en.wikipedia.org/wiki/Thomas DeQuincey\" target=\"_blank\">Thomas DeQuincey</a>.</div>";
print $startdiv."The rating system for ghosts by <a href=\"http://www.nonadventures.com\" target=\"_blank\">Justin Pierce</a>.</div>";
print $startdiv."'The Crows Call My Name' from an idea by Jack Handey.</div>";
print $startdiv."The living door inspired by a similar feature in the Tunnels and Trolls paperback rules.</div>";
print $startdiv."Dead Eye Street inspired by Forever Street and Nowhere Lane in the Fighting Fantasy series.</div>";
print $startdiv."The description of the smoke in the pyramid based on the D&D module 'White Plume Mountain'.</div>";
print $startdiv."The gods in the pyramid are based on Lolth from D&D, and Yag-kosha from <a href=\"http://www.apolitical.info/webgame/tower.php\">The Tower of the Elephant</a>.</div>";
print $line;
print $startdiv;
?>
<!--the code for the 'Project Wonderful' ad is here in the original page.--> <?php
print "</div>";
print $line;
print $startdiv."As seen in the free online RPG <a href=\"http://www.apolitical.info/webgame\" onMouseover=\"window.status='play Age of Fable'; return true\">Age of Fable</a></div>";
print $line;
print $startdiv."See all the artwork from Age of Fable on the <a href=\"http://www.apolitical.info/webgame/credits.php\" onMouseover=\"window.status='author and artist credits'; return true\">credits page</a></div>";
print $line;
print $startdiv."This image ";
if ($a=="Peter Seckler") {
print "may be used under a <a href=\"http://creativecommons.org/licenses/by/3.0/us\" target=\"_blank\">Creative Commons</a> license";
} elseif ($a=="Dominique Signoret</a> (slightly altered)") {
print "may be used under the <a href=\"http://commons.wikimedia.org/wiki/Commons:GNU_Free_Documentation_License\" target=\"_blank\">GNU Free Documentation License</a>. The original picture is <a href=\"http://en.wikipedia.org/wiki/Image:Cthulhu_and_R'lyeh.jpg\" target=\"_blank\">here</a>.";
} elseif ($a=="Scott Harshbarger") {
print "may be used for non-commercial works under a <a href=\"http://creativecommons.org/licenses/by-nc-nd/3.0/\" target=\"_blank\">Creative Commons</a> license";
} elseif ($h=="public") {
print "is in the public domain as copyright has expired";
} else {
print "may not be used without the permission of the author";
}
print "</div>";
print $line;
print $startdiv;
?>
<!--the code for the 'Project Wonderful' ad is here in the original page.--> <?php
//these stats are BEFORE the additions to Stamina and Heroism
//class name, then attributes, then name, then gender:
//4=male, 5=female (courtesan counts as female)
$word=array (
'Stamina' => array ("near death","sickly","sickly","sickly","unhealthy","unhealthy","unhealthy","unremarkable","unremarkable","unremarkable","unremarkable","healthy","healthy","healthy","healthy","robust","robust","robust","unstoppable","unstoppable","unstoppable"),
'Charisma' => array ("null","repulsive","repulsive","hateful","hateful","hateful","annoying","annoying","annoying","innocuous","innocuous","innocuous","likeable","likeable","likeable","charming","charming","charming","mesmerising","mesmerising","mesmerising"),
'Duelling' => array ("null","clumsy","clumsy","clumsy","clumsy","slow","slow","slow","slow","average","average","average","average","agile","agile","agile","agile","dangerous","dangerous","deadly","deadly"),
'Brawling' => array ("null","puny","puny","puny","weak","weak","weak","unremarkable","unremarkable","unremarkable","unremarkable","strong","strong","strong","strong","strong","powerful","powerful","powerful","legendary","legendary"),
'Seafaring' => array ("null","landlubber","landlubber","landlubber","landlubber","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","old salt","old salt","old salt","old salt"),
'Magic' => array ("null","powerless","powerless","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","overwhelming","overwhelming"),
'Heroism' => array ("wicked","wicked","wicked","corrupt","corrupt","selfish","selfish","wavering","wavering","wavering","good-hearted","good-hearted","good-hearted","bold","bold","bold","bold","heroic","heroic","heroic","heroic"),
'Scouting' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Roguery' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Luck' => array ("null","cursed","cursed","ill-starred","ill-starred","mediocre","mediocre","mediocre","fair","fair","fair","lucky","lucky","lucky","auspicious","auspicious","auspicious","charmed","charmed","blessed","blessed"),
'Healing' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Streetwise' => array ("null","babe in the woods","babe in the woods","clueless","clueless","foolish","foolish","unwise","unwise","fair","fair","alert","alert","alert","crafty","crafty","crafty","cunning as a fox","cunning as a fox","cunning as a shithouse rat","cunning as a shithouse rat"),
);
//number and names of attributes
$attnum=12;
$attributes=array("null","Stamina","Charisma","Duelling","Brawling","Seafaring","Magic","Heroism","Scouting","Roguery","Luck","Healing","Streetwise");
// current character
$stats=array();
print "<table align=\"center\" width=\"100%\">";
print "<tr";
if ($mode<>0) {
print " valign=\"top\"";
}
print "><td width=\"50%\">";
if ($mode==0) {
print $link."index.php?mode=2&method=1\" onMouseover=\"window.status='randomly generated character'; return true\">Random character</a></div>";
print $line;
print $link."index.php?mode=5\" onMouseover=\"window.status='choose from a list of characters'; return true\">Pre-generated character</a></div>";
print $line;
print $startdiv."Create a custom character, using";
print $link."index.php?mode=4&method=2\" onMouseover=\"window.status='choose your character\'s attributes'; return true\">links</a> or <a href=\"http://www.apolitical.info/webgame/index.php?mode=4&method=1\" onMouseover=\"window.status='choose your character\'s attributes'; return true\">drop-down menus</a></div>";
print $line;
print $link."index.php?mode=6\" onMouseover=\"window.status='link to us'; return true\">Link to Age of Fable</a></div>";
print $line;
print $link."index.php?mode=1\" onMouseover=\"window.status='FAQ'; return true\">Frequently Asked Questions</a></div>";
print $line;
print $link."credits.php\" onMouseover=\"window.status='artist and author details'; return true\">Credits</a></div>";
print $line;
print $startdiv."Age of Fable is unfinished</div>";
print $startdiv."and under construction.</div>";
print $startdiv;
@include "http://www.apolitical.info/webgame/update.txt";
print $startdiv."Please feel free to leave</div>";
print $startdiv."any feedback in the</div>";
print $startdiv."<a href=\"http://www.apolitical.info/guestbook\" onMouseover=\"window.status='leave feedback, or read other people\'s'; return true\" target=\"_blank\">Guestbook</a></div>";
print $startdiv."(opens in a new window)";
print $line;
print $link."index.php?mode=3\" onMouseover=\"window.status='a small list of similar sites'; return true\">Links</a></div>";
print $line;
print $link."index.php?mode=7\" onMouseover=\"window.status='stories and other resources'; return true\">Library</a></div>";
print $line;
print $link."sourcecode.php\" onMouseover=\"window.status='source-code for Age of Fable'; return true\" target=\"_blank\">Source Code</a></div>";
print $startdiv."(opens in a new window)";
} elseif ($mode==1) {
print $startdiv."<iframe src=\"faq.html\" height=450 frameborder=0></IFRAME></div>";
print $line;
print $link."index.php?mode=0\" onMouseover=\"window.status='back to the starting page'; return true\">back to the main page</a>";
} elseif ($mode==2) {
//$method (for generating stats):
//1=generate randomly
//2=use $rolls (renaming character randomly)
//3=use profession archetype
//4=use $rolls (entering name for character)
//5=use $rolls, but randomise (randomly changing stats)
//6=use $rolls (returning from choosing to enter name or editing)
if (!isset($method)) {
$method=1;
}
//generate initial stats for character
$total=0;
//for random characters only - choose a pre-generated
//character, do that +/- up to 6.
$rolltemplate=rand(1,$classes);
for ($loop=1;$loop<=$attnum;$loop++) {
if ($method==1) {
$stats[$loop]=min(20,max(1,$class[$rolltemplate][$loop]+6-rand(0,12)));
} elseif ($method==3) {
$stats[$loop]=$class[$type][$loop];
} else {
$stats[$loop]=ord($rolls{$loop-1})-48;
if ($attributes[$loop]=="Stamina" or $attributes[$loop]=="Heroism") {
$stats[$loop]=$stats[$loop]-5;
}
}
$total=$total+$stats[$loop];
}
if ($method==5) {
$tweak=array();
$tote=0;
for ($loop=1;$loop<=$attnum;$loop++) {
do {
$tweak[$loop]=rand(0,3)-rand(0,3);
$attnew=$tweak[$loop]+$stats[$loop];
} while ($attnew<1 OR $attnew>20);
$tote=$tote+$tweak[$loop];
}
while ($tote<>0) {
if ($tote>0) {
$movement=-1;
} else {
$movement=1;
}
do {
$thisatt=rand(1,$attnum);
$newtweak=$tweak[$thisatt]+$movement;
$newvalue=$stats[$thisatt]+$newtweak;
} while ($newvalue==0 OR $newvalue==21 OR $newtweak==4 OR $newtweak==-4);
$tweak[$thisatt]=$tweak[$thisatt]+$movement;
$tote=$tote+$movement;
}
for ($loop=1;$loop<=$attnum;$loop++) {
$stats[$loop]=$stats[$loop]+$tweak[$loop];
}
}
//balance characters stats
while ($total<>$attnum*10) {
$change=rand(1,$attnum);
$total=$total-$stats[$change];
$stats[$change]=0;
$ideal=($attnum*10)-$total;
if (($ideal>2 AND $ideal<19) OR ($ideal>0 AND $ideal<21 AND $method==1)) {
$stats[$change]=$ideal;
} else {
$stats[$change]=rand(1,20);
}
$total=$total+$stats[$change];
}
//decide what class the character is
//(unless you're just re-naming the character)
if ($method<>4 AND $method<>2 AND $method<>6) {
$score=array();
$lowest=100000;
for ($cloop=1;$cloop<=$classes;$cloop++) {
for ($aloop=1;$aloop<=$attnum;$aloop++) {
$ideal=$class[$cloop][$aloop];
if ($attributes[$aloop]=="Heroism" or $attributes[$aloop]=="Stamina") {
$ideal=$ideal+5;
}
$score[$cloop]=$score[$cloop]+abs($stats[$aloop]-$ideal);
}
$lowest=min($lowest,$score[$cloop]);
}
do {
$prof=rand(1,$classes);
} while ($score[$prof]>$lowest);
}
//add 5 to Stamina and Heroism
for ($loop=1;$loop<=$attnum;$loop++) {
if ($attributes[$loop]=="Stamina" OR $attributes[$loop]=="Heroism") {
$stats[$loop]=$stats[$loop]+5;
}
}
//generate name if necessary
if (!isset($name) OR $name=="") {
// random name elements
// with flags for where they can be: 1=first, 2=last, 3=alone.
// and for genders 4=male, 5=female
//(doesn't apply if used as surname)
if (rand(1,9)<3) {
// one element
do {
$which=rand(1,$namebits);
} while ($namebit[$which][3]==0 OR $namebit[$which][$class[$prof][$attnum+2]]==0);
// OR gender
$name=$namebit[$which][0];
} else {
// two elements
do {
$whichf=rand(1,$namebits);
$whichl=rand(1,$namebits);
} while ($whichf==$whichl OR $namebit[$whichf][1]==0 OR $namebit[$whichl][2]==0 OR $namebit[$whichf][$class[$prof][$attnum+2]]==0 OR ($whichl==34 AND $class[$prof][$attnum+2]==4) OR ($whichl==90 AND $class[$prof][$attnum+2]==5));
// gender check only for first name
// but elements 34 is special.
$name=$namebit[$whichf][0]." ".$namebit[$whichl][0];
}
} else {
$name=str_replace(chr(92),chr(0),$name);
}
//options - re-roll or accept character
if ($method==2) {
print "<div align=\"center\">";
print "<form name=\"input\" action=\"index\" method=\"get\">";
print "<input type=\"text\" name=\"name\">";
print "<input type=\"submit\" value=\"enter\">";
print "<input type=\"hidden\" name=\"prof\" value=".$prof.">";
print "<input type=\"hidden\" name=\"rolls\" value=\"".$rolls."\">";
print "<input type=\"hidden\" name=\"mode\" value=2>";
print "<input type=\"hidden\" name=\"method\" value=6>";
print "</form>";
print "</div>";
print $startdiv."Enter the character's name in the text box above and click the 'enter' button, or</div>";
print $link."index.php?mode=2&method=6&rolls=".$rolls."&prof=".$prof."&name=".$name."\" onMouseover=\"window.status='leave the character\'s name as it is'; return true\">leave the name as it is</a></div>";
} else {
print $link."game?rolls=".$rolls."&prof=".$prof."&name=".$name."\" onMouseover=\"window.status='start playing'; return true\">start playing with this character</a></div>";
print $line;
print $startdiv."Edit this character, using";
print $link."index.php?mode=4&method=2&rolls=".$rolls."&name=".$name."\" onMouseover=\"window.status='choose your character\'s attributes'; return true\">links</a> or <a href=\"http://www.apolitical.info/webgame/index.php?mode=4&method=1&rolls=".$rolls."&name=".$name."\" onMouseover=\"window.status='choose your character\'s attributes'; return true\">drop-down menus</a></div>";
print $line;
print $link."index.php?mode=2&method=5&rolls=".$rolls."&name=".$name."\" onMouseover=\"window.status='make a small, random change to this character'; return true\">randomly change</a> this character's scores</div>";
print $line;
print $startdiv."rename this character - <a href=\"http://www.apolitical.info/webgame/index.php?mode=2&method=4&prof=".$prof."&rolls=".$rolls."\" onMouseover=\"window.status='random new name for this character'; return true\">randomly</a> or <a href=\"http://www.apolitical.info/webgame/index.php?mode=2&method=2&rolls=".$rolls."&prof=".$prof."&name=".$name."\" onMouseover=\"window.status='enter a name of your choice for this character'; return true\">your choice</a></div>";
print $line;
print $startdiv."New character - <a href=\"http://www.apolitical.info/webgame/index.php?mode=2&method=1\" onMouseover=\"window.status='randomly generate a new character'; return true\">random</a> or <a href=\"http://www.apolitical.info/webgame/index.php?mode=5\" onMouseover=\"window.status='choose from a list of characters'; return true\">pre-generated</a>.</div>";
print $line;
print $startdiv."The following links all open in a new window:</div>";
print $line;
print $link."index.php?mode=6\" onMouseover=\"window.status='link to us'; return true\" target=\"_blank\">Link to Age of Fable</a></div>";
print $line;
print $link."index.php?mode=1\" onMouseover=\"window.status='FAQ'; return true\" target=\"_blank\">Frequently Asked Questions</a></div>";
print $line;
print $link."credits.php\" target=\"_blank\" onMouseover=\"window.status='author and artist details'; return true\">Credits</a></div>";
print $line;
print $startdiv."<a href=\"http://www.apolitical.info/guestbook\" onMouseover=\"window.status='leave feedback, or read other people\'s'; return true\" target=\"_blank\">Guestbook</a></div>";
print $line;
print $link."index.php?mode=3\" onMouseover=\"window.status='a small list of similar sites'; return true\" target=\"_blank\">Links</a></div>";
print $line;
print $link."index.php?mode=7\" onMouseover=\"window.status='stories and other resources'; return true\" target=\"_blank\">Library</a></div>";
print $line;
print $link."sourcecode.php\" onMouseover=\"window.status='source-code for Age of Fable'; return true\" target=\"_blank\">Source Code</a></div>";
}
} elseif ($mode==3) {
print $startdiv."<iframe src=\"links.html\" height=450 frameborder=0></IFRAME></div>";
print $line;
print $link."index.php?mode=0\" onMouseover=\"window.status='back to the starting page'; return true\">back to the main page</a></div>";
} elseif ($mode==5) {
if (!isset($order)) {
$classdone=array();
for ($click=1;$click<=$classes;$click++) {
do {
$nextclass=rand(1,$classes);
} while ($classdone[$nextclass]=="done");
$classdone[$nextclass]="done";
$order=$order.chr($nextclass+48);
}
}
if (!isset($orderplace)) {
$orderplace=1;
}
print $line;
print "<table align=\"center\">";
$flag=0;
$x=4;
$y=3;
for ($click=$orderplace;$click<=$orderplace+($x*$y)-1;$click++) {
$bclick=$click;
if ($bclick>$classes) {
$bclick=$bclick-$classes;
}
$loop=ord($order{$bclick-1})-48;
if ($flag==0) {
print "<tr>";
}
print "<td>";
print $startdiv."<a href=\"http://www.apolitical.info/webgame/index.php?mode=2&method=3&type=".$loop."&name=".$class[$loop][$attnum+1]."\" onMouseover=\"window.status='choose ".$class[$loop][$attnum+1]."'; return true\"><img src=\"http://www.apolitical.info/webgame/images/thumb ".$class[$loop][0].".jpg\" alt=\"".$class[$loop][$attnum+1].", a";
$z=substr($class[$loop][0],0,1);
if ($z=="a" OR $z=="e") {
print "n";
}
print " ".$class[$loop][0]."\"></a></div>";
print "</td>";
if ($flag==$x-1) {
print "</tr>";
}
$flag++;
if ($flag==$x) {
$flag=0;
}
}
print "</table>";
print $line;
$orderplace=$orderplace+($x*$y);
if ($orderplace>$classes) {
$orderplace=$orderplace-$classes;
}
print $startdiv."Click a picture to choose that character, or</div>";
print $startdiv."<a href=\"http://www.apolitical.info/webgame/index.php?mode=5&order=".$order."&orderplace=".$orderplace."\" onMouseover=\"window.status='see more characters'; return true\">see more characters</a></div>";
} elseif ($mode==6) {
print $startdiv."<img src=\"http://www.apolitical.info/webgame/images/banner.jpg\"></div>";
print $line;
print $startdiv."You can use the image above to link to us. Use the following three lines of code:</div>";
print $line;
print $startdiv."<a href=\"http://www.ageoffable.net\">";
print $startdiv."<img src=\"http://www.apolitical.info/webgame/images/banner.jpg\">";
print $startdiv."</a>";
print $line;
print $startdiv."if you save the banner to your own server, obviously change the address in the second line to whatever address you save the picture to.</div>";
print $line;
print $startdiv."If you want a banner of a different size or shape, please feel free to email:</div>";
print $startdiv."news (at) apolitical (dot) info.</div>";
print $line;
print $link."index.php?mode=0\" onMouseover=\"window.status='back to the starting page'; return true\">back to the main menu</a></div>";
} elseif ($mode==7) {
print "<ul>";
print "<li>A small collection of writing in a similar vein to Age of Fable.";
print $line;
print "<ul>";
print "<li>from <a href=\"http://www.apolitical.info/webgame/confessions\" onMouseover=\"window.status='a short extract from \'Confessions of an Opium-Eater\' by Thomas DeQuincy'; return true\">Confessions of an Opium Eater</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/sarnath\" onMouseover=\"window.status='\'The Doom That Came To Sarnath\', by H.P. Lovecraft'; return true\">The Doom That Came To Sarnath</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/jackals\" onMouseover=\"window.status='\'Jackals and Arabs\', by Franz Kafka'; return true\">Jackals and Arabs</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/masque\" onMouseover=\"window.status='\'The Masque of the Red Death\', by Edgar Allen Poe; return true\">The Masque of the Red Death</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/morthylla\" onMouseover=\"window.status='\'Morthylla\', by Clark Ashton Smith'; return true\">Morthylla</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/ozymandias\" onMouseover=\"window.status='\'Ozymandias\', by Percy Shelley'; return true\">Ozymandias</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/tower\" onMouseover=\"window.status='\'The Tower of the Elephant\', by Robert E. Howard'; return true\">The Tower of the Elephant</a>";
print "<li><a href=\"http://www.apolitical.info/webgame/xanadu\" onMouseover=\"window.status='\'Xanadu\', by Samuel Taylor Coleridge'; return true\">Xanadu</a>";
print "</ul>";
print $line;
print "<li>The <a href=\"http://www.apolitical.info/webgame/ideas\" onMouseover=\"window.status='randomly generates ideas for fantasy stories or role-playing games'; return true\">Adventure Ideas Generator</a> gives ideas for fantasy stories or role-playing games.";
print $line;
print "<li>The <a href=\"http://www.apolitical.info/webgame/plots\" onMouseover=\"window.status='randomly generates short plots for a variety of genres'; return true\">Plot Generator</a> gives short ideas for fantasy, pulp, space opera, superhero, western or cyberpunk plots - or any combination of these.";
print $line;
print "<li>The <a href=\"http://www.apolitical.info/webgame/map\" onMouseover=\"window.status='randomly generates maps for stories or role-playing games'; return true\">Random Map Generator</a> will create a map - again usable for stories or role-playing games.";
print $line;
print "<li><a href=\"http://www.apolitical.info/webgame/tables.php\" onMouseover=\"window.status='Tables for Fables'; return true\">Tables for Fables</a> is another resource for pen-and-paper role-playing games. It's a collection of random tables.</div>";
print $line;
print "<li><a href=\"http://www.apolitical.info/webgame/heroes\" onMouseover=\"window.status='Cute Board Heroes'; return true\">Cute Board Heroes</a> another pen-and-paper resource: a collection of pictures, for making paper miniatures.</div>";
print $line;
print "<li><a href=\"http://www.apolitical.info/webgame/dungeon\" onMouseover=\"window.status='Tunnels & Trolls dungeon generator'; return true\">Tunnels & Trolls dungeon generator</a> another pen-and-paper resource: creates a random 'dungeon' (an underground complex filled with monsters, treasure, traps etc) for the game Tunnels & Trolls.</div>";
print $line;
print "<li><a href=\"http://www.apolitical.info/webgame/timelord.pdf\" onMouseover=\"window.status='Time Lord - the Doctor Who role-playing game'; return true\">Time Lord</a> - a role-playing game based on the Doctor Who series. This is a 'pen-and-paper' game, not one played on a computer like Age of Fable, and needs at least two or three people to play. To download the file, right-click on the link and choose 'save target as...'. The file is pretty big (545k), and is a pdf, so you need Acrobat Reader to open it (your computer will probably have this free program, but if not you can get it <a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\">here</a>). Thanks to the game's creators, Ian Marsh and Peter Darvill-Evans, for making the game freely available on the web (originally at <a href=\"http://www.geocities.com/sege1701\" target=\"_blank\">this site</a>).";
print $line;
print "<li>This speech by <a href=\"http://www.apolitical.info/webgame/ukleguin.php\" onMouseover=\"window.status='speech by Ursula K. LeGuin'; return true\">Ursula K. Le Guin</a> discusses fantasy cliches.</div>";
print $line;
print "<li><a href=\"http://www.apolitical.info/blaze\" onMouseover=\"window.status='Blaze of Glory'; return true\">Blaze of Glory</a> and <a href=\"http://www.apolitical.info/hunters\" onMouseover=\"window.status='Hunters'; return true\">Hunters</a>: two versions of the same simple game - one's about fighting fires, the other's about hunting vampires. <i>Hunters</i> is a bit harder.</div>";
print "</ul>";
print "<div><a href=\"http://www.apolitical.info/webgame/index.php?mode=0\" onMouseover=\"window.status='back to the starting page'; return true\">back to the main menu</a></div>";
} elseif ($mode==4) {
if (!isset($rolls)) {
$rolls="?:::::?:::::";
}
if (isset($name)) {
$name=str_replace(chr(92),chr(0),$name);
}
// get attributes.
if ($rolls=="notusing") {
$stats[1]=$Stamina;
$stats[2]=$Charisma;
$stats[3]=$Duelling;
$stats[4]=$Brawling;
$stats[5]=$Seafaring;
$stats[6]=$Magic;
$stats[7]=$Heroism;
$stats[8]=$Scouting;
$stats[9]=$Roguery;
$stats[10]=$Luck;
$stats[11]=$Healing;
$stats[12]=$Streetwise;
} else {
for ($loop=1;$loop<=$attnum;$loop++) {
$stats[$loop]=ord($rolls{$loop-1})-48;
}
}
// get total of attributes
$total=0;
for ($loop=1;$loop<=$attnum;$loop++) {
$total=$total+$stats[$loop];
}
// decide on $prof (class), except for when first arrive with
// a rolled character, in the rare event of ties.
if (!isset($prof)) {
$score=array();
$lowest=100000;
for ($cloop=1;$cloop<=$classes;$cloop++) {
for ($aloop=1;$aloop<=$attnum;$aloop++) {
$ideal=$class[$cloop][$aloop];
if ($attributes[$aloop]=="Heroism" or $attributes[$aloop]=="Stamina") {
$ideal=$ideal+5;
}
$score[$cloop]=$score[$cloop]+abs($stats[$aloop]-$ideal);
}
$lowest=min($lowest,$score[$cloop]);
}
do {
$prof=rand(1,$classes);
} while ($score[$prof]>$lowest);
}
//print character (name and picture)
print $startdiv."<img src=\"http://www.apolitical.info/webgame/images/thumb ".$class[$prof][0].".jpg\"></div>";
print $startdiv."<i>".$name."</i></div>";
print $startdiv.$class[$prof][0]."</div>";
print $line;
//number and names of attributes
//if change attributes, need to do it here, create.php, form.txt
$attnum=12;
$obless=1; //how many non-attribute blessing types
$attributes=array("null","Stamina","Charisma","Duelling","Brawling","Seafaring","Magic","Heroism","Scouting","Roguery","Luck","Healing","Streetwise","Shelter");
// $attributes also includes non-attribute blessing names
//rough description of what a particular score means
$word=array (
'Stamina' => array ("near death","sickly","sickly","sickly","unhealthy","unhealthy","unhealthy","unremarkable","unremarkable","unremarkable","unremarkable","healthy","healthy","healthy","healthy","robust","robust","robust","unstoppable","unstoppable","unstoppable"),
'Charisma' => array ("null","repulsive","repulsive","hateful","hateful","hateful","annoying","annoying","annoying","innocuous","innocuous","innocuous","likeable","likeable","likeable","charming","charming","charming","mesmerising","mesmerising","mesmerising"),
'Duelling' => array ("null","clumsy","clumsy","clumsy","clumsy","slow","slow","slow","slow","average","average","average","average","agile","agile","agile","agile","dangerous","dangerous","deadly","deadly"),
'Brawling' => array ("null","puny","puny","puny","weak","weak","weak","unremarkable","unremarkable","unremarkable","unremarkable","strong","strong","strong","strong","strong","powerful","powerful","powerful","legendary","legendary"),
'Seafaring' => array ("null","landlubber","landlubber","landlubber","landlubber","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","old salt","old salt","old salt","old salt"),
'Magic' => array ("null","powerless","powerless","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","overwhelming","overwhelming"),
'Heroism' => array ("wicked","wicked","wicked","corrupt","corrupt","selfish","selfish","wavering","wavering","wavering","good-hearted","good-hearted","good-hearted","bold","bold","bold","bold","heroic","heroic","heroic","heroic"),
'Scouting' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Roguery' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Luck' => array ("null","cursed","cursed","ill-starred","ill-starred","mediocre","mediocre","mediocre","fair","fair","fair","lucky","lucky","lucky","auspicious","auspicious","auspicious","charmed","charmed","blessed","blessed"),
'Healing' => array ("null","terrible","terrible","poor","poor","mediocre","mediocre","mediocre","fair","fair","fair","good","good","good","great","great","great","superb","superb","legendary","legendary"),
'Streetwise' => array ("null","babe in the woods","babe in the woods","clueless","clueless","foolish","foolish","unwise","unwise","fair","fair","alert","alert","alert","crafty","crafty","crafty","cunning as a fox","cunning as a fox","cunning as a shithouse rat","cunning as a shithouse rat"),
);
//number of classes: only used for special branching type 23
$classes=19;
//name: get rid of the '\'s that it puts in front of apostrophes
$name=str_replace(chr(92),chr(0),$name);
if (!isset($weapon)) {
//trolls always have clubs.
if ($prof==14) {
$weapon=1;
//lizard-men always have spears.
} elseif ($prof==18) {
$weapon=7;
//dwarves don't have clubs or quarterstaffs because
//the story says you use the forge to make your weapon.
} elseif ($prof==9) {
$weapon=rand(3,$weapontypes);
//fairies don't have clubs, axes, war-hammers or maces.
} elseif ($prof==8) {
$weapon=rand(2,$weapontypes-3);
//paladins don't have clubs.
} elseif ($prof==5) {
$weapon=rand(2,$weapontypes);
//courtesans have quarterstaffs,
//daggers, swords, scimitars or machetes.
} elseif ($prof==15) {
$weapon=rand(2,6);
$keywords=array();
$manywords=240; //how many keywords are in the game.
for ($loop=1;$loop<=$manywords;$loop++) {
if ($world{$loop-1}=="!") {
$keywords[$loop]=1;
}
}
//unpack $blessings to reveal $bless array
if (!isset($blessings)) {
$blessings="";
for ($loop=1;$loop<=($obless+$attnum);$loop++) {
$blessings=$blessings."1";
}
if ($prof==8 OR $prof==13) {
$sbless=rand(1,$attnum+$obless);
$blessings[$sbless-1]="2";
}
}
$bless=array();
for ($loop=1;$loop<=($obless+$attnum);$loop++) {
$bless[$loop]=ord($blessings{$loop-1})-49;
}
// meanings of keywords:
// 1 - have your boat. If you don't have keyword 31, it's safe.
// 46 - 'check on boat in swamp' flag. Makes sure you don't have to
// do this twice in a row.
// 31 - boat is hidden in swamp
// (ie might get stolen & maybe write encounter)
// 32 - boat is definitely stolen from swamp (left it too long)
// however won't lose keyword 1 until you look for it
// or give up on it altogether.
// 33 - have had the chance to see fairies in swamp (whether did or not)
// 34 - someone stole your boat and you now know it (may meet them later)
// 96 - you've found the docks
// (can't find it by wandering again, but have
// the choice to visit it).
//97,98 - a new boat will cost you 10 or 15 gp respectively,
// or 20 if you have neither keyword.
// 100 - you may barter for a boat instead.
// 2 - kissed frog
// 3 - met the frog prince
// 4 - you've been a frog
// 5 - you saw the dwarves' fire (whether you investigated or not)
// 6 - met the dwarves and didn't make enemies of them
// 7 - met the dwarves and did make enemies of them
// (if you successfully stole from them without announcing
// yourself, you don't get this keyword)
// 8 - met the warrior with the slugs.
// 47 - wounded in the shoulder.
// (later, may lose this keyword if make a Healing roll
// or at the Street of the Gods)
// 62 - met orc, but didn't tell the orc about her.
// 9 - met wood elf when frog
// 10 - met troll when a frog
// 11 - tricked wood elf into kissing you
// 217 - you've met the veangeful frog/wood elf
// 218 - flag when looking for cure for wood elf - this
// indicates that it knows its you, thus will attack you if fail.
// 12 - tried to cast a spell when a frog
// 13 - made a bodgy raft
// 14 - made a good raft (both in case you explore island and return)
// 103 - made no raft
// both 13 and 14 are set to zero and 103 to 1
// when you come to island because it's possible to return.
// 15 - met the dragon and he told you not to return
// 16 - met the dragon and he told you not to return until better
// at healing (can be gotten rid of)
// 17 - met the dragon and healed him (can't return to island)
// 102 - you've examined the fish woman's body
// 18 - have had the chance to be gladiator
// via looking for work or begging
// 24 - have actually been a gladiator:
// if this is 1, 18 always 1 (but 18 can be 1 and not 24)
// this tag may not have any use - look at it later.
// 25 - have been gladiator and may go back
// 26 - have been gladiator and *must* go back
// (won, failed Heroism roll)
// if you 'drop out' of being a gladiator, 25 & 26 set to zero.
// 83 - have completed first bit of gladiator story
// (up to offer to sell imp)
// this is used if in prison etc, may be forced into
// gladiator life if haven't done it before.
// 84 - sold imp to gladiator owner
// 92 - you made the Streetwise roll to recognise that
// Serene Dreams' owner is conning you.
// 93 - you made the Heroism roll such that you have a choice not
// to go to fights in other cities.
// 94 - you're on your way to the training camp, directly from city.
// 223 - you're on your way to the training camp, via the forest
// (ie having run away from the elf or she runs away in combat)
// 222 - you've met dark elf
// (whether randomly or because going to training camp)
// 224 - you're at the camp, without the elf
// (223 and 224 are two seperate keywords so that if you head into
// the forest having been at the camp, you won't get the message
// 'at last you find the camp...'
// 228 - you successfully destroyed the camp.
// 229 - you tried to get everyone out of the ship (bonus to speech)
// 207 - you've met, or heard about, Eddie Lizzard.
// 19 - met Infinite Hashishim
// 20 - can't find IH again - either he disappeared or ripped you off,
// or you ripped him off, or otherwise argued.
// to contact him again 19 must be 1, 20 must be 0.
// 21 - IH ripped you off (might meet him again)
// 22 - you owe IH (only temporary - cleared whether pay him or not)
// 23 - you successfully ripped IH off
// (might meet him again and have the option to repay him 1gp)
// 27 - got taught the job code (maybe easier to find next time)
// 28 - had the chance to take small witch quest
// 29 - on witches quest (because can go through forest other ways)
// 30 - broke quest: either threw bundle away, sold it,
// or successfully defied witch.
// (this will be re-set if meet imp and he beats you)
// 35 - opened bundle - easier to sell it.
// 36 - can't steal, city guard on alert
// (because stole before, or because of street preacher)
// 37 - tried to rob assassin woman,
// will kill you if happens again
// 38 - robbed temple of black pearl
// 39 - tried to rob fighting merchant
// 40 - you are a murderer
// 41 - have visited 'space' island
// 42 - have met space people
// 43 - stole from space people, or were caught leaving ship
// 44 - stood guard for space people
// (if fail charisma roll can have 42 but neither of 43 or 44)
// 45 - had opportunity to leave spaceship
// 155 - saw the world from space
// 48 - saw alien on small planet (may not have talked to it)
// 49 - know how to fly ship (because alien taught you)
// 50 - met imp in city
// 51 - met street preacher in city
// 52 - gave shell to street preacher in city, or won argument.
// if set out to sea, get free blessing, set to zero.
// 53 - have found courage shop in city
// this means CANT find it again by wandering
// but CAN try and find it if have no shells,
// or if fail heroism roll and have enough shells to buy some.
// if try to find it and fail, this is reset to 0
// 54 - came across 'John Ball' preacher in city (even if walked on)
// 55 - listened to this preacher
// (54 used when exploring city, 55 if leave city and find in camp)
// if you hear speech in the camp, you get kewords 54 AND 55,
// so you won't come across the preacher in the city.
// 174 - helped the preacher against the guards.
// 56 - on JB side
// 57 - against JB (if walked on, don't get either of these)
// 58 - 'won' argument re street preacher
// (may be contacted by whichever side were on)
// 59 - in forest: 'hungry' flag. this encounter is repeatable,
// but has this flag so you're less likely to get it twice
// in a row.
// 60 - have met orc at inn
// 123 - met orc in Karrakara
// 61 - helped orc (gave shells, told about slug woman, or
// successfully blessed him).
// whether can have encounter:
// at inn: not if keyword 60 OR 61
// if 123, message not sure, but think recognise him from Karrakara
// in Karrakara: not if 123 OR 61
// if 60, message that not sure, but think recognise him from inn
// 63 - outside of Karrakara, have seen fire with men
// (won't be there next time)
// 64 - threatened man (more likely to be stolen from in your sleep)
// 65 - lost in forest from leaving Karrakara.
// 66 - you've had the opportunity to buy from the fur trader.
// 67 - met the caravan in the desert.
// 68 - found the tower
// 69 - approached the tower ie know it's full of treasure
// 68 means you can't find it again by wandering the desert
// do an encounter later which requires 69
// 70 - you've found the street of the gods
// this means you can't find it by wandering, but you can
// go back by choice.
// 126 - you've had the 1st 'Hail, O Kitty' message
// 134 - you've had the 2nd one.
// 71 - you're in contact with magician's apprentice
// (several ways to get this keyword)
// 72 - Karra frog flag - this is set to 1 each time the frog asks
// if you're going to help him. If it's set to 1, it's set to
// zero instead of it asking again (thus doesn't ask twice in
// a row).
// 216 - you know about Janooth
// (can do on quest from main city hub, or tell revenge frog)
// 73 - you are on the quest to find Janooth.
// 74 - have dealt with frog ie won't come across him again.
// also maybe helps eg if enslaved he frees you.
// 75 - have had 'talking frog for sale in city' encounter
// (ie this happens only once)
// 76 - trying to sell horse: have had offer from noble
// 77 - trying to sell horse: have had offer from butcher
// 80 - human-form Owyth has told you about desert ghouls
// 85 - have left human-form Owyth back in Karrakara.
// 86 - ...and he's minding horse
// 87 - ...and he's minding unicorn (85 will =1 if 86 or 87 do)
// 81 - have had your chance to get job offer to kill someone
// (may not have had the actual offer,
// if not assassin or rogue and fail rolls)
// this is also set to 1 if go to encounter from Street of Gods
// 99 - have done the saving roll related to Heroism
// at the Street of the Gods
// 101 - took up the offer, or went there from Street of the Gods
// 82 - successfully completed it
// (may lead to other encounters eg being blackmailed)
// 88 - you've had the miscellaneous street seller encounter
// 89 - have had chance to hear about black pearl when moving boxes
// 90 - actually have heard
// 91 - got chance to buy back imp (whether did or not)
// 95 - have met goblin and boy travellers outside of Karrakara
// 172 - you tried to sneak away from them (arrested in fairy town)
// 183 - you murdered them (also get tag 40). This is used because
// you might meet someone in jail who tells you they were thugs.
// 104 - you've met the death horse (2 seperate encounters)
// 105 - you're meeting death horse via forest
// 107 - you're meeting death horse
// returning from Janooth.
// (if not it's by general travel)
// 106 - resistance to poison from death horse
// 108 - you've met prince dimitri for the first time
// 109 - you've met prince dimitri for the second time
// 210 - you didn't pay prince dimitri back fully
// (if going into space, man won't pull you back to earth)
// 110 - you've had forest pool (heroism/charisma) encounter
// 111 - you've met the mermaid.
// 112 - great swimmer/can't drown.
// 113 - you've had the goblins encounter
// 114 - you can ask the goblins whether there's anything you can do
// 115 - the goblins have told you (ie you can go on mission below)
// 116 - you've been on the forest king/queen mission (whether succeeded or not)
// 117 - you successfully completed this
// (maybe can recruit goblins later for/against rebels)
// 118 - you're on Forest King/Queen mission for Dahlia in particular
// 119 - you've bought the blessing from the village wise woman
// (ie can't buy it again)
// 225 - you've spent too long in the town.
// 226 - you've visited the wise-woman.
// 120 - you've had the forest unicorn encounter
// 205 - you'll be arrested in Tok for spying on the unicorn
// 121 - you've had the forest giant houses 'encounter'
// 122 - you've had the neckweasels encounter
// 124 - met laughing market peasant
// 188 - met her again in Seriphosa.
// 125 - fox woman / Well of New Life
// 215 - you drank from it AFTER tricking wood elf.
// 127 - 'boiling sea' / Anhotep
// 128 - you've worked out that it's Anthotep (extra heroism)
// 129 - you've tried to work out what it is (can only do once)
// 154 - have seen world under the sea.
// 157 - you've tried to figure out world in sea (can only do once)
// 130 - you've had slow child encounter.
// 131,132,141 - temporary flags
// if you complete a relevant part, you get flag 131.
// 132,141 and 133 come about automatically in the main loop.
// encounters which may lead to ability to explore the sewers
// check for 131 to =0 (rather than 132 or 133).
// 133 - you can explore the sewers in Karrakara.
// (set to 0 once you have)
// 135 - you've gotten the bonus for being lizard man in desert.
// 136 - you're in the forest, going over the hills.
// 137 - you've met the 'weighing the heart' priest
// if you enter the pyramid, you also get this keyword.
// maybe change this later.
// 138 - you're on the quest to take vengeance on them
// 199 - you've found the pyramid (this is re-set to 0 if you
// swear vengeance on them)
// 139 - you've had the diseased town encounter
// 140 - you've tried to defeat the colossos, or healed some of them.
// (get accepted by rebels, maybe also hobos when expand that)
// you've tried to -
// 163 - investigate
// 164 - use magic to find out what happened
// 165 - heal them
// 166 - you've saved to see if you drink the water
// because you can go back to town, and if you leave then
// don't have to save again.
// 170 - you're on the colossos sub-quest
// 180 - you're going back from failing at the colossos sub-quest
// 181 - you have no boat to get back - Prince Dimitri gave a lift,
// or the Colossos blew you and you jumped off.
// 173 - the swamp key is definitely not for the door to Atnos
// (ie tried it - must be for Colossos itself)
// 179 - you've walked around Atnos' walls and found the door
// 182 - you've successfully dealt with the Colossos.
// (currently not used but may be later)
// 171 - you've had the choice to give shells to Numen Mari
// this is also set to 1 if you 'look up on the net' in Town
// 142 - you've had the swanroad encounter
// 143 - you've been rowed across the river
// (have some encounters later that require this)
// 144 - you've met the cryer and sphinx for the first time
// 145 - you know about the Amazons
// (give the option to ask in the temple of Su-Averna)
// 146 - you know about plague from the cryer
// or from drinking the water
// (make this help in town)
// 147 - you've pissed off or fought the cryer
// 148 - you've had fig pun in forest
// 203 - you've found High John in forest
// 149 - you've had the chance to have cat piano encounter
// or get Piteous Mew via 'catscan'.
// 150 - you left cat piano woman (may make rebels not accept you)
// 151 - you stopped cat piano woman (may make rebels accept you,
// perhaps may have bad consequence in sideshow alley
// eg perhaps can only play game staking life where otherwise
// have choice of life or money.
// 152 - 'crows call my name' flag
// (probably no game effect, just flavour)
// 153 - 'river phoenix/forest gump' flag
// (again probably just flavour)
// 156 - 'flowers of karrakara' flag (just flavour)
// 158 - you've found the rebels in the sewer
// 159 - you've joined the rebels in the sewer
// (whether sincerely or not)
// 160 - you've been completely lost in the sewer
// (so you don't have to do it twice)
// 161 - you've informed on them ie govt may contact you for missions
// 78 - have met the Lurker in the sewer
// 79 - you're in the sewers escaping from jail
// 162 - 'set stage on fire' flag
// (probably just flavour)
// 167 - you've been through the Ugly Forest
// 175 - you've encountered the revulsion demon
// 176 - you saw the way out of the forest by climbing a tree
// 168 - you've been to the fairy village ('Market')
// 184 - you've looked at box in Market
// 185 - you've looked at pearl in Market
// 186 - you've looked at book in Market
// 190 - you've had the roll where may hear about selling
// horse or unicorn there.
// 189 - you're on the mission to sell horse or unicorn there
// 187 - can visit Dead Eye Street in Karrakara (once it's written)
// 169 - you've had the 'gods of different pie' conversation
// 177 - you succeeded in tunneling out of cell
// 178 - you failed in tunneling out of cell
// 191 - you've had the 'wolf bus' encounter
// 192 - you've met the Hair Witch Project
// 193 - you have the writhing hair extensions
// 194 - you're bald from the Hair Witch Project
// 195 - you can sell your hair if you're broke
// 196 - you've found work in the country
// (doesn't give flag if attempt and fail)
// 197 - you've gone past the island chain
// 198 - ate there (harder to leave)
// 204 - you've noticed that the red flower doesn't wilt
// (make this a path into final bit)
// 201 - you've taken in basics of Nara religion - either
// in pyramid, or succeeded in Ritual of Weighing the Heart
// 208 - pyramid creatures are in your head.
// 200 - you deciphered the script in the entrance
// to the Hall of False Gods.
// 202 - you've had the 'money tree' encounter
// 206 - you've been to Tok (if arrested, don't get the keyword)
// 221 - you hid from the goblin patrol (makes them less friendly)
// 209 - you've had the chance to visit the Seal of Approval
// or get a catscan.
// 211 - you denounced it. Can save you in sewer.
// 212 - have had 'city guards' encounter from Seal or street preacher.
// 213 - you've had 'food court' bit.
// 214 - you've come across 'reader' in forest.
// 220 - you've met Santa (in space)
// 227 - you've had the encounter which can be cthulhu or friendly
// 230 - 'arrrr and arrrr'
// 231 - you've met Robin Goodfellow
// 232 - you've spent the night in a ruined temple
// (can happen on Janooth quest, or when meet Robin Goodfellow)
// 233 - you're spending the night in temple, from Robin Goodfellow
// (if don't have this keyword, it's on Janooth quest)
if (!isset($shells)) {
if ($prof==8 OR $prof==13) {
$shells=0;
} elseif ($prof==9) {
$shells=40;
} else {
$shells=20;
}
}
//main paragraph array
//each paragraph is represented by an array,
//whose elements are as follows:
//0:string giving text of para, or "no text"
//1:number giving what type of branching the paragraph has:
// 0 - this is an end paragraph
// 1 - only 1 option, given in slot 2
// 2 - free choice - slot 2 is number of choices, then
// text and number of each in turn.
// 3 - saving roll - slot 2 is which attribute (string)
// slot 3 is difficulty
// slot 4 is success para
// slot 5 is failure para
// if you succeed by 5 or more, make an advancement roll
// ie roll 1d20 and gain 1 of relevant attribute if roll is
// over your score in that attribute.
// 4 - random branching - slot 2 = how many options,
// then paragraph for each
// 5 - does character have an item - slot 2 - which item
// slot 3 - para if do have it
// slot 4 - para if don't
// 6 - as 5, but for a keyword rather than an item
// branches from here on all adjust variables, and all
// lead on to only 1 paragraph.
// 7 - gain or lose an item - slot 2 is which item
// 3 is 0 to lose or 1 to gain
// 4 is new para
// 8 - as 7, but for a keyword rather than an item.
// 9 - change to attributes - slot 2 is which attribute (string)
// 3 is change
// 4 is new para
// 10 - change to shells - slot 2 is change, slot 3 is new para
// 11 - shell check - slot 2 is minimum shells
// slot 3 is para if you have at least that much
// slot 4 is para if you don't
// 12 - multiple saves - slot 2 is how many
// slot 3 is difficulty
// 4 to (3 + slot 2) names of attributes
// (4 + slot 2) to (4 + 2 * slot 2) destinations:
// failed all, made 1,2 etc
// 13 - 'click to continue' - slot 2 is destination.
// 14 - gain a blessing - slot 2 is which one (text),
// or 'random' for a random one
// slot 3 is new paragraph
// 15 - blessing check - only checks non-attribute ones
// slot 2 is which one (text)
// slot 3 is para if do have it
// (only check non-attribute ones)
// (-1 if do so)
// slot 4 is para if don't have it
// 16 - branching based on profession
// slot 2 is the number of a profession
// slot 3 is the destination if you have that profession
// slot 4 is the destination if you have any other profession
// 17 - free choice, but some choices may depend on having keywords
// slot 2 is the maximum number of choices
// then for each choice, text, number -
// +ve number +1000 if requires keyword to =0
// (eg 1020 means 'display this choice if you don't have keyword 20')
// +ve number if keyword
// '0' if no requirement (ie if this choice always appears)
// -ve number if it requires an item/companion
// -ve number -100 if it requires you NOT to have an item/companion
// (eg -110 means 'display this choice if you don't have item #10')
// & finally destination for that choice
// 18 - lose all companions [special exception for cat when a frog]
// slot 2 = destination.
// 19 - 'I haven't written this yet' message.
// 20 - level check
// slot 2 is a level
// slot 3 is destination if you're at least that level
// slot 4 is destination if not.
// 21 - special: change attribute named in slot 2
// to equal attribute named in slot 3
// destination is slot 4
// (used in forest well encounter)
// 22 - special: becomes shell check, against random no (1-99)
// slot 2 is empty
// slot 3 is destination if make it
// slot 4 is destination if don't
// 23 - special: change profession randomly
// (from the Well of New Life)
// slot 2 is destination
//$switch - printing variable to control whether to print $line:
// 0 - last thing printed was black text.
// 1 - last thing printed was red information.
$switch=0;
//main array
$paras=array (
'Oops'=> array ("Suddenly, the god of unfinished things appears.<br><br><b>'SORRY!'</b> he says.<br><br>'You've reached a section that hasn't been written yet. Age of Fable is unfinished and under construction, and because it's free I can't give it as much time as I'd like to. However it's updated pretty frequently, so please check back later, or go back and choose another option. For now, I'm sending you back to Karrakara.'",13,271),
//Cstart: courtesan start
'Cstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou've spent years climbing up from the gutter, only to find yourself unable to bear your Lord any longer.",4,2,"Snowaltc","200altc"),
//Ftstart: fortune-teller start
'Ftstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou've spent years as a successful fortune-teller, and yet you make a beginner's mistake. You tell someone what you think will happen, rather than what they want to hear.",4,2,"Snowalt","200alt"),
//Fstart: fairy start
'Fstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">our crimes are so grave that you're cast out of Faerie. You're banished to Karrakara; the greatest city in the world, and the centre of all that is worldly. Your wings are clipped, your blessings almost gone, and you are condemned to time and death. You vow that you'll find your way back.",13,271),
//Pstart: possible pirate start
'Pstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou're surprised to find that the rest of the crew thinks 'The Saucy Minnow' is a fine name for a ship. You're cast adrift on a raft in the open sea. They leave you only some hard bread, your WEAPONNAME, a pipe and some tobacco. You also manage to hide a few shells, the islands' most widely-used currency. You have a vague idea that the great city of Karrakara is fairly close.",13,"Islandhub"),
//Dstart, Tstart, Faunstart, Rstart: dwarf, troll, faun and sometimes rogue start
'Dstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou've grown tired of forging swords for others to use. You make a WEAPONNAME for yourself - and, having committed the hanging crime of using the communal forge for your own ends, decide to commit another by stealing a bagful of cowrie shells, the most common form of currency, from your clan's treasury. You leave the mountain you've known all your life and set out through the forest for the city to which all thieves go, Karrakara.",13,300),
'Faunstart1'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou never thought you'd use the phrase 'sick of nymphs'; but indeed you are. You set out for the centre of all vice, the great city of Karrakara.",1,"Faunstart"),
'Faunstart'=> array ("You have no cowrie-shells, the islands' most common currency. But you suppose people will give them to you for being so handsome, so you make yourself a coin-purse.",13,300),
'Rstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou've been given the option of having the skin flogged off your back, or leaving town by sunset. You put on your best outfit and head into the forest, bound for the city which you always said you'd head for one day, Karrakara. Your purse is full of cowrie shells, the islands' most common currency, each one ill-gotten.",13,300),
'Tstart'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou're finally old enough to leave your home cave and make your way in the world. Your mother tearfully gives you a purse full of cowrie shells, the islands' most common currency. You kiss her goodbye and lumber off through the forest, headed for the great city of Karrakara.",13,300),
//Astart: assassins
'Astart'=> array ("no text",3,"Heroism",13,200,"Astart1"),
'Astart1'=> array ("<img src=\"http://www.apolitical.info/webgame/images/illuminatedy.jpg\" align=\"left\" alt=\"Y\">ou've killed many people and felt nothing. But for some reason you can't stop thinking about the way the man looked at you, just before his eyes glazed over. You know that a dead man's eyes don't really show an image of the last thing he saw, but you keep wondering, what if it did? When you start to plan how you could disinter the body, you realise that you have lost control. Taking only a few cowrie shells, the islands' most common currency, you leave your home city and buy a berth on a ship headed for Karrakara. If there are no answers in the great city, there are no answers anywhere.",10,20,"Astart2"),
'Astart2'=> array ("no text",8,40,1,"Astart3"),
'Astart3'=> array ("no text",13,271),
// 1-26: dwarves. Leads to 299.
1=> array ("You creep forward as quietly as you can. The light turns out to be a campfire. Three dwarves are sitting around the fire. They are bemoaning the fact that they don't have a hammer. One claims that if he had a hammer, he'd hammer in the morning. Another disagrees, and says that he'd hammer in the evening, all over this land.",16,9,"1a","1b"),
'1a'=> array ("In the half-light of the campfire, you are unable to see whether or not they are members of a clan hostile to your own - or worse yet, of your own clan.",1,"1b"),
'1b'=> array ("no text",2,4,"Attack the dwarves",23,"Announce yourself",3,"Try to steal something",4,"Leave",5),
2=> array ("You leap out of the dark with a cry.",1,12),
3=> array ("You step out the darkness and greet the dwarves with open palm.",16,9,"3a","3b"),
'3a'=> array ("no text",3,"Luck",15,"3c","3d"),
'3b'=> array ("They nod in acknowledgment and gesture for you to sit down. They share their bitter tea with you, but your lack of strong opinions on hammering means they mainly talk among themselves. Eventually they settle down to sleep.",2,3,"Settle down to sleep also",15,"Stay awake in case they make a hostile move",16,"Wait until they're asleep and try and steal something from their bag",26),
'3c'=> array ("You see that they're not from any nearby clan, and thus there's no danger of any feud.",1,"3b"),
'3d'=> array ("You see that they're members of a nearby clan, hostile to your own. Alas, if you told them you were outcast they'd be even more likely to kill you.",1,12),
4=> array ("no text",12,2,20,"Scouting","Roguery",11,14,13),
5=> array ("You decide to leave well enough alone, and move off into the dark",1,8),
6=> array ("You could probably beat one of the dwarves, but you soon realise you have no chance against them as a group. You take several flesh wounds before beating a retreat into the darkness.",9,"Stamina",-3,8),
7=> array ("You're no match for one of the dwarves, let alone three. Within minutes you have taken several flesh wounds. You beg for mercy. The dwarves kick you a few times, and then let you run into the darkness.",9,"Stamina",-6,8),
8=> array ("no text",3,"Scouting",20,21,22),
9=> array ("In the morning the dwarves share breakfast with you.",9,"Stamina",2,"9a"),
'9a'=> array ("no text",8,6,1,24),
10=> array ("no text",1,299),
11=> array ("You carefully circle around the dwarves' campfire. You are about to grab one of their packs when you hear the snap of a branch under your feet.",1,25),
12=> array ("no text",5,19,"12rod","12main"),
'12rod'=> array ("'Let me show you my staff - it's the biggest you've seen!' you cry.",3,"Luck",15,"12rods","12rodf"),
'12rods'=> array ("The dwarves roll around on the ground, occassionally managing to gasp <i>big staff!</i>, as you grab a bag and run into the night.",1,"13a"),
'12rodf'=> array ("Sadly, due to a difference in dialect the dwarves misunderstand you. 'How dare you insult my hammer! My hammer is both practical and attractive!' they cry, incoherent with rage.",1,7),
'12main'=> array ("The dwarves quickly grab their weapons and fan out, attacking you from three sides.",3,"Duelling",20,6,7),
13=> array ("You circle around the dwarves' campfire.You carefully reach down, and slowly and gently remove the nearest bag. The dwarves are engrossed in their hammer-time debate and do not notice you.",1,"13a"),
'13a'=> array ("You move some way into the forest before opening it. It contains a loaf of dwarf bread, which makes you realise you're starving. You wolf it down, then turn your attention back to the bag.",5,3,"13shells","13med"),
'13med'=> array ("You also find a finely-wrought medallion.",7,3,1,"13sleep"),
'13shells'=> array ("There are a few shells, but otherwise the bag is empty.",10,5,"13sleep"),
'13sleep'=> array ("You settle down at the base of a tree for a fitful sleep. Next morning you continue your journey.",1,299),
14=> array ("You carefully circle around the dwarves' campfire. You reach down to grab one of their packs, and hear one of them say 'you know we can see in the dark don't you?'",1,25),
15=> array ("no text",9,"Stamina",2,9),
16=> array ("You try and keep one eye open in case the dwarves try anything. You aren't sure whether you manage to stay awake all night, but nothing happens.",1,9),
17=> array ("no text",3,"Luck",15,18,19),
18=> array ("You wait until their breathing becomes regular, then carefully reach down, and slowly and gently pick up the nearest bag.",1,"13a"),
19=> array ("You wait until their breathing becomes regular, then carefully reach down for the nearest bag. A voice from behind you says 'I knew you were up to something'",1,12),
20=> array ("no text",9,"Heroism",-2,299),
21=> array ("You're able to contrive a reasonably safe and comfortable shelter, and settle down for the night.",13,301),
22=> array ("In the forest with no food or means to make a fire, you spend a miserable night with your back to a tree, one eye open and WEAPONNAME at the ready.",9,"Stamina",-3,10),
23=> array ("no text",8,7,1,2),
24=> array ("no text",6,65,"24a","24i"),
'24i'=> array ("no text",6,136,"24c","24b"),
'24a'=> array ("They point you in what they say is the quickest way out of the forest.",1,"Findroad"),
'24b'=> array ("They bid you farewell and you continue your journey.",1,299),
'24c'=> array ("They point you in what they say is the quickest way out of the forest.",1,"Overhill0"),
25=> array ("no text",8,7,1,12),
26=> array ("no text",8,7,1,17),
//30- : docking your boat at Karrakara -
30=> array ("The docks at Karrakara have ships from all over the known world, and sometimes beyond.",1,31),
31=> array ("The dockmistress tells you that the fee to dock here is four shells. You protest at this outrageous sum, and she tells you that this allows you to leave your boat here indefinitely. It occurs to you that you could sail to the swamps outside the city and find a deserted spot to hide your boat.",11,4,32,33),
32=> array ("no text",2,3,"Pay the fee",34,"Haggle",35,"Hide your boat in the swamp",36),
33=> array ("no text",2,2,"Haggle",35,"Hide your boat in the swamp",36),
34=> array ("You reluctantly hand over the shells and custody of your boat, and head into town.",10,-4,37),
35=> array ("no text",4,3,"35a","35b","35c"),
'35a'=> array ("no text",12,2,18,"Charisma","Streetwise",38,39,41),
'35b'=> array ("no text",12,2,18,"Seafaring","Streetwise",38,39,41),
'35c'=> array ("no text",12,2,18,"Charisma","Seafaring",38,39,41),
36=> array ("You sail to the swamps outside of Karrakara. Once you've found a sufficiently out-of-the-way spot, you secure your boat as best you can. The walk back is slow and unpleasant, but you forget your discomfort once you're back in the great city.",8,31,1,"36b"),
'36b'=> array ("no text",8,46,1,37),
37=> array ("no text",13,271),
38=> array ("Your negotiation quickly turns into an argument, which quickly turns into a shouting match. In the end the dockmistress refuses to have anything to do with you.",1,36),
39=> array ("She is unmoved by your skilful appeals to both reason and pity.",11,4,40,36),
40=> array ("no text",2,2,"Hand over the shells",34,"Hide your boat in the swamps",36),
41=> array ("no text",11,2,42,43),
42=> array ("Lowering her voice, the dockmistress tells you that she can charge you only two shells.",2,2,"Pay her",44,"Hide your boat in the swamps",36),
43=> array ("Lowering her voice, the dockmistress