bl791's picture
download
raw
153 kB
<html>
<head>
<title>Hercules</title>
</head>
<style>
a.sdMenu { font-family: verdana; font-size: 10pt; color: #3f3f9f; }
a.sdMenu2 { font-family: verdana; font-size: 8pt; color: #9f9f9f; }
td.sdMenu { background-color: #3f3f9f; border: 0; font-family: verdana; font-size: 10pt; color: #efefef; }
td.sdBanner { background-color: #3f3f9f; font-family: verdana; font-size: 10pt; color: #efefef; }
input.sdName { background-color: #3f3f9f; border: 0; font-family: verdana; font-size: 10pt; color: #ffffff; }
input.sdScore { background-color: #3f3f9f; border: 0; font-family: verdana; font-size: 10pt; color: #ffffbf; }
input.sdTurns { background-color: #3f3f9f; border: 0; font-family: verdana; font-size: 10pt; color: #ffffbf; }
td.sdRoom { background-color: #efefef; }
textarea.sdRoom { background-color: #efefef; border: 0; font-family: verdana; font-size: 10pt; color: #000000; }
td.sdLog { background-color: #efefef; }
textarea.sdLog { background-color: #efefef; border: 0; font-family: verdana; font-size: 10pt; color: #000000; }
td.sdAction { background-color: #efefef; font-family: verdana; font-size: 10pt; color: #000000; }
input.sdAction { background-color: #ffffff; border: 0; font-family: verdana; font-size: 10pt; color: #000000; }
input.sdOk { font-family: verdana; font-size: 10pt; color: #000000; width: 70; }
BODY.sdGame { background-color: #ffffff; margin: 0; font-family: verdana; font-size: 10pt; }
FONT.xx { font-family: verdana; font-size: 10pt; }
TD.xx { background-color: #ffffff; font-family: verdana; font-size: 10pt; }
TD.xx { background-color: #00007f; font-family: verdana; font-size: 10pt; }
THxx { background-color: #dfdfdf; font-family: verdana; font-size: 10pt; }
A.xx { color: #ffffff; }
</style>
<body class=sdGame onload="Page_onLoad();">
<center>
<table bgcolor=#cfcfcf border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td align=CENTER bgcolor=##3f3f9f colspan=2>
<font face=Verdana size=2 color=#ffffff>
Hercules First Labor by Robert Carl Brown (bob@sayyoho.com)
</td></tr>
<tr><td align=LEFT>
<nobr>
&nbsp;<a class=sdMenu onclick="if (window.confirm('Reset Game?')) { Game_Begin(); }; return false;" href="xx">New<a>&nbsp;
&nbsp;&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_ShowBitFlags(); return false;" href="xx">Show BitFlags<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_ShowCounters(); return false;" href="xx">Show Counters<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_ShowItems(); return false;" href="xx">Show Items<a>
<a class=sdMenu2 onclick="Game_ShowItemsX(); return false;" href="xx">X<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_ShowNounsX(); return false;" href="xx">Show Nouns<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_ShowVerbsX(); return false;" href="xx">Show Verbs<a>&nbsp;
&nbsp;&nbsp;
&nbsp;<a class=sdMenu2 onclick="Game_DebugOn(); return false;" href="xx">Debug On<a>
<a class=sdMenu2 onclick="Game_DebugOff(); return false;" href="xx">Off<a>&nbsp;
<!--
&nbsp;<a class=sdMenu2 onclick="Room_GoTo(8); Room_Refresh(); return false;" href="xx">R#8<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Room_GoTo(21); Room_Refresh(); return false;" href="xx">R#21<a>&nbsp;
&nbsp;<a class=sdMenu2 onclick="Room_GoTo(38); Room_Refresh(); return false;" href="xx">R#38<a>&nbsp;
-->
</nobr>
</td><td align=RIGHT>
<nobr>&nbsp;<a class=sdMenu onclick="Game_ExecuteCmdX('INVENTORY'); return false;" href="xx">Inventory<a>&nbsp;</nobr>
</td></tr>
</table>
&nbsp;<br />
<table border=1 bordercolor=#000000 cellpadding=1 cellspacing=1>
<form name="frmMain" action="" method="POST">
<!--
<tr><td class=sdBanner colspan=3>
<nobr>&nbsp;JavaScript Adventure Engine&nbsp;</nobr>
</td></tr>
-->
<tr><td class=sdBanner>
<nobr>&nbsp;<input type=TEXT name=txtName id=txtName class=sdName value="name" size=40>&nbsp;</nobr>
</td><td class=sdBanner width=20%>
<nobr>&nbsp;Score:&nbsp;<input type=TEXT name=txtScore id=txtScore class=sdScore value="xxx" size=5>&nbsp;</nobr>
</td><td class=sdBanner width=20%>
<nobr>&nbsp;Turns:&nbsp;<input type=TEXT name=txtTurns id=txtTurns class=sdTurns value="yyy" size=5>&nbsp;</nobr>
</td></tr>
<tr><td bgcolor=#dfdfff class=sdRoom colspan=3>
<textarea name=txtRoom id=txtRoom rows=7 cols=80 class=sdRoom></textarea>
</td></tr>
<tr><td bgcolor=#dfdfff class=sdLog colspan=3>
<textarea name=txtLog id=txtLog rows=16 cols=80 class=sdLog></textarea>
</td></tr>
<tr><td bgcolor=#dfdfff class=sdAction colspan=3><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class=sdAction>Tell me what to do?&nbsp;</td>
<td class=sdAction><input type=TEXT name=txtAction class=sdAction size=40
xonkeypress="window.status = ('onkeypress -> window.event.keyCode = ' + window.event.keyCode);"
xonkeypress="window.status = ('onkeypress -> window.event = ' + window.event);"
onkeypress="if (window.event.keyCode == 13) { Game_ExecuteCmd(); }"
></td>
<td class=sdAction>&nbsp;</td>
<td class=sdAction><input Xtype=SUBMIT type=BUTTON name="cmdOk" value="Ok" class=sdOk
onclick="Game_ExecuteCmd(); return false;" onsubmit="return false;"
></td>
</tr>
</table></td></tr>
</form>
</table>
</center>
<script language="JavaScript">
// Variables
// ---------
var miLogCount = 16;
</script>
<script language="JavaScript" xsrc="GameCode.js" >
//----------------------------------------------------------------------------------
// (GameCode.js)
//----------------------------------------------------------------------------------
// Copyright 2003 by Snowdog Software, llc
//----------------------------------------------------------------------------------
var msCommand = '';
var mbCommand73 = false;
var miCounterIndex = 0;
var mbDarkness = false;
var mbDebug = false;
var msExecute = ''
var miLogIndex = 0;
var msLog = new Array(miLogCount);
var msNoun = '';
var miNoun = 0;
var miParam = new Array(5);
var miParamCount = 0;
var miParamIndex = 0;
var msVerb = '';
var miVerb = 0;
var miRoomIndex = 0;
var miTurnCount = 0;
//----------------------------------------------------------------------------------
// BitFlag Functions
//----------------------------------------------------------------------------------
function BitFlag_Clear(piBitFlag) {
if ((piBitFlag >=0) && (piBitFlag < miBitFlagCount)) {
mbBitFlag[piBitFlag] = false;
return true;
}
else {
Log_Post('*** BitFlag_Clear(' + piBitFlag + ') --> Index Out of Bounds');
return false;
}
}
function BitFlag_Get(piBitFlag) {
if ((piBitFlag >=0) && (piBitFlag < miBitFlagCount)) {
return mbBitFlag[piBitFlag];
}
else {
Log_Post('*** BitFlag_Get(' + piBitFlag + ') --> Index Out of Bounds');
return false;
}
}
function BitFlag_Set(piBitFlag) {
if ((piBitFlag >=0) && (piBitFlag < miBitFlagCount)) {
mbBitFlag[piBitFlag] = true;
return true;
}
else {
Log_Post('*** BitFlag_Set(' + piBitFlag + ') --> Index Out of Bounds');
return false;
}
}
//----------------------------------------------------------------------------------
// Counter Functions
//----------------------------------------------------------------------------------
function Counter_Add(piCounter, piAdd) {
if ((piCounter >=0) && (piCounter < miCounterCount)) {
miCounter[piCounter] += piAdd;
return true;
}
else {
Log_Post('*** Counter_Add(' + piCounter + ', ...) --> Index Out of Bounds');
return false;
}
}
function Counter_Clear(piCounter) {
if ((piCounter >=0) && (piCounter < miCounterCount)) {
miCounter[piCounter] = 0;
return true;
}
else {
Log_Post('*** Counter_Clear(' + piCounter + ') --> Index Out of Bounds');
return false;
}
}
function Counter_Get(piCounter) {
if ((piCounter >=0) && (piCounter < miCounterCount)) {
return miCounter[piCounter];
}
else {
Log_Post('*** Counter_Get(' + piCounter + ') --> Index Out of Bounds');
return 0;
}
}
//----------------------------------------------------------------------------------
// Game Functions
//----------------------------------------------------------------------------------
// Game_Begin()
// Game_CommandParse()
// Game_DebugOff()
// Game_DebugOn()
// Game_Execute(psCommand)
//----------------------------------------------------------------------------------
function Game_Begin() {
miRoomIndex = miRoomInit;
miTurnCount = 0;
// BitFlag
// -------
for (var iBitFlag=0; (iBitFlag < miBitFlagCount); iBitFlag++) {
BitFlag_Clear(iBitFlag);
}
// Counter
// -------
for (var iCounter=0; (iCounter < miCounterCount); iCounter++) {
Counter_Clear(iCounter);
}
miCounterIndex = 0;
// Item
// ----
for (var iItem=0; (iItem < miItemCount); iItem++) {
Item_Begin(iItem);
}
Log_Clear();
Room_Refresh();
Game_ExecuteVN(0,0);
Room_Refresh();
}
function Game_CommandParse() {
var sCommand = sdTrim(msCommand);
var iInStr = sdInStr(sCommand, ' ');
if (iInStr > 0) {
msVerb = sdTrim(sdLeft(sCommand, iInStr-1))
msNoun = sdTrim(sdMid(sCommand, iInStr+1))
}
else {
msVerb = sCommand
msNoun = '';
}
miVerb = Verb_Lookup(msVerb);
miNoun = Noun_Lookup(msNoun);
}
function Game_DebugOff() {
mbDebug = false;
}
function Game_DebugOn() {
mbDebug = true;
}
function Game_Execute(psCommand) {
var sCommand = sdTrim(psCommand);
var sCompass = '~N~S~E~W~U~D~NORTH~SOUTH~EAST~WEST~UP~DOWN~';
if (sCompass.indexOf('~' + sdUCase(sCommand) + '~') > -1) {
msCommand = ('GO ' + sCommand);
}
else if (sdUCase(sCommand) == 'I') {
msCommand = 'INVENTORY';
}
else {
msCommand = sCommand;
}
Game_CommandParse();
miTurnCount++;
msExecute = ''
Log_Clear();
Log_Post('--> ' + sCommand);
if (miVerb == 0) {
Log_Post('"' + msVerb + '" is a word I don\'t know...sorry! ');
}
else if ((miNoun == 0) && (msNoun > '')) {
Log_Post('What ?! ');
}
else if ((miVerb == 1) && (miNoun == 1) && (Room_ExitN(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitN(miRoomIndex));
}
else if ((miVerb == 1) && (miNoun == 2) && (Room_ExitS(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitS(miRoomIndex));
}
else if ((miVerb == 1) && (miNoun == 3) && (Room_ExitE(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitE(miRoomIndex));
}
else if ((miVerb == 1) && (miNoun == 4) && (Room_ExitW(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitW(miRoomIndex));
}
else if ((miVerb == 1) && (miNoun == 5) && (Room_ExitU(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitU(miRoomIndex));
}
else if ((miVerb == 1) && (miNoun == 6) && (Room_ExitD(miRoomIndex) > 0)) {
Room_GoTo(Room_ExitD(miRoomIndex));
}
else {
Game_ExecuteVN(miVerb, miNoun);
}
Game_ExecuteVN(0, 0);
// Log_Post('--> [' + msExecute + ']');
}
function Game_ExecuteAction(piAction) {
var iItem1 = 0;
var iItem2 = 0;
var iRoom = 0;
if (piAction == 0) {
// CONTINUE
}
else if ((piAction > 0) && (piAction < 52)) {
Log_Post(Message_Get(piAction));
}
else if ((piAction > 101) && (piAction < 151)) {
Log_Post(Message_Get(piAction-50));
}
else {
switch (piAction) {
case 52: // Get Item <arg-i>
Item_Get(Param_Get());
break;
case 53: // Drop Item <arg-i>
Item_Drop(Param_Get());
break;
case 54: // Go To Room <arg-r>
Room_GoTo(Param_Get());
break;
case 55: // Kill Item <arg-i>
Item_Kill(Param_Get());
break;
case 56:
mbDarkness = true;
break;
case 57:
mbDarkness = false;
break;
case 58: // bit flag <arg-b> set
BitFlag_Set(Param_Get());
break;
case 59: // Kill Item <arg-i>
Item_Kill(Param_Get());
break;
case 60: // bit flag <arg-b> clear
BitFlag_Clear(Param_Get());
break;
case 62:
Item_Send(Param_Get(), Param_Get());
break;
case 63:
Log_Post('THE END - You Won');
break;
case 64:
Log_Post(Room_Text(miRoomIndex));
break;
case 65: // Score
{
var iCount = 0;
// Log_Post('You have Stored');
Log_Post(msScorePrompt);
for (var iItem=0; (iItem < miItemCount); iItem++) {
if ((miItemRoom[iItem] == miRoomTreasure) && Item_IsTreasure(iItem)) {
Log_Post(' ' + Item_Name(iItem));
iCount++;
}
};
if (iCount == 0) {
Log_Post(' NOTHING');
}
Log_Post('Your score is ' + Game_Score() + '.');
};
break;
case 66: // Inventory
{
var iCount = 0;
Log_Post('You are Carrying');
for (var iItem=0; (iItem < miItemCount); iItem++) {
if (miItemRoom[iItem] == -1) {
if (mbDebug) {
Log_Post(' ' + Item_Name(iItem) + ' (I#' + iItem + ')');
}
else {
Log_Post(' ' + Item_Name(iItem));
}
iCount++;
}
};
if (iCount == 0) {
Log_Post(' NOTHING');
}
};
break;
case 67: // Bit Flag 0 Set
BitFlag_Set(0);
break;
case 68: // Bit Flag 0 Clear
BitFlag_Clear(0);
break;
case 70: // Clear Screen
Log_Clear();
break;
case 71: // Save Game
Log_Post('**** Command 71 **** - Save Game');
break;
case 72: // Item Swap <arg-i> <arg-i>
Item_Swap(Param_Get(), Param_Get());
break;
case 73: // Continue
mbCommand73 = true;
break;
case 74: // Get Item <arg-i>
Item_Get(Param_Get());
break;
case 75: // Get Item <arg-i>
Item_SendItem(Param_Get(), Param_Get());
break;
case 76:
Log_Post(Room_Text(miRoomIndex));
break;
case 84:
Log_Post(msNoun);
break;
case 85:
Log_Post(msNoun);
break;
case 86:
Log_Post(' ');
break;
case 88:
// TODO: Add Pause
// Log_Post('**** Command 88 **** - Wait 2 Seconds');
break;
default:
Log_Post('**** Command ' + piAction + ' ****');
}
}
}
function Game_ExecuteCond(piCond, piCondArg) {
var lbSuccess = true;
switch (piCond) {
case 0:
Param_Add(piCondArg);
break;
case 1:
lbSuccess = Item_IsCarried(piCondArg);
break;
case 2:
lbSuccess = Item_IsInRoom(piCondArg);
break;
case 3:
lbSuccess = (Item_IsCarried(piCondArg) || Item_IsInRoom(piCondArg));
break;
case 4:
lbSuccess = (miRoomIndex == piCondArg);
break;
case 5:
lbSuccess = (!Item_IsInRoom(piCondArg));
break;
case 6:
lbSuccess = (!Item_IsCarried(piCondArg));
break;
case 7:
lbSuccess = (miRoomIndex != piCondArg);
break;
case 8:
lbSuccess = BitFlag_Get(piCondArg);
break;
case 9:
lbSuccess = (!BitFlag_Get(piCondArg));
break;
case 10:
lbSuccess = (Game_InventoryCount() > 0);
break;
case 11:
lbSuccess = (Game_InventoryCount() == 0);
break;
case 12:
lbSuccess = (!(Item_IsCarried(piCondArg) || Item_IsInRoom(piCondArg)));
break;
case 13:
lbSuccess = (!Item_IsInRoom0(piCondArg));
break;
case 14:
lbSuccess = Item_IsInRoom0(piCondArg);
break;
case 15:
lbSuccess = (Counter_Get(miCounterIndex) <= piCondArg);
break;
case 16:
lbSuccess = (Counter_Get(miCounterIndex) >= piCondArg);
break;
case 17:
lbSuccess = Item_IsInRoomInit(piCondArg);
break;
case 18:
lbSuccess = (!Item_IsInRoomInit(piCondArg));
break;
case 19:
miCounterIndex = piCondArg;
break;
default:
Log_Post('**** Condition ' + piCond + ' ****');
lbSuccess = false;
}
// if (!lbSuccess) {
// msExecute += (' [' + piCond + ',' + piCondArg + ']');
// }
return lbSuccess;
}
function Game_ExecuteVN(piVerb, piNoun) {
var bAuto = false;
var iItem = Item_Lookup(msNoun);
if (mbDebug) {
Log_Post('ExecuteVN(' + piVerb + ', ' + piNoun + ')');
}
if ((piVerb == 10) && (iItem > 0)) {
// AutoGet
// -------
if (miItemRoom[iItem] == miRoomIndex) {
miItemRoom[iItem] = -1
Log_Post('OK');
}
else if (miItemRoom[iItem] == -1) {
Log_Post('You\'re already holding that.');
}
else {
Log_Post('I don\'t see that here.');
}
bAuto = true;
}
else if ((piVerb == 18) && (iItem > 0)) {
// AutoDrop
// --------
if (miItemRoom[iItem] == -1) {
miItemRoom[iItem] = miRoomIndex
Log_Post('OK');
}
else {
Log_Post('You\'re not holding that.');
}
bAuto = true;
}
// Process Scripts
// ---------------
var bStop = false;
for (var iScript=0; ((iScript < miScriptCount) && (!bStop)); iScript++) {
var bActionExec = false;
var bMaybeStop = false;
window.status = ('Game_ExecuteVN... Script ' + iScript + '...');
// Match ???
// ---------
if (Script_Verb(iScript) == 0) {
if (Script_Noun(iScript) == 100) {
bActionExec = true;
}
else if ((Script_Noun(iScript) == 0) && mbCommand73) {
mbCommand73 = false;
bActionExec = true;
bMaybeStop = true;
}
else {
// Random
// ------
bActionExec = ((Math.random() * 100) < Script_Noun(iScript));
}
}
else {
if ((Script_Verb(iScript) == piVerb) && (piVerb > 0)) {
if (Script_Noun(iScript) == piNoun) {
bActionExec = true;
bMaybeStop = true;
}
else if (Script_Noun(iScript) == 0) {
bActionExec = true;
bMaybeStop = true;
}
}
}
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ...');
// Execute Conditionally
// ---------------------
if (bActionExec) {
var bContinue = true;
Param_Clear();
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ...');
// msExecute += (' ?' + iScript + '?');
for (var iCond=1; ((iCond < 6) && (bContinue)); iCond++) {
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ' + iCond + ', ' + Script_Cond(iScript, iCond) + ', ' + Script_CondArg(iScript, iCond));
bContinue = bContinue && Game_ExecuteCond(Script_Cond(iScript, iCond), Script_CondArg(iScript, iCond));
// if (bContinue) {
// msExecute += (iCond + '(' + Script_Cond(iScript, iCond) + ',' + Script_CondArg(iScript, iCond) + ')');
// }
}
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ...');
if (bContinue) {
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ... .');
if (bMaybeStop) {
bStop = true;
}
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ... ...');
for (var iAction=1; (iAction < 5); iAction++) {
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ... ... ' + iAction + ' ... ' + Script_Action(iScript, iAction));
if (Script_Action(iScript, iAction) > 0) {
// msExecute += ' Action(' + Script_Action(iScript, iAction) + ')';
Game_ExecuteAction(Script_Action(iScript, iAction));
}
}
// window.status = ('Game_ExecuteVN... Script ' + iScript + '... ... ... ... ... ...');
}
}
if (bStop && mbCommand73) {
bStop = false;
}
}
// if ((iScript == miScriptCount) && (!bStop) && (piVerb > 0) && (!bAuto)) {
if ((iScript == miScriptCount) && (!bStop) && (piVerb > 0) && (!bAuto)) {
Log_Post('It\'s beyond my power to do that.');
// Log_Post(' iScript=' + iScript + ', piVerb=' + piVerb);
}
}
function Game_InventoryCount() {
var iCount = 0;
for (var iItem=0; (iItem < miItemCount); iItem++) {
if (miItemRoom[iItem] == -1) iCount++;
}
return iCount;
}
function Game_Score() {
var iCount = 0;
var iTotal = 0;
for (var iItem=0; (iItem < miItemCount); iItem++) {
if (Item_IsTreasure(iItem)) {
iTotal++;
if (miItemRoom[iItem] == miRoomTreasure) {
iCount++;
}
}
}
if (iTotal > 0) {
return Math.floor((100 * iCount) / iTotal);
}
else {
return (-1);
}
}
//----------------------------------------------------------------------------------
// Item Functions
//----------------------------------------------------------------------------------
function Item_Begin(piItem) {
if ((piItem >=0) && (piItem < miItemCount)) {
miItemRoom[piItem] = Item_RoomInit(piItem);
return true;
}
else {
Log_Post('*** Item_Begin(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_Drop(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
miItemRoom[piItem] = miRoomIndex;
}
else {
Log_Post('*** Item_Drop(' + piItem + ') --> Index Out of Bounds');
}
}
function Item_Get(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
miItemRoom[piItem] = -1;
}
else {
Log_Post('*** Item_Get(' + piItem + ') --> Index Out of Bounds');
}
}
function Item_IsCarried(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
return (miItemRoom[piItem] == -1);
}
else {
Log_Post('*** Item_IsCarried(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_IsInRoom(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
return (miItemRoom[piItem] == miRoomIndex);
}
else {
Log_Post('*** Item_IsInRoom(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_IsInRoomInit(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
return (miItemRoom[piItem] == Item_RoomInit(piItem));
}
else {
Log_Post('*** Item_IsInRoomInit(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_IsInRoom0(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
return (miItemRoom[piItem] == 0);
}
else {
Log_Post('*** Item_IsInRoom0(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_IsTreasure(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
if (sdLeft(Item_Name(piItem), 1) == '*') {
return true;
}
else {
return false;
}
}
else {
Log_Post('*** Item_IsTreasure(' + piItem + ') --> Index Out of Bounds');
return false;
}
}
function Item_Kill(piItem) {
if ((piItem >= 0) && (piItem < miItemCount)) {
miItemRoom[piItem] = 0;
}
else {
Log_Post('*** Item_Kill(' + piItem + ') --> Index Out of Bounds');
}
}
function Item_Lookup(psItem) {
var iItem = 0;
var sItem = sdLeft(sdUCase(psItem), miWordLength);
for (var iIndex=0; (iIndex < miItemCount); iIndex++) {
if (sItem == Item_NameShort(iIndex)) {
if ((miItemRoom[iIndex] == -1) || (miItemRoom[iIndex] == miRoomIndex)) {
iItem = iIndex;
iIndex = miVerbCount;
}
}
}
return iItem;
}
function Item_Send(piItem, piRoom) {
if ((piItem >= 0) && (piItem < miItemCount)) {
miItemRoom[piItem] = piRoom;
}
else {
Log_Post('*** Item_Send(' + piItem + ', ' + piRoom + ') --> Index Out of Bounds');
}
}
function Item_Swap(piItem1, piItem2) {
if (((piItem1 >= 0) && (piItem1 < miItemCount)) &&
((piItem2 >= 0) && (piItem2 < miItemCount))) {
var iRoom = miItemRoom[piItem1];
miItemRoom[piItem1] = miItemRoom[piItem2];
miItemRoom[piItem2] = iRoom;
}
else {
Log_Post('*** Item_Swap(' + piItem1 + ', ' + piItem2 + ') --> Index Out of Bounds');
}
}
//----------------------------------------------------------------------------------
// Log Functions
//----------------------------------------------------------------------------------
function Log_Clear() {
miLogIndex = 0
for (var iLog=0; (iLog < miLogCount); iLog++) {
// msLog[iLog] = 'msLog[' + iLog + ']';
msLog[iLog] = '';
}
Log_Refresh();
}
function Log_Post(psMsg) {
var sMsg = psMsg;
if (sMsg == '') {
Log_Post1(sMsg);
}
else {
for (var iInStr = sdInStr(sMsg, '\n'); (iInStr > 0); iInStr = sdInStr(sMsg, '\n')) {
Log_Post1(sdLeft(sMsg, iInStr-1));
sMsg = sdMid(sMsg, (iInStr+1));
}
if (sMsg == '') {
// CONTINUE
}
else {
Log_Post1(sMsg);
}
}
}
function Log_Post1(psMsg) {
if (miLogIndex < miLogCount) {
msLog[miLogIndex++] = psMsg;
}
else {
for (var iLog=0; (iLog < (miLogCount-1)); iLog++) {
msLog[iLog] = msLog[iLog+1];
}
msLog[miLogCount-1] = psMsg;
}
Log_Refresh();
}
function Log_Refresh() {
var sLog = '';
for (var iLog=0; (iLog < miLogCount); iLog++) {
sLog += msLog[iLog] + '\n';
}
document.frmMain.txtLog.value = sLog;
}
//----------------------------------------------------------------------------------
// Noun Functions
//----------------------------------------------------------------------------------
function Noun_Lookup(psNoun) {
var iLast = -1;
var iNoun = 0;
var sNoun = sdUCase(psNoun);
if ((sNoun == 'N') || (sNoun == 'NORTH')) {
iNoun = 1;
}
else if ((sNoun == 'S') || (sNoun == 'SOUTH')) {
iNoun = 2;
}
else if ((sNoun == 'E') || (sNoun == 'EAST')) {
iNoun = 3;
}
else if ((sNoun == 'W') || (sNoun == 'WEST')) {
iNoun = 4;
}
else if ((sNoun == 'U') || (sNoun == 'UP')) {
iNoun = 5;
}
else if ((sNoun == 'D') || (sNoun == 'DOWN')) {
iNoun = 6;
}
else {
sNoun = sdLeft(sNoun, miWordLength);
for (var iIndex=0; (iIndex < miNounCount); iIndex++) {
sWord = Noun_Short(iIndex);
if (sdLeft(sWord, 1) == '*') {
if (sNoun == sdMid(sWord, 2)) {
iNoun = iLast;
iIndex = miNounCount;
}
}
else {
iLast = iIndex;
if (sNoun == sWord) {
iNoun = iIndex;
iIndex = miNounCount;
}
}
}
}
return iNoun;
}
//----------------------------------------------------------------------------------
// Param Functions
//----------------------------------------------------------------------------------
function Param_Add(piParam) {
miParam[miParamCount++] = piParam;
}
function Param_Clear() {
miParamCount = 0;
miParamIndex = 0;
}
function Param_Get() {
if (miParamIndex >= miParamCount) {
Log_Post('*** Param_Get() --> Out of Parameters');
return 0;
}
else {
return miParam[miParamIndex++];
}
}
//----------------------------------------------------------------------------------
// Room Functions
//----------------------------------------------------------------------------------
function Room_GoTo(piRoom) {
miRoomIndex = piRoom;
}
function Room_Refresh() {
var sExits = '';
var sText = '';
var sYouSee = '';
// Exits
// -----
if (Room_ExitN(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'North';
}
if (Room_ExitS(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'South';
}
if (Room_ExitE(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'East';
}
if (Room_ExitW(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'West';
}
if (Room_ExitU(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'Up';
}
if (Room_ExitD(miRoomIndex) > 0) {
if (sExits > '') sExits += ', ';
sExits += 'Down';
}
if (sExits == '') sExits = 'none';
// You See
// -------
for (var iItem=0; (iItem < miItemCount); iItem++) {
if (miItemRoom[iItem] == miRoomIndex) {
// if (sYouSee > '') sYouSee += ', ';
if (sYouSee > '') sYouSee += ' - ';
sYouSee += Item_Name(iItem);
}
}
if (sYouSee == '') sYouSee = 'nothing of interest';
sText = Room_TextPretty(miRoomIndex) + '\n\nObvious exits: ' + sExits + '.\nI can also see: ' + sYouSee;
document.frmMain.txtTurns.value = (miTurnCount + '');
document.frmMain.txtScore.value = Game_Score();
document.frmMain.txtRoom.value = sText;
}
function Room_TextPretty(piRoom) {
var sText;
sText = (Room_Text(piRoom) + '');
if (sText.substr(0,1) == '*') {
sText = sText.substr(1);
}
else {
sText = ('I\'m in a ' + sText);
}
if (mbDebug) {
sText += (' (R#' + piRoom + ')');
}
return sText;
}
//----------------------------------------------------------------------------------
// Verb Functions
//----------------------------------------------------------------------------------
function Verb_Lookup(psVerb) {
var iLast = -1;
var iVerb = 0;
var sVerb = sdUCase(psVerb);
sVerb = sdLeft(sVerb, miWordLength);
for (var iIndex=0; (iIndex < miVerbCount); iIndex++) {
sWord = Verb_Short(iIndex);
if (sdLeft(sWord, 1) == '*') {
if (sVerb == sdMid(sWord, 2)) {
iVerb = iLast;
iIndex = miVerbCount;
}
}
else {
iLast = iIndex;
if (sVerb == sWord) {
iVerb = iIndex;
iIndex = miVerbCount;
}
}
}
return iVerb;
}
</script>
<script language="JavaScript" xsrc="GameCodeX.js">
//----------------------------------------------------------------------------------
// (GameCodeX.js)
//----------------------------------------------------------------------------------
//
// Functions
// ---------
// Game_ShowBitFlags()
// Game_ShowCounters()
//
//----------------------------------------------------------------------------------
function Game_ShowBitFlags() {
var sLog = '';
for (var iBitFlag=0; (iBitFlag < miBitFlagCount); ) {
sLog = '';
for (var iCol=0; (iCol < 4); iCol++) {
if (iBitFlag < miBitFlagCount) {
sLog += ('BitFlag[' + sdFmtInt2(iBitFlag) + ']=' + sdFmtBit(BitFlag_Get(iBitFlag)) + ' ');
iBitFlag++;
}
}
Log_Post(sLog);
}
}
function Game_ShowCounters() {
var sLog = '';
for (var iCounter=0; (iCounter < miCounterCount); ) {
sLog = '';
for (var iCol=0; (iCol < 3); iCol++) {
if (iCounter < miCounterCount) {
sLog += ('Counter[' + sdFmtInt2(iCounter) + ']=' + Counter_Get(iCounter) + ' ');
iCounter++;
}
}
Log_Post(sLog);
}
}
function Game_ShowItems() {
var sLog = '';
for (var iItem=0; (iItem < miItemCount); ) {
sLog = '';
for (var iCol=0; (iCol < 3); iCol++) {
if (iItem < miItemCount) {
sLog += ('miItemRoom[' + sdFmtInt2(iItem) + ']=' + sdFmtInt2(miItemRoom[iItem]) + ' ');
iItem++;
}
}
Log_Post(sLog);
}
}
var miItemIndexX = 0
function Game_ShowItemsX() {
for (var iRow=0; (iRow < miLogCount); iRow++) {
if (miItemIndexX < miItemCount) {
Log_Post('Item[' + sdFmtInt2(miItemIndexX) + '] : Init=' + sdFmtInt2(Item_RoomInit(miItemIndexX)) + ', Room=' + sdFmtInt2(miItemRoom[miItemIndexX]) + ', NameShort=' + Item_NameShort(miItemIndexX) + ', Name=' + Item_Name(miItemIndexX));
miItemIndexX++;
}
}
if (miItemIndexX >= miItemCount) {
miItemIndexX = 0;
}
}
var miNounIndexX = 0
function Game_ShowNounsX() {
for (var iRow=0; (iRow < miLogCount); iRow++) {
var sLog = '';
for (var bCont=true; (bCont); ) {
if (miNounIndexX < miNounCount) {
if (sLog == '') {
sLog = 'Noun[' + sdFmtInt2(miNounIndexX) + '] : ' + Noun_Pretty(miNounIndexX);
}
else {
sLog += ', ' + Noun_Pretty(miNounIndexX);
}
miNounIndexX++;
}
bCont = Noun_IsCont(miNounIndexX);
}
Log_Post(sLog);
}
if (miNounIndexX >= miNounCount) {
miNounIndexX = 0;
}
}
var miVerbIndexX = 0
function Game_ShowVerbsX() {
for (var iRow=0; (iRow < miLogCount); iRow++) {
var sLog = '';
for (var bCont=true; (bCont); ) {
if (miVerbIndexX < miVerbCount) {
if (sLog == '') {
sLog = 'Verb[' + sdFmtInt2(miVerbIndexX) + '] : ' + Verb_Pretty(miVerbIndexX);
}
else {
sLog += ', ' + Verb_Pretty(miVerbIndexX);
}
miVerbIndexX++;
}
bCont = Verb_IsCont(miVerbIndexX);
}
Log_Post(sLog);
}
if (miVerbIndexX >= miVerbCount) {
miVerbIndexX = 0;
}
}
function Noun_IsCont(piNoun) {
if ((piNoun >= 0) && (piNoun < miNounCount)) {
if (sdLeft(Noun_Short(piNoun), 1) == '*') {
return true;
}
}
else if (piNoun == miNounCount) {
}
else {
Log_Post('*** Noun_IsCont(' + piNoun + ') --> Index Out of Bounds');
}
return false;
}
function Noun_Pretty(piNoun) {
var sText = ('?' + piNoun + '?');
if ((piNoun >= 0) && (piNoun < miNounCount)) {
sText = Noun_Text(piNoun);
if (sText == '') {
sText = Noun_Short(piNoun);
}
if (sText == '') {
sText = ('?' + piNoun + '?');
}
}
else {
Log_Post('*** Noun_Pretty(' + piNoun + ') --> Index Out of Bounds');
}
return(sText);
}
function Verb_IsCont(piVerb) {
if ((piVerb >= 0) && (piVerb < miVerbCount)) {
if (sdLeft(Verb_Short(piVerb), 1) == '*') {
return true;
}
}
else if (piVerb == miVerbCount) {
}
else {
Log_Post('*** Verb_IsCont(' + piVerb + ') --> Index Out of Bounds');
}
return false;
}
function Verb_Pretty(piVerb) {
var sText = ('?' + piVerb + '?');
if ((piVerb >= 0) && (piVerb < miVerbCount)) {
sText = Verb_Text(piVerb);
if (sText == '') {
sText = Verb_Short(piVerb);
}
if (sText == '') {
sText = ('?' + piVerb + '?');
}
}
else {
Log_Post('*** Verb_Pretty(' + piVerb + ') --> Index Out of Bounds');
}
return(sText);
}
//----------------------------------------------------------------------------------
// (GameCodeX.js)
//----------------------------------------------------------------------------------
</script>
<script language="JavaScript" xsrc="GameData.js" >
//----------------------------------------------------------------------------------
// (GameData.js)
//----------------------------------------------------------------------------------
// Generated: Sep 27, 2003 18:33
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// Constants
//----------------------------------------------------------------------------------
var miAdvNumber = 101;
var msAdvTitle = 'Hercules First Labor';
var miAdvNumber = 101;
var miInventoryMax = 7;
var miMagicNumber = 123;
var miRoomInit = 2;
var miRoomTreasure = 51;
var msScorePrompt = 'You have accomplished';
var miTreasureCount = 7;
var miVersion = 2;
var miWordLength = 3;
//----------------------------------------------------------------------------------
// Variables
//----------------------------------------------------------------------------------
var mbBitFlag = new Array(20);
var miBitFlagCount = 20;
var miCounter = new Array(8);
var miCounterCount = 8;
var miItemRoom = new Array(58);
var miItemCount = 58;
var miMessageCount = 96;
var miNounCount = 51;
var miRoomCount = 52;
var miScriptCount = 133;
var miVerbCount = 75;
//----------------------------------------------------------------------------------
// Script Data Functions
//----------------------------------------------------------------------------------
// Script_Action(piScript, piAction) int
// Script_Cond(piScript, piCond) int
// Script_CondArd(piScript, piCond) int
// Script_Noun(piScript) int
// Script_Verb(piScript) int
//----------------------------------------------------------------------------------
function Script_Action(piScript, piAction) {
var iAction = 0;
switch (piScript) {
case 0:
switch (piAction) {
case 1: iAction = 2; break;
case 2: iAction = 53; break;
}
break;
case 1:
switch (piAction) {
case 1: iAction = 4; break;
}
break;
case 2:
switch (piAction) {
case 1: iAction = 3; break;
}
break;
case 3:
switch (piAction) {
case 1: iAction = 6; break;
case 2: iAction = 88; break;
case 3: iAction = 53; break;
case 4: iAction = 73; break;
}
break;
case 4:
switch (piAction) {
case 1: iAction = 54; break;
case 2: iAction = 7; break;
}
break;
case 5:
switch (piAction) {
case 1: iAction = 5; break;
}
break;
case 6:
switch (piAction) {
case 1: iAction = 8; break;
case 2: iAction = 9; break;
case 3: iAction = 62; break;
}
break;
case 7:
switch (piAction) {
case 1: iAction = 8; break;
}
break;
case 8:
switch (piAction) {
case 1: iAction = 66; break;
}
break;
case 9:
switch (piAction) {
case 1: iAction = 10; break;
}
break;
case 10:
switch (piAction) {
case 1: iAction = 11; break;
}
break;
case 11:
switch (piAction) {
case 1: iAction = 13; break;
case 2: iAction = 62; break;
}
break;
case 12:
switch (piAction) {
case 1: iAction = 14; break;
case 2: iAction = 62; break;
}
break;
case 13:
switch (piAction) {
case 1: iAction = 14; break;
case 2: iAction = 62; break;
}
break;
case 14:
switch (piAction) {
case 1: iAction = 15; break;
}
break;
case 15:
switch (piAction) {
case 1: iAction = 16; break;
case 2: iAction = 58; break;
case 3: iAction = 55; break;
case 4: iAction = 73; break;
}
break;
case 16:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 17:
switch (piAction) {
case 1: iAction = 17; break;
}
break;
case 18:
switch (piAction) {
case 1: iAction = 16; break;
case 2: iAction = 58; break;
case 3: iAction = 55; break;
case 4: iAction = 73; break;
}
break;
case 19:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 20:
switch (piAction) {
case 1: iAction = 19; break;
case 2: iAction = 54; break;
}
break;
case 21:
switch (piAction) {
case 1: iAction = 19; break;
case 2: iAction = 54; break;
}
break;
case 22:
switch (piAction) {
case 1: iAction = 20; break;
case 2: iAction = 62; break;
}
break;
case 23:
switch (piAction) {
case 1: iAction = 20; break;
}
break;
case 24:
switch (piAction) {
case 1: iAction = 21; break;
}
break;
case 25:
switch (piAction) {
case 1: iAction = 22; break;
case 2: iAction = 58; break;
}
break;
case 26:
switch (piAction) {
case 1: iAction = 23; break;
case 2: iAction = 58; break;
}
break;
case 27:
switch (piAction) {
case 1: iAction = 60; break;
case 2: iAction = 60; break;
}
break;
case 28:
switch (piAction) {
case 1: iAction = 25; break;
case 2: iAction = 52; break;
}
break;
case 29:
switch (piAction) {
case 1: iAction = 24; break;
}
break;
case 30:
switch (piAction) {
case 1: iAction = 27; break;
}
break;
case 31:
switch (piAction) {
case 1: iAction = 26; break;
}
break;
case 32:
switch (piAction) {
case 1: iAction = 28; break;
case 2: iAction = 55; break;
case 3: iAction = 55; break;
case 4: iAction = 74; break;
}
break;
case 33:
switch (piAction) {
case 1: iAction = 29; break;
}
break;
case 34:
switch (piAction) {
case 1: iAction = 30; break;
}
break;
case 35:
switch (piAction) {
case 1: iAction = 34; break;
case 2: iAction = 58; break;
}
break;
case 36:
switch (piAction) {
case 1: iAction = 35; break;
}
break;
case 37:
switch (piAction) {
case 1: iAction = 31; break;
case 2: iAction = 58; break;
}
break;
case 38:
switch (piAction) {
case 1: iAction = 60; break;
}
break;
case 39:
switch (piAction) {
case 1: iAction = 32; break;
case 2: iAction = 54; break;
}
break;
case 40:
switch (piAction) {
case 1: iAction = 37; break;
}
break;
case 41:
switch (piAction) {
case 1: iAction = 138; break;
}
break;
case 42:
switch (piAction) {
case 1: iAction = 139; break;
}
break;
case 43:
switch (piAction) {
case 1: iAction = 39; break;
}
break;
case 44:
switch (piAction) {
case 1: iAction = 40; break;
}
break;
case 45:
switch (piAction) {
case 1: iAction = 41; break;
}
break;
case 46:
switch (piAction) {
case 1: iAction = 42; break;
case 2: iAction = 62; break;
}
break;
case 47:
switch (piAction) {
case 1: iAction = 42; break;
}
break;
case 48:
switch (piAction) {
case 1: iAction = 43; break;
case 2: iAction = 62; break;
}
break;
case 49:
switch (piAction) {
case 1: iAction = 43; break;
}
break;
case 50:
switch (piAction) {
case 1: iAction = 44; break;
case 2: iAction = 45; break;
case 3: iAction = 62; break;
}
break;
case 51:
switch (piAction) {
case 1: iAction = 44; break;
}
break;
case 52:
switch (piAction) {
case 1: iAction = 46; break;
}
break;
case 53:
switch (piAction) {
case 1: iAction = 47; break;
}
break;
case 54:
switch (piAction) {
case 1: iAction = 48; break;
}
break;
case 55:
switch (piAction) {
case 1: iAction = 112; break;
}
break;
case 56:
switch (piAction) {
case 1: iAction = 142; break;
}
break;
case 57:
switch (piAction) {
case 1: iAction = 50; break;
case 2: iAction = 58; break;
}
break;
case 58:
switch (piAction) {
case 1: iAction = 51; break;
}
break;
case 59:
switch (piAction) {
case 1: iAction = 102; break;
case 2: iAction = 58; break;
}
break;
case 60:
switch (piAction) {
case 1: iAction = 103; break;
case 2: iAction = 58; break;
}
break;
case 61:
switch (piAction) {
case 1: iAction = 104; break;
}
break;
case 62:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 63:
switch (piAction) {
case 1: iAction = 55; break;
}
break;
case 64:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 65:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 66:
switch (piAction) {
case 1: iAction = 140; break;
}
break;
case 67:
switch (piAction) {
case 1: iAction = 141; break;
}
break;
case 68:
switch (piAction) {
case 1: iAction = 141; break;
}
break;
case 69:
switch (piAction) {
case 1: iAction = 140; break;
}
break;
case 70:
switch (piAction) {
case 1: iAction = 106; break;
}
break;
case 71:
switch (piAction) {
case 1: iAction = 107; break;
case 2: iAction = 55; break;
}
break;
case 72:
switch (piAction) {
case 1: iAction = 118; break;
}
break;
case 73:
switch (piAction) {
case 1: iAction = 144; break;
}
break;
case 74:
switch (piAction) {
case 1: iAction = 145; break;
}
break;
case 75:
switch (piAction) {
case 1: iAction = 117; break;
case 2: iAction = 58; break;
case 3: iAction = 59; break;
case 4: iAction = 73; break;
}
break;
case 76:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 77:
switch (piAction) {
case 1: iAction = 113; break;
}
break;
case 78:
switch (piAction) {
case 1: iAction = 108; break;
case 2: iAction = 58; break;
}
break;
case 79:
switch (piAction) {
case 1: iAction = 58; break;
}
break;
case 80:
switch (piAction) {
case 1: iAction = 58; break;
}
break;
case 81:
switch (piAction) {
case 1: iAction = 58; break;
}
break;
case 82:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 83:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 84:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 85:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 86:
switch (piAction) {
case 1: iAction = 114; break;
case 2: iAction = 60; break;
case 3: iAction = 59; break;
case 4: iAction = 73; break;
}
break;
case 87:
switch (piAction) {
case 1: iAction = 58; break;
}
break;
case 88:
switch (piAction) {
case 1: iAction = 116; break;
case 2: iAction = 60; break;
}
break;
case 89:
switch (piAction) {
case 1: iAction = 143; break;
}
break;
case 90:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 91:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 92:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 93:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 94:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 95:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 96:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 97:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 60; break;
}
break;
case 98:
switch (piAction) {
case 1: iAction = 60; break;
}
break;
case 99:
switch (piAction) {
case 1: iAction = 109; break;
case 2: iAction = 58; break;
}
break;
case 100:
switch (piAction) {
case 1: iAction = 109; break;
case 2: iAction = 58; break;
}
break;
case 101:
switch (piAction) {
case 1: iAction = 110; break;
case 2: iAction = 58; break;
}
break;
case 102:
switch (piAction) {
case 1: iAction = 111; break;
case 2: iAction = 58; break;
}
break;
case 103:
switch (piAction) {
case 1: iAction = 115; break;
case 2: iAction = 58; break;
}
break;
case 104:
switch (piAction) {
case 1: iAction = 119; break;
case 2: iAction = 58; break;
case 3: iAction = 73; break;
}
break;
case 105:
switch (piAction) {
case 1: iAction = 59; break;
case 2: iAction = 62; break;
}
break;
case 106:
switch (piAction) {
case 1: iAction = 120; break;
case 2: iAction = 58; break;
}
break;
case 107:
switch (piAction) {
case 1: iAction = 121; break;
case 2: iAction = 53; break;
}
break;
case 108:
switch (piAction) {
case 1: iAction = 122; break;
case 2: iAction = 54; break;
}
break;
case 109:
switch (piAction) {
case 1: iAction = 123; break;
case 2: iAction = 63; break;
case 3: iAction = 58; break;
}
break;
case 110:
switch (piAction) {
case 1: iAction = 124; break;
case 2: iAction = 58; break;
}
break;
case 111:
switch (piAction) {
case 1: iAction = 125; break;
}
break;
case 112:
switch (piAction) {
case 1: iAction = 126; break;
}
break;
case 113:
switch (piAction) {
case 1: iAction = 127; break;
}
break;
case 114:
switch (piAction) {
case 1: iAction = 128; break;
}
break;
case 115:
switch (piAction) {
case 1: iAction = 129; break;
}
break;
case 116:
switch (piAction) {
case 1: iAction = 130; break;
}
break;
case 117:
switch (piAction) {
case 1: iAction = 131; break;
}
break;
case 118:
switch (piAction) {
case 1: iAction = 132; break;
}
break;
case 119:
switch (piAction) {
case 1: iAction = 133; break;
}
break;
case 120:
switch (piAction) {
case 1: iAction = 134; break;
}
break;
case 121:
switch (piAction) {
case 1: iAction = 135; break;
}
break;
case 122:
switch (piAction) {
case 1: iAction = 136; break;
}
break;
case 123:
switch (piAction) {
case 1: iAction = 137; break;
}
break;
case 124:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 33; break;
}
break;
case 125:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 38; break;
}
break;
case 126:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 49; break;
}
break;
case 127:
switch (piAction) {
case 1: iAction = 62; break;
case 2: iAction = 55; break;
}
break;
case 128:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 129:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 130:
switch (piAction) {
case 1: iAction = 62; break;
}
break;
case 131:
switch (piAction) {
case 1: iAction = 65; break;
}
break;
case 132:
switch (piAction) {
case 1: iAction = 12; break;
}
break;
}
return(iAction);
}
function Script_Cond(piScript, piCond) {
var iCond = 0;
switch (piScript) {
case 0:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 5; break;
}
break;
case 1:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 5; break;
}
break;
case 2:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 3:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 3; break;
}
break;
case 4:
switch (piCond) {
}
break;
case 5:
switch (piCond) {
case 1: iCond = 7; break;
case 2: iCond = 3; break;
}
break;
case 6:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 2; break;
case 3: iCond = 17; break;
}
break;
case 7:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 2; break;
}
break;
case 8:
switch (piCond) {
}
break;
case 9:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 10:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 11:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 12:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 13:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 14:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 9; break;
}
break;
case 15:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 3; break;
case 3: iCond = 9; break;
}
break;
case 16:
switch (piCond) {
}
break;
case 17:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 8; break;
}
break;
case 18:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 3; break;
case 3: iCond = 9; break;
}
break;
case 19:
switch (piCond) {
}
break;
case 20:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 6; break;
}
break;
case 21:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 6; break;
}
break;
case 22:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 17; break;
}
break;
case 23:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 2; break;
}
break;
case 24:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 25:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 9; break;
}
break;
case 26:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 9; break;
case 3: iCond = 9; break;
}
break;
case 27:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 28:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 14; break;
}
break;
case 29:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 30:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 2; break;
}
break;
case 31:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 32:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
}
break;
case 33:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 5; break;
}
break;
case 34:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 5; break;
}
break;
case 35:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 9; break;
}
break;
case 36:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 37:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 9; break;
}
break;
case 38:
switch (piCond) {
case 1: iCond = 7; break;
}
break;
case 39:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 8; break;
}
break;
case 40:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 9; break;
}
break;
case 41:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 42:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 43:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 44:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 45:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 46:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 47:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 48:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 49:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 50:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 51:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 52:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 53:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 54:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 55:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 56:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 8; break;
}
break;
case 57:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 9; break;
}
break;
case 58:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 9; break;
case 3: iCond = 12; break;
}
break;
case 59:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 9; break;
case 3: iCond = 3; break;
}
break;
case 60:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 9; break;
case 3: iCond = 3; break;
}
break;
case 61:
switch (piCond) {
case 1: iCond = 3; break;
}
break;
case 62:
switch (piCond) {
case 1: iCond = 17; break;
case 2: iCond = 8; break;
}
break;
case 63:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 8; break;
}
break;
case 64:
switch (piCond) {
case 1: iCond = 17; break;
case 2: iCond = 8; break;
}
break;
case 65:
switch (piCond) {
case 1: iCond = 17; break;
case 2: iCond = 8; break;
}
break;
case 66:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 67:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 68:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 69:
switch (piCond) {
case 1: iCond = 4; break;
}
break;
case 70:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 71:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 72:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 73:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 74:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 75:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 9; break;
}
break;
case 76:
switch (piCond) {
}
break;
case 77:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 78:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 9; break;
}
break;
case 79:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 9; break;
}
break;
case 80:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 9; break;
}
break;
case 81:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 9; break;
}
break;
case 82:
switch (piCond) {
case 1: iCond = 8; break;
}
break;
case 83:
switch (piCond) {
case 1: iCond = 8; break;
}
break;
case 84:
switch (piCond) {
case 1: iCond = 8; break;
}
break;
case 85:
switch (piCond) {
case 1: iCond = 8; break;
}
break;
case 86:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
case 3: iCond = 9; break;
}
break;
case 87:
switch (piCond) {
}
break;
case 88:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
case 3: iCond = 8; break;
}
break;
case 89:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 7; break;
}
break;
case 90:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 91:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 92:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 93:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 94:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 95:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 96:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 97:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 4; break;
}
break;
case 98:
switch (piCond) {
case 1: iCond = 8; break;
}
break;
case 99:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
case 3: iCond = 3; break;
}
break;
case 100:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
case 3: iCond = 3; break;
}
break;
case 101:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
}
break;
case 102:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
}
break;
case 103:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
}
break;
case 104:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 4; break;
case 3: iCond = 8; break;
}
break;
case 105:
switch (piCond) {
}
break;
case 106:
switch (piCond) {
case 1: iCond = 2; break;
}
break;
case 107:
switch (piCond) {
case 1: iCond = 2; break;
case 2: iCond = 3; break;
case 3: iCond = 17; break;
}
break;
case 108:
switch (piCond) {
case 1: iCond = 3; break;
case 2: iCond = 4; break;
}
break;
case 109:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 8; break;
case 3: iCond = 9; break;
}
break;
case 110:
switch (piCond) {
case 1: iCond = 9; break;
}
break;
case 111:
switch (piCond) {
}
break;
case 112:
switch (piCond) {
}
break;
case 113:
switch (piCond) {
case 1: iCond = 14; break;
}
break;
case 114:
switch (piCond) {
case 1: iCond = 14; break;
case 2: iCond = 9; break;
}
break;
case 115:
switch (piCond) {
case 1: iCond = 14; break;
case 2: iCond = 8; break;
}
break;
case 116:
switch (piCond) {
case 1: iCond = 14; break;
}
break;
case 117:
switch (piCond) {
case 1: iCond = 14; break;
}
break;
case 118:
switch (piCond) {
case 1: iCond = 14; break;
case 2: iCond = 9; break;
}
break;
case 119:
switch (piCond) {
case 1: iCond = 14; break;
}
break;
case 120:
switch (piCond) {
case 1: iCond = 14; break;
}
break;
case 121:
switch (piCond) {
}
break;
case 122:
switch (piCond) {
}
break;
case 123:
switch (piCond) {
}
break;
case 124:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 125:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 126:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 127:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 14; break;
}
break;
case 128:
switch (piCond) {
case 1: iCond = 8; break;
case 2: iCond = 14; break;
}
break;
case 129:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 8; break;
}
break;
case 130:
switch (piCond) {
case 1: iCond = 4; break;
case 2: iCond = 8; break;
}
break;
case 131:
switch (piCond) {
}
break;
case 132:
switch (piCond) {
}
break;
}
return(iCond);
}
function Script_CondArg(piScript, piCond) {
var iCondArg = 0;
switch (piScript) {
case 0:
switch (piCond) {
case 1: iCondArg = 1; break;
}
break;
case 1:
switch (piCond) {
case 1: iCondArg = 1; break;
}
break;
case 2:
switch (piCond) {
case 1: iCondArg = 12; break;
}
break;
case 3:
switch (piCond) {
case 1: iCondArg = 2; break;
case 2: iCondArg = 14; break;
case 3: iCondArg = 14; break;
}
break;
case 4:
switch (piCond) {
case 1: iCondArg = 8; break;
}
break;
case 5:
switch (piCond) {
case 1: iCondArg = 2; break;
case 2: iCondArg = 14; break;
}
break;
case 6:
switch (piCond) {
case 1: iCondArg = 1; break;
case 3: iCondArg = 15; break;
case 4: iCondArg = 15; break;
case 5: iCondArg = 1; break;
}
break;
case 7:
switch (piCond) {
case 1: iCondArg = 1; break;
}
break;
case 8:
switch (piCond) {
}
break;
case 9:
switch (piCond) {
case 1: iCondArg = 15; break;
}
break;
case 10:
switch (piCond) {
case 1: iCondArg = 6; break;
}
break;
case 11:
switch (piCond) {
case 1: iCondArg = 10; break;
case 2: iCondArg = 16; break;
case 3: iCondArg = 4; break;
}
break;
case 12:
switch (piCond) {
case 1: iCondArg = 16; break;
case 2: iCondArg = 17; break;
case 3: iCondArg = 4; break;
}
break;
case 13:
switch (piCond) {
case 1: iCondArg = 16; break;
case 2: iCondArg = 17; break;
case 3: iCondArg = 4; break;
}
break;
case 14:
switch (piCond) {
case 1: iCondArg = 17; break;
case 2: iCondArg = 1; break;
}
break;
case 15:
switch (piCond) {
case 1: iCondArg = 15; break;
case 2: iCondArg = 17; break;
case 3: iCondArg = 1; break;
case 4: iCondArg = 1; break;
case 5: iCondArg = 15; break;
}
break;
case 16:
switch (piCond) {
case 1: iCondArg = 14; break;
case 2: iCondArg = 4; break;
}
break;
case 17:
switch (piCond) {
case 1: iCondArg = 17; break;
case 2: iCondArg = 1; break;
}
break;
case 18:
switch (piCond) {
case 1: iCondArg = 15; break;
case 2: iCondArg = 17; break;
case 3: iCondArg = 1; break;
case 4: iCondArg = 1; break;
case 5: iCondArg = 15; break;
}
break;
case 19:
switch (piCond) {
case 1: iCondArg = 14; break;
case 2: iCondArg = 4; break;
}
break;
case 20:
switch (piCond) {
case 1: iCondArg = 14; break;
case 2: iCondArg = 25; break;
case 3: iCondArg = 12; break;
}
break;
case 21:
switch (piCond) {
case 1: iCondArg = 14; break;
case 2: iCondArg = 26; break;
case 3: iCondArg = 12; break;
}
break;
case 22:
switch (piCond) {
case 1: iCondArg = 13; break;
case 2: iCondArg = 26; break;
case 3: iCondArg = 26; break;
case 4: iCondArg = 13; break;
}
break;
case 23:
switch (piCond) {
case 1: iCondArg = 13; break;
case 2: iCondArg = 26; break;
}
break;
case 24:
switch (piCond) {
case 1: iCondArg = 13; break;
}
break;
case 25:
switch (piCond) {
case 1: iCondArg = 9; break;
case 2: iCondArg = 12; break;
case 3: iCondArg = 12; break;
}
break;
case 26:
switch (piCond) {
case 1: iCondArg = 12; break;
case 2: iCondArg = 2; break;
case 3: iCondArg = 13; break;
case 4: iCondArg = 13; break;
}
break;
case 27:
switch (piCond) {
case 1: iCondArg = 16; break;
case 2: iCondArg = 12; break;
case 3: iCondArg = 13; break;
}
break;
case 28:
switch (piCond) {
case 1: iCondArg = 36; break;
case 2: iCondArg = 27; break;
case 3: iCondArg = 27; break;
}
break;
case 29:
switch (piCond) {
case 1: iCondArg = 36; break;
}
break;
case 30:
switch (piCond) {
case 1: iCondArg = 37; break;
case 2: iCondArg = 39; break;
}
break;
case 31:
switch (piCond) {
case 1: iCondArg = 37; break;
}
break;
case 32:
switch (piCond) {
case 1: iCondArg = 39; break;
case 2: iCondArg = 27; break;
case 3: iCondArg = 39; break;
case 4: iCondArg = 27; break;
case 5: iCondArg = 28; break;
}
break;
case 33:
switch (piCond) {
case 1: iCondArg = 37; break;
case 2: iCondArg = 39; break;
}
break;
case 34:
switch (piCond) {
case 1: iCondArg = 39; break;
case 2: iCondArg = 27; break;
}
break;
case 35:
switch (piCond) {
case 1: iCondArg = 24; break;
case 2: iCondArg = 2; break;
case 3: iCondArg = 2; break;
}
break;
case 36:
switch (piCond) {
case 1: iCondArg = 24; break;
}
break;
case 37:
switch (piCond) {
case 1: iCondArg = 38; break;
case 2: iCondArg = 6; break;
case 3: iCondArg = 6; break;
}
break;
case 38:
switch (piCond) {
case 1: iCondArg = 18; break;
case 2: iCondArg = 6; break;
}
break;
case 39:
switch (piCond) {
case 1: iCondArg = 38; break;
case 2: iCondArg = 1; break;
case 3: iCondArg = 21; break;
}
break;
case 40:
switch (piCond) {
case 1: iCondArg = 38; break;
case 2: iCondArg = 1; break;
}
break;
case 41:
switch (piCond) {
case 1: iCondArg = 23; break;
}
break;
case 42:
switch (piCond) {
case 1: iCondArg = 23; break;
}
break;
case 43:
switch (piCond) {
case 1: iCondArg = 24; break;
}
break;
case 44:
switch (piCond) {
case 1: iCondArg = 26; break;
}
break;
case 45:
switch (piCond) {
case 1: iCondArg = 28; break;
}
break;
case 46:
switch (piCond) {
case 1: iCondArg = 25; break;
case 2: iCondArg = 46; break;
case 3: iCondArg = 46; break;
case 4: iCondArg = 25; break;
}
break;
case 47:
switch (piCond) {
case 1: iCondArg = 25; break;
}
break;
case 48:
switch (piCond) {
case 1: iCondArg = 27; break;
case 2: iCondArg = 45; break;
case 3: iCondArg = 45; break;
case 4: iCondArg = 27; break;
}
break;
case 49:
switch (piCond) {
case 1: iCondArg = 27; break;
}
break;
case 50:
switch (piCond) {
case 1: iCondArg = 26; break;
case 2: iCondArg = 47; break;
case 3: iCondArg = 47; break;
case 4: iCondArg = 26; break;
}
break;
case 51:
switch (piCond) {
case 1: iCondArg = 26; break;
}
break;
case 52:
switch (piCond) {
case 1: iCondArg = 47; break;
}
break;
case 53:
switch (piCond) {
case 1: iCondArg = 45; break;
}
break;
case 54:
switch (piCond) {
case 1: iCondArg = 46; break;
}
break;
case 55:
switch (piCond) {
case 1: iCondArg = 49; break;
}
break;
case 56:
switch (piCond) {
case 1: iCondArg = 49; break;
case 2: iCondArg = 10; break;
}
break;
case 57:
switch (piCond) {
case 1: iCondArg = 49; break;
case 2: iCondArg = 3; break;
case 3: iCondArg = 3; break;
}
break;
case 58:
switch (piCond) {
case 1: iCondArg = 49; break;
case 2: iCondArg = 4; break;
case 3: iCondArg = 46; break;
}
break;
case 59:
switch (piCond) {
case 1: iCondArg = 49; break;
case 2: iCondArg = 4; break;
case 3: iCondArg = 46; break;
case 4: iCondArg = 4; break;
}
break;
case 60:
switch (piCond) {
case 1: iCondArg = 49; break;
case 2: iCondArg = 5; break;
case 3: iCondArg = 50; break;
case 4: iCondArg = 5; break;
}
break;
case 61:
switch (piCond) {
case 1: iCondArg = 49; break;
}
break;
case 62:
switch (piCond) {
case 1: iCondArg = 50; break;
case 2: iCondArg = 4; break;
case 3: iCondArg = 50; break;
case 4: iCondArg = 37; break;
}
break;
case 63:
switch (piCond) {
case 1: iCondArg = 46; break;
case 2: iCondArg = 4; break;
case 3: iCondArg = 46; break;
}
break;
case 64:
switch (piCond) {
case 1: iCondArg = 51; break;
case 2: iCondArg = 5; break;
case 3: iCondArg = 51; break;
case 4: iCondArg = 37; break;
}
break;
case 65:
switch (piCond) {
case 1: iCondArg = 51; break;
case 2: iCondArg = 5; break;
case 3: iCondArg = 51; break;
case 4: iCondArg = 37; break;
}
break;
case 66:
switch (piCond) {
case 1: iCondArg = 32; break;
}
break;
case 67:
switch (piCond) {
case 1: iCondArg = 33; break;
}
break;
case 68:
switch (piCond) {
case 1: iCondArg = 35; break;
}
break;
case 69:
switch (piCond) {
case 1: iCondArg = 36; break;
}
break;
case 70:
switch (piCond) {
case 1: iCondArg = 52; break;
}
break;
case 71:
switch (piCond) {
case 1: iCondArg = 52; break;
case 2: iCondArg = 52; break;
}
break;
case 72:
switch (piCond) {
case 1: iCondArg = 54; break;
}
break;
case 73:
switch (piCond) {
case 1: iCondArg = 54; break;
}
break;
case 74:
switch (piCond) {
case 1: iCondArg = 57; break;
}
break;
case 75:
switch (piCond) {
case 1: iCondArg = 54; break;
case 2: iCondArg = 9; break;
case 3: iCondArg = 9; break;
case 4: iCondArg = 54; break;
}
break;
case 76:
switch (piCond) {
case 1: iCondArg = 57; break;
case 2: iCondArg = 46; break;
}
break;
case 77:
switch (piCond) {
case 1: iCondArg = 53; break;
}
break;
case 78:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 7; break;
case 3: iCondArg = 7; break;
}
break;
case 79:
switch (piCond) {
case 1: iCondArg = 38; break;
case 2: iCondArg = 8; break;
case 3: iCondArg = 8; break;
}
break;
case 80:
switch (piCond) {
case 1: iCondArg = 40; break;
case 2: iCondArg = 8; break;
case 3: iCondArg = 8; break;
}
break;
case 81:
switch (piCond) {
case 1: iCondArg = 41; break;
case 2: iCondArg = 8; break;
case 3: iCondArg = 8; break;
}
break;
case 82:
switch (piCond) {
case 1: iCondArg = 8; break;
case 2: iCondArg = 53; break;
case 3: iCondArg = 42; break;
case 4: iCondArg = 8; break;
}
break;
case 83:
switch (piCond) {
case 1: iCondArg = 8; break;
case 2: iCondArg = 53; break;
case 3: iCondArg = 43; break;
case 4: iCondArg = 8; break;
}
break;
case 84:
switch (piCond) {
case 1: iCondArg = 8; break;
case 2: iCondArg = 53; break;
case 3: iCondArg = 44; break;
case 4: iCondArg = 8; break;
}
break;
case 85:
switch (piCond) {
case 1: iCondArg = 8; break;
case 2: iCondArg = 53; break;
case 3: iCondArg = 45; break;
case 4: iCondArg = 8; break;
}
break;
case 86:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 9; break;
case 4: iCondArg = 7; break;
case 5: iCondArg = 53; break;
}
break;
case 87:
switch (piCond) {
case 1: iCondArg = 8; break;
}
break;
case 88:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 9; break;
case 4: iCondArg = 7; break;
}
break;
case 89:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 7; break;
}
break;
case 90:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 42; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 44; break;
case 5: iCondArg = 7; break;
}
break;
case 91:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 44; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 46; break;
case 5: iCondArg = 7; break;
}
break;
case 92:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 46; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 48; break;
case 5: iCondArg = 7; break;
}
break;
case 93:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 48; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 50; break;
case 5: iCondArg = 7; break;
}
break;
case 94:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 43; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 45; break;
case 5: iCondArg = 7; break;
}
break;
case 95:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 45; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 47; break;
case 5: iCondArg = 7; break;
}
break;
case 96:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 47; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 49; break;
case 5: iCondArg = 7; break;
}
break;
case 97:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 49; break;
case 3: iCondArg = 53; break;
case 4: iCondArg = 50; break;
case 5: iCondArg = 7; break;
}
break;
case 98:
switch (piCond) {
case 1: iCondArg = 7; break;
case 2: iCondArg = 7; break;
}
break;
case 99:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 51; break;
case 4: iCondArg = 7; break;
}
break;
case 100:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 51; break;
case 4: iCondArg = 7; break;
}
break;
case 101:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 28; break;
case 3: iCondArg = 7; break;
}
break;
case 102:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 47; break;
case 3: iCondArg = 7; break;
}
break;
case 103:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 18; break;
case 3: iCondArg = 7; break;
}
break;
case 104:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 50; break;
case 3: iCondArg = 9; break;
case 4: iCondArg = 10; break;
}
break;
case 105:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 56; break;
case 3: iCondArg = 50; break;
}
break;
case 106:
switch (piCond) {
case 1: iCondArg = 53; break;
case 2: iCondArg = 7; break;
}
break;
case 107:
switch (piCond) {
case 1: iCondArg = 56; break;
case 2: iCondArg = 28; break;
case 3: iCondArg = 55; break;
case 4: iCondArg = 55; break;
}
break;
case 108:
switch (piCond) {
case 1: iCondArg = 55; break;
case 2: iCondArg = 21; break;
case 3: iCondArg = 2; break;
}
break;
case 109:
switch (piCond) {
case 1: iCondArg = 3; break;
case 2: iCondArg = 10; break;
case 3: iCondArg = 14; break;
case 4: iCondArg = 14; break;
}
break;
case 110:
switch (piCond) {
case 1: iCondArg = 11; break;
case 2: iCondArg = 11; break;
}
break;
case 111:
switch (piCond) {
}
break;
case 112:
switch (piCond) {
}
break;
case 113:
switch (piCond) {
case 1: iCondArg = 29; break;
}
break;
case 114:
switch (piCond) {
case 1: iCondArg = 30; break;
case 2: iCondArg = 2; break;
}
break;
case 115:
switch (piCond) {
case 1: iCondArg = 30; break;
case 2: iCondArg = 2; break;
}
break;
case 116:
switch (piCond) {
case 1: iCondArg = 31; break;
}
break;
case 117:
switch (piCond) {
case 1: iCondArg = 32; break;
}
break;
case 118:
switch (piCond) {
case 1: iCondArg = 33; break;
case 2: iCondArg = 9; break;
}
break;
case 119:
switch (piCond) {
case 1: iCondArg = 33; break;
}
break;
case 120:
switch (piCond) {
case 1: iCondArg = 35; break;
}
break;
case 121:
switch (piCond) {
}
break;
case 122:
switch (piCond) {
}
break;
case 123:
switch (piCond) {
}
break;
case 124:
switch (piCond) {
case 1: iCondArg = 8; break;
case 2: iCondArg = 29; break;
case 3: iCondArg = 29; break;
case 4: iCondArg = 51; break;
}
break;
case 125:
switch (piCond) {
case 1: iCondArg = 21; break;
case 2: iCondArg = 30; break;
case 3: iCondArg = 30; break;
case 4: iCondArg = 51; break;
}
break;
case 126:
switch (piCond) {
case 1: iCondArg = 32; break;
case 2: iCondArg = 31; break;
case 3: iCondArg = 31; break;
case 4: iCondArg = 51; break;
}
break;
case 127:
switch (piCond) {
case 1: iCondArg = 38; break;
case 2: iCondArg = 32; break;
case 3: iCondArg = 32; break;
case 4: iCondArg = 51; break;
}
break;
case 128:
switch (piCond) {
case 1: iCondArg = 10; break;
case 2: iCondArg = 33; break;
case 3: iCondArg = 33; break;
case 4: iCondArg = 51; break;
}
break;
case 129:
switch (piCond) {
case 1: iCondArg = 2; break;
case 2: iCondArg = 10; break;
case 3: iCondArg = 34; break;
case 4: iCondArg = 51; break;
}
break;
case 130:
switch (piCond) {
case 1: iCondArg = 3; break;
case 2: iCondArg = 10; break;
case 3: iCondArg = 35; break;
case 4: iCondArg = 51; break;
}
break;
case 131:
switch (piCond) {
}
break;
case 132:
switch (piCond) {
}
break;
}
return(iCondArg);
}
function Script_Noun(piScript) {
var iNoun = 0;
switch (piScript) {
case 0: iNoun = 7; break;
case 1: iNoun = 7; break;
case 2: iNoun = 16; break;
case 3: iNoun = 8; break;
case 5: iNoun = 8; break;
case 6: iNoun = 17; break;
case 7: iNoun = 17; break;
case 9: iNoun = 18; break;
case 10: iNoun = 11; break;
case 11: iNoun = 14; break;
case 12: iNoun = 19; break;
case 13: iNoun = 19; break;
case 14: iNoun = 20; break;
case 15: iNoun = 20; break;
case 17: iNoun = 20; break;
case 18: iNoun = 20; break;
case 20: iNoun = 100; break;
case 21: iNoun = 100; break;
case 22: iNoun = 26; break;
case 23: iNoun = 26; break;
case 24: iNoun = 26; break;
case 25: iNoun = 40; break;
case 26: iNoun = 40; break;
case 27: iNoun = 100; break;
case 28: iNoun = 29; break;
case 29: iNoun = 29; break;
case 30: iNoun = 31; break;
case 31: iNoun = 31; break;
case 32: iNoun = 28; break;
case 33: iNoun = 28; break;
case 34: iNoun = 28; break;
case 35: iNoun = 100; break;
case 36: iNoun = 22; break;
case 37: iNoun = 100; break;
case 38: iNoun = 100; break;
case 39: iNoun = 33; break;
case 40: iNoun = 33; break;
case 41: iNoun = 27; break;
case 42: iNoun = 27; break;
case 43: iNoun = 35; break;
case 44: iNoun = 35; break;
case 45: iNoun = 35; break;
case 46: iNoun = 36; break;
case 47: iNoun = 36; break;
case 48: iNoun = 37; break;
case 49: iNoun = 37; break;
case 50: iNoun = 38; break;
case 51: iNoun = 38; break;
case 52: iNoun = 39; break;
case 53: iNoun = 40; break;
case 54: iNoun = 41; break;
case 55: iNoun = 42; break;
case 56: iNoun = 42; break;
case 57: iNoun = 42; break;
case 58: iNoun = 42; break;
case 59: iNoun = 42; break;
case 60: iNoun = 42; break;
case 61: iNoun = 42; break;
case 62: iNoun = 100; break;
case 63: iNoun = 100; break;
case 64: iNoun = 100; break;
case 65: iNoun = 20; break;
case 70: iNoun = 46; break;
case 71: iNoun = 46; break;
case 72: iNoun = 48; break;
case 73: iNoun = 48; break;
case 74: iNoun = 48; break;
case 75: iNoun = 40; break;
case 77: iNoun = 45; break;
case 78: iNoun = 15; break;
case 79: iNoun = 100; break;
case 80: iNoun = 100; break;
case 81: iNoun = 100; break;
case 82: iNoun = 25; break;
case 83: iNoun = 25; break;
case 84: iNoun = 25; break;
case 85: iNoun = 25; break;
case 86: iNoun = 100; break;
case 88: iNoun = 100; break;
case 89: iNoun = 100; break;
case 90: iNoun = 100; break;
case 91: iNoun = 100; break;
case 92: iNoun = 100; break;
case 93: iNoun = 100; break;
case 94: iNoun = 100; break;
case 95: iNoun = 100; break;
case 96: iNoun = 100; break;
case 97: iNoun = 100; break;
case 98: iNoun = 100; break;
case 99: iNoun = 43; break;
case 100: iNoun = 44; break;
case 101: iNoun = 28; break;
case 102: iNoun = 39; break;
case 103: iNoun = 21; break;
case 104: iNoun = 45; break;
case 106: iNoun = 45; break;
case 107: iNoun = 28; break;
case 108: iNoun = 100; break;
case 109: iNoun = 100; break;
case 110: iNoun = 100; break;
case 122: iNoun = 49; break;
case 123: iNoun = 50; break;
case 124: iNoun = 100; break;
case 125: iNoun = 100; break;
case 126: iNoun = 100; break;
case 127: iNoun = 100; break;
case 128: iNoun = 100; break;
case 129: iNoun = 100; break;
case 130: iNoun = 100; break;
}
return(iNoun);
}
function Script_Verb(piScript) {
var iVerb = 0;
switch (piScript) {
case 0: iVerb = 69; break;
case 1: iVerb = 29; break;
case 2: iVerb = 29; break;
case 3: iVerb = 38; break;
case 5: iVerb = 38; break;
case 6: iVerb = 29; break;
case 7: iVerb = 29; break;
case 8: iVerb = 34; break;
case 9: iVerb = 29; break;
case 10: iVerb = 29; break;
case 11: iVerb = 29; break;
case 12: iVerb = 29; break;
case 13: iVerb = 29; break;
case 14: iVerb = 29; break;
case 15: iVerb = 69; break;
case 17: iVerb = 29; break;
case 18: iVerb = 37; break;
case 22: iVerb = 29; break;
case 23: iVerb = 29; break;
case 24: iVerb = 29; break;
case 28: iVerb = 48; break;
case 29: iVerb = 48; break;
case 30: iVerb = 48; break;
case 31: iVerb = 48; break;
case 32: iVerb = 70; break;
case 33: iVerb = 70; break;
case 34: iVerb = 70; break;
case 36: iVerb = 48; break;
case 39: iVerb = 48; break;
case 40: iVerb = 48; break;
case 41: iVerb = 29; break;
case 42: iVerb = 69; break;
case 43: iVerb = 29; break;
case 44: iVerb = 29; break;
case 45: iVerb = 29; break;
case 46: iVerb = 29; break;
case 47: iVerb = 29; break;
case 48: iVerb = 29; break;
case 49: iVerb = 29; break;
case 50: iVerb = 29; break;
case 51: iVerb = 29; break;
case 52: iVerb = 29; break;
case 53: iVerb = 29; break;
case 54: iVerb = 29; break;
case 55: iVerb = 29; break;
case 56: iVerb = 48; break;
case 57: iVerb = 48; break;
case 58: iVerb = 48; break;
case 59: iVerb = 48; break;
case 60: iVerb = 48; break;
case 61: iVerb = 48; break;
case 66: iVerb = 29; break;
case 67: iVerb = 29; break;
case 68: iVerb = 29; break;
case 69: iVerb = 29; break;
case 70: iVerb = 29; break;
case 71: iVerb = 10; break;
case 72: iVerb = 10; break;
case 73: iVerb = 29; break;
case 74: iVerb = 29; break;
case 75: iVerb = 74; break;
case 77: iVerb = 29; break;
case 99: iVerb = 74; break;
case 100: iVerb = 74; break;
case 101: iVerb = 74; break;
case 102: iVerb = 74; break;
case 103: iVerb = 74; break;
case 104: iVerb = 39; break;
case 106: iVerb = 39; break;
case 107: iVerb = 74; break;
case 111: iVerb = 73; break;
case 112: iVerb = 47; break;
case 113: iVerb = 72; break;
case 114: iVerb = 72; break;
case 115: iVerb = 72; break;
case 116: iVerb = 72; break;
case 117: iVerb = 72; break;
case 118: iVerb = 72; break;
case 119: iVerb = 72; break;
case 120: iVerb = 72; break;
case 121: iVerb = 72; break;
case 122: iVerb = 48; break;
case 123: iVerb = 48; break;
case 131: iVerb = 33; break;
case 132: iVerb = 29; break;
}
return(iVerb);
}
//----------------------------------------------------------------------------------
// Item Data Functions
//----------------------------------------------------------------------------------
// Item_Name(piItem) string
// Item_NameShort(piItem) string
// Item_RoomInit(piItem) int
//----------------------------------------------------------------------------------
function Item_Name(piItem) {
var sName = ('?' + piItem + '?');
switch (piItem) {
case 0: sName = 'Window'; break;
case 1: sName = 'Curtain'; break;
case 2: sName = 'Table'; break;
case 3: sName = 'Chair'; break;
case 4: sName = 'Pillow'; break;
case 5: sName = 'Nightstand'; break;
case 6: sName = 'TV'; break;
case 7: sName = 'Bed'; break;
case 8: sName = 'Toilet'; break;
case 9: sName = 'Lamp'; break;
case 10: sName = 'Sink'; break;
case 11: sName = 'Door'; break;
case 12: sName = 'Sign'; break;
case 13: sName = 'Suitcase'; break;
case 14: sName = 'Scroll'; break;
case 15: sName = 'Metal'; break;
case 16: sName = 'Cabinet'; break;
case 17: sName = 'Panel'; break;
case 18: sName = 'Club'; break;
case 19: sName = 'Two Women Sleeping'; break;
case 20: sName = 'Table'; break;
case 21: sName = 'Stairs leading down'; break;
case 22: sName = 'Stairs leading up'; break;
case 23: sName = 'Chest'; break;
case 24: sName = 'King Eurystheus'; break;
case 25: sName = 'Sandles'; break;
case 26: sName = 'Robe'; break;
case 27: sName = 'Gold Coin'; break;
case 28: sName = 'Knife'; break;
case 29: sName = '*Read the Scroll'; break;
case 30: sName = '*Leave Mycenae'; break;
case 31: sName = '*Reach Cleonae'; break;
case 32: sName = '*Reach Nemea'; break;
case 33: sName = '*Kill Lion'; break;
case 34: sName = '*Return to Mycenae'; break;
case 35: sName = '*Return to Hotel'; break;
case 36: sName = 'Julius the Cobbler'; break;
case 37: sName = 'Marcus the Merchant'; break;
case 38: sName = 'Brutus the Guard'; break;
case 39: sName = 'Knife (for sale)'; break;
case 40: sName = 'Dead Horse'; break;
case 41: sName = 'Dead Sheep'; break;
case 42: sName = 'Lion Tracks'; break;
case 43: sName = 'Lion Tracks'; break;
case 44: sName = 'Lion Tracks'; break;
case 45: sName = 'Staff'; break;
case 46: sName = 'Lion Tooth'; break;
case 47: sName = 'Sword'; break;
case 48: sName = 'River'; break;
case 49: sName = 'Molorchus'; break;
case 50: sName = 'Bow'; break;
case 51: sName = 'Arrows'; break;
case 52: sName = 'Stump'; break;
case 53: sName = 'Lion'; break;
case 54: sName = 'Boulder'; break;
case 55: sName = 'Hide'; break;
case 56: sName = 'Lion (Dead)'; break;
case 57: sName = 'Boulder over Cave'; break;
}
return(sName);
}
function Item_NameShort(piItem) {
var sName = ('?' + piItem + '?');
switch (piItem) {
case 14: sName = 'SCR'; break;
case 15: sName = 'MET'; break;
case 18: sName = 'CLU'; break;
case 24: sName = 'EUR'; break;
case 25: sName = 'SAN'; break;
case 26: sName = 'ROB'; break;
case 27: sName = 'COI'; break;
case 28: sName = 'KNI'; break;
case 45: sName = 'STA'; break;
case 46: sName = 'TOO'; break;
case 47: sName = 'SWO'; break;
case 49: sName = 'MOL'; break;
case 50: sName = 'BOW'; break;
case 51: sName = 'ARR'; break;
case 55: sName = 'HID'; break;
}
return(sName);
}
function Item_RoomInit(piItem) {
var iRoom = 0;
switch (piItem) {
case 1: iRoom = 1; break;
case 2: iRoom = 1; break;
case 3: iRoom = 1; break;
case 4: iRoom = 2; break;
case 5: iRoom = 2; break;
case 6: iRoom = 3; break;
case 7: iRoom = 3; break;
case 8: iRoom = 4; break;
case 10: iRoom = 4; break;
case 11: iRoom = 5; break;
case 12: iRoom = 5; break;
case 13: iRoom = 6; break;
case 15: iRoom = 8; break;
case 18: iRoom = 8; break;
case 19: iRoom = 13; break;
case 20: iRoom = 11; break;
case 21: iRoom = 11; break;
case 22: iRoom = 19; break;
case 23: iRoom = 19; break;
case 24: iRoom = 14; break;
case 25: iRoom = 20; break;
case 36: iRoom = 15; break;
case 37: iRoom = 17; break;
case 38: iRoom = 18; break;
case 39: iRoom = 17; break;
case 40: iRoom = 25; break;
case 41: iRoom = 27; break;
case 42: iRoom = 24; break;
case 43: iRoom = 26; break;
case 44: iRoom = 28; break;
case 48: iRoom = 26; break;
case 49: iRoom = 34; break;
case 52: iRoom = 45; break;
case 54: iRoom = 46; break;
}
return(iRoom);
}
//----------------------------------------------------------------------------------
// Message Data Functions
//----------------------------------------------------------------------------------
// Message_Get(piMsg) string
//----------------------------------------------------------------------------------
function Message_Get(piMsg) {
var sText = ('?' + piMsg + '?');
switch (piMsg) {
case 0: sText = ''; break;
case 1: sText = 'Nothing happens'; break;
case 2: sText = 'You pull the curtains to the side revealing a window.'; break;
case 3: sText = 'The sign says Checkout Time is 9:00am.\nIf I don\'t get to sleep soon I\'ll sleep through that.'; break;
case 4: sText = 'The curtain covers the entirety of the North wall of the room.'; break;
case 5: sText = 'There isn\'t really good reading light here.'; break;
case 6: sText = 'You unroll the scroll a bit and begin to read and before you finish the first sentence you\'re fast asleep...\n\n'; break;
case 7: sText = '\n\n...You awake to find yourself dressed sparsely and laying on a cold marble floor.'; break;
case 8: sText = 'Outside the window you see the city lights and wonder\nwhy so many other people are still awake as well.'; break;
case 9: sText = '\nIn the track of the window you notice an oddly shaped piece of metal.'; break;
case 10: sText = 'It is indeed an oddly shaped piece of metal.\nThe closest description I can think of is if someone tried\nto bend a paperclip into some combination of the letters F and W.\nBut this is much thicker and heavier metal.'; break;
case 11: sText = 'When the 1am rerun of the local news ended the\nstation went to static as all the other channels had already been.'; break;
case 12: sText = 'I see nothing unusual.'; break;
case 13: sText = 'It is a very basic sink. One knob for cold, one knob\nfor hot (well ok...warm), and there\'s a rubber\nstopper on the sink if i wanted to fill it.\nBeneath the sink is a small cabinet.'; break;
case 14: sText = 'Inside the cabinet are some surplus paper products\nin case I was to run out of the 1-ply sandpaper provided.\nIn the back of the cabinet is a panel,\npresumably for accessing the plumbing.'; break;
case 15: sText = 'The panel appears to be firmly held in place.\nThe only feature is a oddly shaped hole.\nI guess it\'s for some type of key.'; break;
case 16: sText = 'You take the piece of metal you found and slowly slide it\ninto the panel. Turning it as neccesary until it is completely inside the panel.\nAs the last of the metal is pressed in you hear a click\nand the panel pops open, it\'s quite dark but amid the pipes and\nlayers of dirt and grime there is a scroll of paper tied with a string.'; break;
case 17: sText = 'The panel now hangs open exposing the plumbing.'; break;
case 18: sText = 'A walkthrough is included as file \'Herc1Walk.txt\', or you can find an interactive copy at http://www.sayyoho.com/Herc1/Herc1Walk.html.'; break;
case 19: sText = 'Eurystheus shouts that noone is allowed in his\nchamber unless properly dressed.\n\nHis guards usher you out.\n '; break;
case 20: sText = 'The women are sleeping with a large robe draped over the themselves for warmth.'; break;
case 21: sText = 'The women are sleeping in their birthday suits, and look quite chilled.'; break;
case 22: sText = 'A servant boy walks by you and says,\n \'Welcome to Mycenae\'.'; break;
case 23: sText = 'A servant girl walks by you and says,\n \'Eurystheus is awaiting you in his chamber.\'.'; break;
case 24: sText = 'Julius greets you with a broad smile.\n \'Welcome Hercules, Semper Ubi Sub Ubi.\''; break;
case 25: sText = 'Julius greets you with a broad smile.\n \'Welcome Hercules!\'\n You seem to be short on money, take this coin.\''; break;
case 26: sText = 'Marcus greets you warmly.\n \'Hello Hercules, Thanks for your patronage.\''; break;
case 27: sText = 'Marcus greets you warmly.\n \'Hello Hercules!\'\n \'A hero like you needs a great Knife.\'\n \'You can have mine for one gold coin?\''; break;
case 28: sText = 'Marcus hands you the knife and gladly accepts your payment.'; break;
case 29: sText = 'Marcus frowns, I don\'t have another knife to sell you.'; break;
case 30: sText = 'Marcus frowns, I can\'t afford to just give you the knife.\nYou\'ll need to pay with a Gold Coin.'; break;
case 31: sText = 'Brutus calls to you.\n \'Hail Hercules!\'\n \'Just talk to me when you\'re ready to leave,\n and I\'ll open the gate for you.\''; break;
case 32: sText = 'Brutus opens the gate\nand as you exit he says...\n \'Good Luck Hercules.\''; break;
case 33: sText = '**** Welcome to Chapter 1: King Eurystheus of Mycenae ****'; break;
case 34: sText = 'King Eurystheus speaks\nHercules, the first labor you must perform\nfor me is to rid my people of the Nemean\nlion who threatens them.'; break;
case 35: sText = 'The Lion was last seen South of here near Cleonae.\nNow get going.'; break;
case 36: sText = 'xxx'; break;
case 37: sText = 'You\'ll need to talk to the King\nbefore you can leave.'; break;
case 38: sText = '**** Welcome to Chapter 2: Road to Nemea ****'; break;
case 39: sText = 'You look closely at the tracks.\nIt certainly is getting close to Mycenae if these are from\nthe Lion I am to kill.'; break;
case 40: sText = 'You look closely at the tracks.\nJudging from the size of the paw prints\nthe Lion must be almost twice my size.'; break;
case 41: sText = 'You look closely at the tracks.\nIt looks like it\'s been almost a week since\nthe Lion last came this way.\nI must still have a ways to go.'; break;
case 42: sText = 'Judging from the bite marks, the\nteeth that ate this horse are HUGE.'; break;
case 43: sText = 'How could just one Lion have eaten\n20 sheep at one time?\nIt must have a a huge appetite.'; break;
case 44: sText = 'A gentle bank rolls down to the river.\nI\'m sure this was a good place for the Lion to get\na drink of water.'; break;
case 45: sText = 'In the water I see a sword.'; break;
case 46: sText = 'The sword is far from new, but serviceable.'; break;
case 47: sText = 'The shephard\'s staff is quite sturdy.'; break;
case 48: sText = 'The Lion appears to have lost this tooth\nin the fight with the horse.'; break;
case 49: sText = '**** Welcome to Chapter 3: Village of Cleonae ****'; break;
case 50: sText = 'Molorchus says\n Greeting Hercules, Welcome to Cleonae.\n'; break;
case 51: sText = 'Molorchus says\n I have a bow you could hunt the beast with\n but I couldn\'t part with it unless you had\n something to trade with.'; break;
case 52: sText = 'Molorchus says\n I see you have found the Lion\'s tooth.\nHe offers to trade you his bow for the tooth.\nYou accept.\n He says to get the bow from his house.'; break;
case 53: sText = 'Molorchus says\n I\'m sorry, I forgot to give you the Arrows.\n Go to my house and get the Arrows.'; break;
case 54: sText = 'Molorchus says\n I\'m not sure what else to say besides Good Luck.'; break;
case 55: sText = '**** Welcome to Chapter 4: Forest of Nemea ****'; break;
case 56: sText = 'The stump looks very old, not sure it would be useful.'; break;
case 57: sText = 'You pull the stump out of the ground to throw at the Lion.\nBut the stump is too rotted and it crumbles in your hands.\nThat might be how you killed the lion in\nsome stories, but not this time.'; break;
case 58: sText = 'The Lion takes a swing at you.'; break;
case 59: sText = 'The arrow just bounces off the Lions thick hide.\nI\'ll probably have to get close to hurt him.'; break;
case 60: sText = 'The knife only scratches the Lion\nI might need to be more creative.'; break;
case 61: sText = 'The sword just glances off the Lion\nhe\'s just too big and strong.\But wait, I\'m big and strong too.'; break;
case 62: sText = 'Molorchus looks like you\'d expect the poor workman he is.'; break;
case 63: sText = 'The Lion is a huge beast.\nThere\'s no way any normal man would stand a chance.\nGood thing I\'m a child of the Gods.'; break;
case 64: sText = 'The Lion escapes out the other end of the cave.'; break;
case 65: sText = 'The club dazes him momentarily, but that\'s all.'; break;
case 66: sText = 'The Lion is trapped in the cave.\nNOW is your chance.'; break;
case 67: sText = 'You use the staff to wedge under the boulder.\nThis loosens it enough to roll in front\nand block the cave entrance.'; break;
case 68: sText = 'The boulder won\'t budge, you\'ll need leverage.\nI know you\'re strong, but this IS just a game.\nCan\'t make it TOO easy.'; break;
case 69: sText = 'You grab the Lion in your bare hands and SQUEEZE\nuntil it\'s fight and life slowly end.\nNow we need to use a knife to get\nthe hide from the beast and\nreturn it to Eurystheus.'; break;
case 70: sText = 'You try to grab the Lion but it escapes.'; break;
case 71: sText = 'You skin the dead Lion with your Knife.'; break;
case 72: sText = 'Before you can enter Mycenae you are stopped.\nYou are told that you have completed you Quest\nand the King will not allow you back into the city.\n\nHe\'s afraid if you could kill the Lion you might\nkill him next.\n*** You Awake in Bed In the Hotel Room ***'; break;
case 73: sText = 'You\'ve WON, now that was a strange dream.\nVisit sayyoho.com for new games in the series.'; break;
case 74: sText = 'Welcome to Hercules First Labor.\n Type \'HELP\' for instructions.\n Type \'HINT\' to get a suggestion.\n Type \'ABOUT\' for game information.\n-------------\nThis is the ICOMP 2003 Release,\nplease read Herc1Info.txt before you play\nand refer to Herc1Walk.txt if you get stuck.'; break;
case 75: sText = 'Hercules First Labor\n Author: Robert Carl Brown (bob@sayyoho.com)\n Version: 0.02\n HomePage: http://www.sayyoho.com/herc1'; break;
case 76: sText = 'All Commands are 2 words (Verb Noun) or just a sinle verb\nExamples are:\n GET BALL\n THROW BALL\n RUN\nType \'HINT\' for a specific suggestion.'; break;
case 77: sText = 'Hint #1: When I can\'t sleep, I find reading helps.'; break;
case 78: sText = 'Hint #2: It would seem Shirt and Shoes are required to meet the King.'; break;
case 79: sText = 'Hint #3: The Merchants in Mycenae are the only ones in the Game.\nTake advantage of that.'; break;
case 80: sText = 'Hint #4: Be sure to investigate the attacks of the Lion\nbefore continuing South.'; break;
case 81: sText = 'Hint #5: Molorchus is the only person in Cleaonae left alive\nbetter find out anything he has to tell you.'; break;
case 82: sText = 'Hint #6: The Lion seems to be too Fast for you.\nYou\'ll need to develop a plan.'; break;
case 83: sText = 'Hint #7: The Lion moves around a lot\nYou\'ll need to search the whole area,\npossibly multiple times.'; break;
case 84: sText = 'Hint #8: You\'re past where I expected any hints to be needed.'; break;
case 85: sText = 'Sorry, can\'t seem to think of a Hint.'; break;
case 86: sText = 'Everything around you spins around and around.\nYou\'re still exactly where you were.\nJust a little dizzier.'; break;
case 87: sText = 'There\'s no Quicksand in this game.\nSo that\'s not gonna help.'; break;
case 88: sText = 'It\'s a normal enough chest.\nProbably where the King keeps his summer robes.'; break;
case 89: sText = 'No Thanks.\nI feel bad enough wandering around someone\'s castle\nwithout going through their belongings.'; break;
case 90: sText = 'The village is a shambles\nthe Lion seems to have destroyed everything.'; break;
case 91: sText = 'Entire families are lying half eaten throughout the village.'; break;
case 92: sText = 'Molorchus says\n Thank You for getting revenge on the beast\n that killed my family and friends.\n I will perform a sacrifice to your honor.'; break;
case 93: sText = 'The Lion Runs Away to the South.'; break;
case 94: sText = 'The Boulder is even bigger than the entrance to the Cave.'; break;
case 95: sText = 'The Boulder covers the entrance to the cave\nThough you could crawl out over the top it would trap the Lion.'; break;
}
return(sText);
}
//----------------------------------------------------------------------------------
// Noun Data Functions
//----------------------------------------------------------------------------------
// Noun_Short(piNoun) string
// Noun_Text(piNoun) string
//----------------------------------------------------------------------------------
function Noun_Short(piNoun) {
var sText = ('?' + piNoun + '?');
switch (piNoun) {
case 0: sText = 'ANY'; break;
case 1: sText = 'NORTH'; break;
case 2: sText = 'SOUTH'; break;
case 3: sText = 'EAST'; break;
case 4: sText = 'WEST'; break;
case 5: sText = 'UP'; break;
case 6: sText = 'DOWN'; break;
case 7: sText = 'CUR'; break;
case 8: sText = 'SCR'; break;
case 9: sText = 'TAB'; break;
case 10: sText = 'CHA'; break;
case 11: sText = 'TV'; break;
case 12: sText = 'NIG'; break;
case 13: sText = 'TOI'; break;
case 14: sText = 'SIN'; break;
case 15: sText = 'DOO'; break;
case 16: sText = 'SIG'; break;
case 17: sText = 'WIN'; break;
case 18: sText = 'MET'; break;
case 19: sText = 'CAB'; break;
case 20: sText = 'PAN'; break;
case 21: sText = 'CLU'; break;
case 22: sText = 'EUR'; break;
case 23: sText = '*KIN'; break;
case 24: sText = 'ROB'; break;
case 25: sText = 'SAN'; break;
case 26: sText = 'WOM'; break;
case 27: sText = 'CHE'; break;
case 28: sText = 'KNI'; break;
case 29: sText = 'JUL'; break;
case 30: sText = '*COB'; break;
case 31: sText = 'MAR'; break;
case 32: sText = '*MER'; break;
case 33: sText = 'BRU'; break;
case 34: sText = '*GUA'; break;
case 35: sText = 'TRA'; break;
case 36: sText = 'HOR'; break;
case 37: sText = 'SHE'; break;
case 38: sText = 'RIV'; break;
case 39: sText = 'SWO'; break;
case 40: sText = 'STA'; break;
case 41: sText = 'TOO'; break;
case 42: sText = 'MOL'; break;
case 43: sText = 'BOW'; break;
case 44: sText = 'ARR'; break;
case 45: sText = 'LIO'; break;
case 46: sText = 'STU'; break;
case 47: sText = 'HID'; break;
case 48: sText = 'BOU'; break;
case 49: sText = 'YOH'; break;
case 50: sText = 'BUN'; break;
}
return(sText);
}
function Noun_Text(piNoun) {
var sText = ('?' + piNoun + '?');
switch (piNoun) {
case 0: sText = 'Any'; break;
case 1: sText = 'North'; break;
case 2: sText = 'South'; break;
case 3: sText = 'East'; break;
case 4: sText = 'West'; break;
case 5: sText = 'Up'; break;
case 6: sText = 'Down'; break;
case 7: sText = 'Curtain'; break;
case 8: sText = 'Scroll'; break;
case 9: sText = 'Table'; break;
case 10: sText = 'Chair'; break;
case 11: sText = 'Television'; break;
case 12: sText = 'Nightstand'; break;
case 13: sText = 'Toilet'; break;
case 14: sText = 'Sink'; break;
case 15: sText = 'Door'; break;
case 16: sText = 'Sign'; break;
case 17: sText = 'Window'; break;
case 18: sText = 'Metal'; break;
case 19: sText = 'Cabinet'; break;
case 20: sText = 'Panel'; break;
case 21: sText = 'Club'; break;
case 22: sText = 'Eurystheus'; break;
case 23: sText = 'King'; break;
case 24: sText = 'Robe'; break;
case 25: sText = 'Sandles'; break;
case 26: sText = 'Women'; break;
case 27: sText = 'Chest'; break;
case 28: sText = 'Knife'; break;
case 29: sText = 'Julius'; break;
case 30: sText = 'Cobbler'; break;
case 31: sText = 'Marcus'; break;
case 32: sText = 'Merchant'; break;
case 33: sText = 'Brutus'; break;
case 34: sText = 'Guard'; break;
case 35: sText = 'Tracks'; break;
case 36: sText = 'Horse'; break;
case 37: sText = 'Sheep'; break;
case 38: sText = 'River'; break;
case 39: sText = 'Sword'; break;
case 40: sText = 'Staff'; break;
case 41: sText = 'Tooth'; break;
case 42: sText = 'Molorchus'; break;
case 43: sText = 'Bow'; break;
case 44: sText = 'Arrows'; break;
case 45: sText = 'Lion'; break;
case 46: sText = 'Stump'; break;
case 47: sText = 'Hide'; break;
case 48: sText = 'Boulder'; break;
case 49: sText = 'Yoho'; break;
case 50: sText = 'Bunyon'; break;
}
return(sText);
}
//----------------------------------------------------------------------------------
// Room Data Functions
//----------------------------------------------------------------------------------
// Room_Text(piRoom) string
// Room_ExitN(piRoom) int
// Room_ExitS(piRoom) int
// Room_ExitE(piRoom) int
// Room_ExitW(piRoom) int
// Room_ExitU(piRoom) int
// Room_ExitD(piRoom) int
//----------------------------------------------------------------------------------
function Room_Text(piRoom) {
var sText = ('?' + piRoom + '?');
switch (piRoom) {
case 0: sText = ''; break;
case 1: sText = 'Hotel Room by Window'; break;
case 2: sText = 'Hotel Room in Bed'; break;
case 3: sText = 'Hotel Room by Bed'; break;
case 4: sText = 'Hotel Room in Bathroom'; break;
case 5: sText = 'Hotel Room by Door'; break;
case 6: sText = 'Hotel Room in Closet'; break;
case 7: sText = 'Hotel Room in Hallway'; break;
case 8: sText = 'Small Room'; break;
case 9: sText = 'Hallway at Southern End'; break;
case 10: sText = 'Small Room'; break;
case 11: sText = 'Small Room'; break;
case 12: sText = 'Hallway at Northern End'; break;
case 13: sText = 'Small Room'; break;
case 14: sText = 'Grand Chamber'; break;
case 15: sText = 'Courtyard at the Western Vendor'; break;
case 16: sText = 'Courtyard'; break;
case 17: sText = 'Courtyard at the Eastern Vendor'; break;
case 18: sText = 'Courtyard Gate'; break;
case 19: sText = 'Basement'; break;
case 20: sText = 'Prison Cell'; break;
case 21: sText = 'Road at Mycenae Gate'; break;
case 22: sText = 'Road'; break;
case 23: sText = 'Road'; break;
case 24: sText = 'Road'; break;
case 25: sText = 'Field'; break;
case 26: sText = 'Along River'; break;
case 27: sText = 'Road'; break;
case 28: sText = 'Road'; break;
case 29: sText = 'Field'; break;
case 30: sText = 'Road'; break;
case 31: sText = 'Road at Cleonae Gate'; break;
case 32: sText = 'Cleonae - North Gate'; break;
case 33: sText = 'Cleonae Gate'; break;
case 34: sText = 'Cleonae Gate'; break;
case 35: sText = 'Cleonae Gate'; break;
case 36: sText = 'Cleonae - South Gate'; break;
case 37: sText = 'House of Molorchus'; break;
case 38: sText = 'Nemean Field at Cleonae Gate'; break;
case 39: sText = 'Nemean Field near Forest'; break;
case 40: sText = 'Nemean Field near Forest'; break;
case 41: sText = 'Nemean Forest'; break;
case 42: sText = 'Nemean Forest'; break;
case 43: sText = 'Nemean Forest'; break;
case 44: sText = 'Nemean Forest'; break;
case 45: sText = 'Nemean Forest'; break;
case 46: sText = 'Nemean Forest Outside Cave'; break;
case 47: sText = 'Nemean Forest Outside Cave'; break;
case 48: sText = 'Nemean Cave'; break;
case 49: sText = 'Nemean Cave'; break;
case 50: sText = 'Nemean Cave'; break;
case 51: sText = 'Treasure Room'; break;
}
return(sText);
}
function Room_ExitN(piRoom) {
var iExit = 0;
switch (piRoom) {
case 3: iExit = 1; break;
case 5: iExit = 3; break;
case 7: iExit = 5; break;
case 9: iExit = 12; break;
case 12: iExit = 14; break;
case 16: iExit = 9; break;
case 18: iExit = 16; break;
case 21: iExit = 18; break;
case 22: iExit = 21; break;
case 25: iExit = 22; break;
case 27: iExit = 24; break;
case 29: iExit = 25; break;
case 30: iExit = 28; break;
case 31: iExit = 30; break;
case 32: iExit = 31; break;
case 33: iExit = 32; break;
case 34: iExit = 32; break;
case 35: iExit = 32; break;
case 36: iExit = 34; break;
case 38: iExit = 36; break;
case 40: iExit = 38; break;
case 43: iExit = 39; break;
case 46: iExit = 45; break;
case 47: iExit = 45; break;
case 48: iExit = 46; break;
case 49: iExit = 47; break;
case 51: iExit = 3; break;
}
return(iExit);
}
function Room_ExitS(piRoom) {
var iExit = 0;
switch (piRoom) {
case 1: iExit = 3; break;
case 3: iExit = 5; break;
case 9: iExit = 16; break;
case 12: iExit = 9; break;
case 14: iExit = 12; break;
case 15: iExit = 18; break;
case 16: iExit = 18; break;
case 17: iExit = 18; break;
case 21: iExit = 22; break;
case 22: iExit = 25; break;
case 23: iExit = 24; break;
case 24: iExit = 27; break;
case 25: iExit = 29; break;
case 28: iExit = 30; break;
case 30: iExit = 31; break;
case 31: iExit = 32; break;
case 32: iExit = 34; break;
case 33: iExit = 36; break;
case 34: iExit = 36; break;
case 35: iExit = 36; break;
case 36: iExit = 38; break;
case 38: iExit = 41; break;
case 39: iExit = 43; break;
case 40: iExit = 42; break;
case 41: iExit = 42; break;
case 42: iExit = 44; break;
case 43: iExit = 45; break;
case 44: iExit = 46; break;
case 45: iExit = 47; break;
case 46: iExit = 48; break;
case 47: iExit = 49; break;
case 48: iExit = 50; break;
case 49: iExit = 50; break;
case 51: iExit = 16; break;
}
return(iExit);
}
function Room_ExitE(piRoom) {
var iExit = 0;
switch (piRoom) {
case 4: iExit = 5; break;
case 5: iExit = 6; break;
case 8: iExit = 9; break;
case 9: iExit = 10; break;
case 11: iExit = 12; break;
case 12: iExit = 13; break;
case 15: iExit = 16; break;
case 16: iExit = 17; break;
case 18: iExit = 17; break;
case 19: iExit = 20; break;
case 23: iExit = 22; break;
case 25: iExit = 29; break;
case 26: iExit = 27; break;
case 27: iExit = 28; break;
case 28: iExit = 29; break;
case 29: iExit = 25; break;
case 32: iExit = 35; break;
case 33: iExit = 34; break;
case 34: iExit = 35; break;
case 35: iExit = 37; break;
case 36: iExit = 35; break;
case 38: iExit = 39; break;
case 41: iExit = 43; break;
case 42: iExit = 41; break;
case 44: iExit = 42; break;
case 45: iExit = 43; break;
case 46: iExit = 47; break;
case 50: iExit = 49; break;
case 51: iExit = 34; break;
}
return(iExit);
}
function Room_ExitW(piRoom) {
var iExit = 0;
switch (piRoom) {
case 5: iExit = 4; break;
case 6: iExit = 5; break;
case 9: iExit = 8; break;
case 10: iExit = 9; break;
case 12: iExit = 11; break;
case 13: iExit = 12; break;
case 16: iExit = 15; break;
case 17: iExit = 16; break;
case 18: iExit = 15; break;
case 20: iExit = 19; break;
case 22: iExit = 23; break;
case 24: iExit = 23; break;
case 27: iExit = 26; break;
case 28: iExit = 27; break;
case 29: iExit = 28; break;
case 32: iExit = 33; break;
case 34: iExit = 33; break;
case 35: iExit = 34; break;
case 36: iExit = 33; break;
case 37: iExit = 35; break;
case 38: iExit = 40; break;
case 39: iExit = 38; break;
case 41: iExit = 38; break;
case 42: iExit = 40; break;
case 43: iExit = 41; break;
case 45: iExit = 46; break;
case 46: iExit = 44; break;
case 47: iExit = 46; break;
case 50: iExit = 48; break;
case 51: iExit = 46; break;
}
return(iExit);
}
function Room_ExitU(piRoom) {
var iExit = 0;
switch (piRoom) {
case 2: iExit = 3; break;
case 19: iExit = 11; break;
}
return(iExit);
}
function Room_ExitD(piRoom) {
var iExit = 0;
switch (piRoom) {
case 3: iExit = 2; break;
case 11: iExit = 19; break;
}
return(iExit);
}
//----------------------------------------------------------------------------------
// Verb Data Functions
//----------------------------------------------------------------------------------
// Verb_Short(piVerb) string
// Verb_Text(piVerb) string
//----------------------------------------------------------------------------------
function Verb_Short(piVerb) {
var sText = ('?' + piVerb + '?');
if ((piVerb >= 0) && (piVerb < miVerbCount)) {
switch (piVerb) {
case 0: sText = 'AUT'; break;
case 1: sText = 'GO'; break;
case 2: sText = '*ENT'; break;
case 3: sText = '*RUN'; break;
case 4: sText = '*WAL'; break;
case 5: sText = '*CLI'; break;
case 6: sText = 'JUM'; break;
case 7: sText = 'AT'; break;
case 8: sText = 'CHO'; break;
case 9: sText = '*CUT'; break;
case 10: sText = 'GET'; break;
case 11: sText = '*TAK'; break;
case 12: sText = '*PIC'; break;
case 13: sText = '*CAT'; break;
case 14: sText = 'LIG'; break;
case 15: sText = '*.'; break;
case 16: sText = '*IGN'; break;
case 17: sText = '*BUR'; break;
case 18: sText = 'DRO'; break;
case 19: sText = '*REL'; break;
case 20: sText = '*SPI'; break;
case 21: sText = '*LEA'; break;
case 22: sText = '*GIV'; break;
case 23: sText = '*POU'; break;
case 24: sText = 'THR'; break;
case 25: sText = '*TOS'; break;
case 26: sText = 'QUI'; break;
case 27: sText = 'SWI'; break;
case 28: sText = 'RUB'; break;
case 29: sText = 'LOO'; break;
case 30: sText = '*EXA'; break;
case 31: sText = '*DES'; break;
case 32: sText = 'STO'; break;
case 33: sText = 'SCO'; break;
case 34: sText = 'INV'; break;
case 35: sText = 'SAV'; break;
case 36: sText = 'WAK'; break;
case 37: sText = 'UNL'; break;
case 38: sText = 'REA'; break;
case 39: sText = 'ATT'; break;
case 40: sText = '*SLA'; break;
case 41: sText = '*KIL'; break;
case 42: sText = 'DRI'; break;
case 43: sText = '*EAT'; break;
case 44: sText = '.'; break;
case 45: sText = 'FIN'; break;
case 46: sText = '*LOC'; break;
case 47: sText = 'HEL'; break;
case 48: sText = 'SAY'; break;
case 49: sText = '*SPE'; break;
case 50: sText = '*TAL'; break;
case 51: sText = 'SCR'; break;
case 52: sText = '*YEL'; break;
case 53: sText = '*HOL'; break;
case 54: sText = '.'; break;
case 55: sText = 'FIL'; break;
case 56: sText = 'CRO'; break;
case 57: sText = 'DAM'; break;
case 58: sText = 'MAK'; break;
case 59: sText = '*BUI'; break;
case 60: sText = 'WAV'; break;
case 61: sText = '*TIC'; break;
case 62: sText = '*KIC'; break;
case 63: sText = '*KIS'; break;
case 64: sText = '*TOU'; break;
case 65: sText = '*FEE'; break;
case 66: sText = '*FUC'; break;
case 67: sText = '*HIT'; break;
case 68: sText = '*POK'; break;
case 69: sText = 'OPE'; break;
case 70: sText = 'BUY'; break;
case 71: sText = '*PUR'; break;
case 72: sText = 'HIN'; break;
case 73: sText = 'ABO'; break;
case 74: sText = 'USE'; break;
}
}
else {
Log_Post('*** Verb_Short(' + piVerb + ') --> Index Out of Bounds');
}
return(sText);
}
function Verb_Text(piVerb) {
var sText = ('?' + piVerb + '?');
if ((piVerb >= 0) && (piVerb < miVerbCount)) {
switch (piVerb) {
case 0: sText = 'AUTO'; break;
case 1: sText = 'Go'; break;
case 2: sText = 'Enter'; break;
case 3: sText = 'Run'; break;
case 4: sText = 'Walk'; break;
case 5: sText = 'Climb'; break;
case 6: sText = 'Jump'; break;
case 7: sText = 'At'; break;
case 8: sText = 'Chop'; break;
case 9: sText = 'Cut'; break;
case 10: sText = 'Get'; break;
case 11: sText = 'Take'; break;
case 12: sText = 'Pickup'; break;
case 13: sText = 'Catch'; break;
case 14: sText = 'Light'; break;
case 15: sText = ''; break;
case 16: sText = 'Ignite'; break;
case 17: sText = 'Burn'; break;
case 18: sText = 'Drop'; break;
case 19: sText = 'Release'; break;
case 20: sText = 'Spill'; break;
case 21: sText = 'Leave'; break;
case 22: sText = 'Give'; break;
case 23: sText = 'Pour'; break;
case 24: sText = 'Throw'; break;
case 25: sText = 'Toss'; break;
case 26: sText = 'Quit'; break;
case 27: sText = 'Swim'; break;
case 28: sText = 'Rub'; break;
case 29: sText = 'Look'; break;
case 30: sText = 'Examine'; break;
case 31: sText = 'Describe'; break;
case 32: sText = 'Store'; break;
case 33: sText = 'Score'; break;
case 34: sText = 'Inventory'; break;
case 35: sText = 'Save'; break;
case 36: sText = 'Wake'; break;
case 37: sText = 'Unlock'; break;
case 38: sText = 'Read'; break;
case 39: sText = 'Attack'; break;
case 40: sText = 'Slap'; break;
case 41: sText = 'Kill'; break;
case 42: sText = 'Drink'; break;
case 43: sText = 'Eat'; break;
case 44: sText = ''; break;
case 45: sText = 'Find'; break;
case 46: sText = 'Locate'; break;
case 47: sText = 'Help'; break;
case 48: sText = 'Say'; break;
case 49: sText = 'Speak'; break;
case 50: sText = 'Talk'; break;
case 51: sText = 'Scream'; break;
case 52: sText = 'Yell'; break;
case 53: sText = 'Holler'; break;
case 54: sText = ''; break;
case 55: sText = 'Fill'; break;
case 56: sText = 'Cro???'; break;
case 57: sText = 'Dam'; break;
case 58: sText = 'Make'; break;
case 59: sText = 'Build'; break;
case 60: sText = 'Wave'; break;
case 61: sText = 'Tickle'; break;
case 62: sText = 'Kick'; break;
case 63: sText = 'Kiss'; break;
case 64: sText = 'Touch'; break;
case 65: sText = 'Feel'; break;
case 66: sText = 'F&@k'; break;
case 67: sText = 'Hit'; break;
case 68: sText = 'Poke'; break;
case 69: sText = 'Open'; break;
case 70: sText = 'Buy'; break;
case 71: sText = 'Purchase'; break;
case 72: sText = 'Hint'; break;
case 73: sText = 'About'; break;
case 74: sText = 'Use'; break;
}
}
else {
Log_Post('*** Verb_Text(' + piVerb + ') --> Index Out of Bounds');
}
return(sText);
}
</script>
<script language="JavaScript" xsrc="sdString.js" >
//----------------------------------------------------------------------------------
// (sdString.js)
//----------------------------------------------------------------------------------
// Copyright 1997-2003 by Snowdog Software, llc
//----------------------------------------------------------------------------------
//
// Functions
// ---------
// sdFmtBit(pbBit) string
// sdFmtInt2(piInt) string
// sdInStr(psString, psSearch) int
// sdLeft(psString, piLen) string
// sdLen(psString) int
// sdMid(psString, piIndex) string
// sdRight(psString, piLen) string
// sdTrim(psString) string
// sdUCase(psString) string
//
//----------------------------------------------------------------------------------
function sdFmtBit(pbBit) {
if (pbBit) {
return ('1');
}
else {
return ('0');
}
}
function sdFmtInt2(piInt) {
if (piInt < 10) {
return ('0' + piInt);
}
else {
return ('' + piInt);
}
}
function sdInStr(psString, psSearch) {
var iInStr = (psString.indexOf(psSearch) + 1);
return iInStr;
}
function sdLeft(psString, piLen) {
var sString = psString;
sString = sString.substr(0, piLen);
return sString;
}
function sdLen(psString) {
return psString.length;
}
function sdMid(psString, piIndex) {
var sString = psString;
sString = sString.substr(piIndex-1);
return sString;
}
function sdRight(psString, piLen) {
var sString = psString;
sString = sString.substr(sdLen(sString)-piLen, piLen);
return sString;
}
function sdTrim(psString) {
var sString = psString;
for (var bChange=true; (bChange); ) {
bChange = false;
if (sString.substr(0,1) == ' ') {
bChange = true;
sString = sString.substr(1);
}
if (sdRight(sString, 1) == ' ') {
bChange = true;
sString = sdLeft(sString, sdLen(sString)-1);
}
}
return sString;
}
function sdUCase(psString) {
return psString.toUpperCase();
} </script>
<script language="JavaScript">
function Game_ExecuteCmd() {
var sCommand = document.frmMain.txtAction.value;
Game_Execute(sCommand);
Game_ExecuteVN(0,0);
Room_Refresh();
document.frmMain.txtAction.value = '';
document.frmMain.txtAction.focus();
}
function Game_ExecuteCmdX(psCommand) {
document.frmMain.txtAction.value = psCommand;
Game_ExecuteCmd();
}
function Page_onLoad() {
// Intialize
// ---------
document.title = msAdvTitle;
document.frmMain.txtName.readOnly = true;
document.frmMain.txtName.value = msAdvTitle;
document.frmMain.txtScore.readOnly = true;
document.frmMain.txtScore.value = '?';
document.frmMain.txtTurns.readOnly = true;
document.frmMain.txtTurns.value = '?';
document.frmMain.txtRoom.readOnly = true;
document.frmMain.txtLog.readOnly = true;
document.frmMain.txtAction.value = '';
document.frmMain.txtAction.focus();
Game_Begin();
}
</script>
</body>
</html>

Xet Storage Details

Size:
153 kB
·
Xet hash:
a484d34a99d3315a1c6f5491b6026c959163ba6db30dc348c19acad814ae4fe7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.