#!/usr/local/jacl-1.5/bin/jacl

# -----------------------------------------------------------------------------
	prefix		;Put game identifier here
	constant 	GAME_VERSION	1
# -----------------------------------------------------------------------------

{+intro
if here hasnt OUTDOORS
   move north_wall to here
   move south_wall to here
   move east_wall to here
   move west_wall to here
endall
move ground to here
look
}

object kryten: myself self me
 has		ANIMATE
 short		name "yourself"
 quantity	42
 parent		;PUT THE LABEL OF THE STARTING LOCATION HERE
 player

{examine
write "<P>As beautiful as ever.<P>"
execute "+inventory"
}

{take
write "<P>...seriously?"
set TIME = false
}


{+no_light
write "<p>It is too dark to see.^"
set TIME = false
}

{+title
if player has SITTING
   write "<p>(sitting)</p>^"
endif
}

{+game_over
write "<P>^"
centre "<h2>---[THE END]---</h2>"
if interpreter = TACL
   write "^"
   execute "+score"       
endif
endgame
loop
   if noun3(parent) = player
      set noun3(parent) = limbo
   endif 
endloop
set player(parent) = prologue
look
}

location prologue : prologue

{look
write "<p>The game is over. Type <b>restart</b> or <b>restore</b>."
write "A <b>restore</b> command can optionally be followed by a filename.</p>^"
}

{+header
write "Content-type: text/html"
write "Expire: -1^^"
write "<HTML><HEAD>
write "<TITLE></TITLE>"
execute "+styles"
write "</HEAD><BODY bgcolor=~blue~>"
write "<FORM NAME=~GameForm~ METHOD=get ACTION=~" $url "~>"
}

{+footer
write "<hr><center>"
execute "+exits"
prompt
execute "+score"
write "</centre>"
write "</FORM>"
write "</BODY></HTML>"
}

{+styles
write "<style>"
write "  <!--"
write "  P { 		font-family: Helvetica, Arial, Sanserif; "
write "			color: black; font-size: 12pt}"
write "  TD { 		font-family: Helvetica, Arial, Sanserif; "
write "			color: black; font-size: 12pt}"
write "  A { 		font-family: Helvetica, Arial, Sanserif; "
write "			color: white; font-size: 10pt}"
write "  H1 { 		font-family: Times, Garamond, serif; "
write "			color: white; font-size: 24pt}"
write "  H2 {	 	font-family: Times, Garamond, serif; "
write "			color: black; font-size: 12pt;
write "			font-weight: bold}
write "  TH { 		background-color: #777777;
write "       		font-family: Helvetica, Arial, Sanserif; "
write "			font-weight: bold;"
write "	      		color: black; font-size: 16pt}"
write "  -->"
write "</style>"
}

