This is the place where Access Space participants (Spacers) create wikified web content.

 
-- This alan file is a space station based alien hunt
-- (well, random surreal interaction with aliens) type adventure.
-- This is version 3

IMPORT 'std.i'.

-- this line is important because it makes sure all the standard libraries thatn Alan uses are included.

---------------------------- 


-- Rooms

The bridge Isa location
   NAME 'Bridge'
   DESCRIPTION
   "This is the Bridge. The main controls for the ship are here. Usually the Captain sits in the middle and the Navigation Officer, Communications Officer and Weapons Operator sit at their seats, but everyone is dead. Aliens ate them. I guess I'm in charge now... The elevator leads up and down and doors lead east to west."
schedule alienmove after 3.

if alien nearby then
"You hear scrabbling from the room nearby."
end if.

   Exit west To gun_deck.
   Exit down To engine_room.
   Exit up To medical_bay.
   Exit east To living_quarters.
End The bridge.

The gun_deck Isa location
   NAME 'Gun Deck'
   DESCRIPTION
   "There appears to have been an explosion here. I don't think any of the weapons are still usable. A shame, really, as I'm trapped on an alien-infested spaceship. A door leads east."
schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.
   Exit east To Bridge.
End The gun_deck.

The engine_room Isa location
   NAME 'Engine Room'
   DESCRIPTION
   "The low hum of the engine tells me that it is still active. A door leads to the east and an elevator leads up."
schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.   
Exit east To cargo_bay.
   Exit up To Bridge.
End The engine_room.

The living_quarters Isa location
   NAME 'Living Quarters'
   DESCRIPTION
   "This is the living quarters for the entire crew. My bed is here. It's kind of uncomfortable, but I lived in Sorby Hall during my student years so I'm used to it. Thank God they knocked the place down. A door leads west and an elevator leads up."
schedule alienmove after 3.   
if alien nearby then
"You hear scrabbling from the room nearby."
end if.
Exit west To Bridge.
   Exit up To medical_bay.
End The living_quarters.

The medical_bay Isa location
   NAME 'Medical Bay'
   DESCRIPTION
   "The mangled corpse of the Medical Officer lies under the bed. It appears she tried to fend off the alien using only a scalpel. I can't find any useful supplies here. Doors lead east and northeast. An elevator leads down." 

schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.   
Exit east To laboratory.
   Exit northeast To cryochamber.
   Exit down to bridge.
End The medical_bay.

The laboratory Isa location
   NAME 'Laboratory'
   DESCRIPTION
   "This is the laboratory where the Scientific Officer examines alien specimens we manage to capture. A huge test tube in the midde of the room is, worryingly, broken. Doors lead east and west."
schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.   
Exit east To cryochamber.
   Exit west To medical_bay.
End The laboratory.

The cryochamber Isa location
   NAME 'Cryochamber'
   DESCRIPTION
   "This is the cryochamber. As this is expected to be a long space voyage, maybe hundreds of years, some of the off-duty crew members have gone into cryogenic freezing. I've always wanted to do that. Doors lead west and southwest."
schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.   
Exit southwest To medical_bay.
   Exit west To laboratory.
End The cryochamber.

The cargo_bay Isa location
   NAME 'Cargo Bay'
   DESCRIPTION
   "This room is huge. All our equipment is stored here when we're not using it, including our spare fuel. A door leads west."


schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.   
Exit south to cargo_Bay
     DOES
        "Walking further into the cargo bay reveals more crates."

   END EXIT.
 
   Exit north to cargo_Bay
     DOES
        "Walking further into the cargo bay reveals more crates." 
     END EXIT.

Exit west To engine_room.
End The cargo_bay.

The outer_space Isa location
   NAME 'Outer Space'
   DESCRIPTION
   "You are in outer space."
 schedule alienmove after 3.
if alien nearby then
"You hear scrabbling from the room nearby."
end if.

if genevaconv of alien = 1 then
schedule endingscene after 0.

end if.

exit west to cargo_Bay

DOES
"You return to your ship."
END EXIT.

   Exit north to outer_space
     DOES
        "You drift in space." 
     END EXIT.
  
 Exit south to outer_space
     DOES
        "You drift in space." 
     END EXIT.
  
   
Exit east to outer_space
     DOES
        "You drift in space." 
     END EXIT.
   
Exit up to outer_space
     DOES
        "You drift in space." 
     END EXIT.
  
 Exit down to outer_space
     DOES
        "You drift in space." 
     END EXIT.
  

End The outer_space.


------------------------

-- objects

THE spacesuit Isa OBJECT AT nowhere.
NAME spacesuit

IS WEARABLE.
	
DESCRIPTION
"There is a spacesuit here."

verb EXAMINE

does ONLY 

"This is a spacesuit. It just about fits me."

END VERB.

END THE spacesuit.


THE alien Isa ACTOR at nowhere.
NAME alien.
is not takeable.
is shootable.
has health 50.
has dex 0.
has genevaconv 0.

DESCRIPTION

"A blood-sucking evil alien is crouching in the corner of the room, waiting to pounce."



Verb ask
    Does ONLY
      If topic = ball Then
        "'Balls do not taste nice.', says the alien."
      ElsIf topic = humans Then
        "'Humans are tasty.', says the alien."
      ElsIf topic = aliens Then
        "'I do not eat other aliens.', says the alien."
       ElsIf topic = food Then
        "'I have very sophisticated tastes in food.', says the alien."
       ElsIf topic = itself Then
        "'I am hungry.', says the alien."
       Else 
        "'Don't ask me, I'm just an alien.'"
      End If.
  End Verb.
 
verb tell 
does ONLY
If topic = geneva Then
        "You make a copy of the Geneva Convention in the alien's own language and, after some persuasion, the alien signs it. Congratulations, you've just negotiated the first step towards interplanetary peace."
         set genevaconv of alien to 1.
 Else 
        "'I don't know, I'm just an alien.'"
      End If.
  End Verb.
 

verb attack
does only
schedule hit_alien after 0.
schedule alien_counter after 0.
end verb.

verb say_to
does ONLY
     If topic = hello Then
        "'Hello, tasty-looking human.', says the alien."
   ElsIf topic = goodbye Then
        "'Come back soon, tasty-looking human.', says the alien."
       ElsIf topic = bollocks Then
        "'Please do not swear.', says the alien."
  
 Else 
        "'I don't know, I'm just an alien.'"
end if.
end Verb.

verb EXAMINE

does ONLY


if spacesuit not In worn
then 
"You prod the alien with a stick. It eats you."
Quit.
else 
"Fortunately for you, spacesuits aren't edible, and as you prod it with a stick it just swipes at you for 2 points of damage."
set health of hero to health of hero - 2.
"Your health falls to" say  health of hero.

end if. 
END VERB.



END THE alien.

the airlock isa object at cargo_bay.
name airlock.
is not takeable.
is openable.
is not open.

DESCRIPTION 
"Mounted in one wall is an airlock."

verb OPEN 
DOES ONLY

"The airlock door opens with a swish."

LOCATE hero AT outer_space.
schedule inspace after 0.

end verb.

END THE airlock.



the box isa Object at gun_deck.
NAME box.
Container.
is openable.
has cat_status 0.

DESCRIPTION 
"In the corner of the room is a box, one of the most sophisticated military stealth devices you have ever seen."

verb open does only

"You open the box."

schedule schrodinger after 0.

end verb.
end the box.

The aliens Isa object
End The aliens.

The ball Isa object
End The ball.

The humans Isa object
End The humans.

The itself Isa object
End The itself.

The hello Isa object
End The hello.

The goodbye Isa object
End The goodbye.

The bollocks Isa object
End The bollocks.

The geneva Isa object
NAME geneva NAME convention 
NAME geneva convention
End The geneva.


-- events

event heromove

LOCATE hero AT RANDOM IN {bridge, gun_deck, engine_room, living_quarters, medical_bay, laboratory, cryochamber, cargo_bay}.

end event.
 
event endingscene

"In the distance, you see a sleek white shape that you recognise as an official ship of the Interplanetary Defense Force. A signal must have reached it from the ship's communication systems.

They notice the wreckage of your ship and approach it. After returning to the ship, you explain what happened. The alien confirms that it is the truth. You are forgiven for doing illegal experiments on aliens, the alien is forgiven for trying to eat you and both fo you are returned to your home planets. Congratulations, you survived."

Quit.

end event. 
  


event hit_alien

"You whack the alien over the head with the first object you find."
set dex of hero to random 0 to 10.
if dex of hero > 5 then "You hit."
set health of alien to health of alien - 2.
"The alien's health falls to" say  health of alien.
else 
"You miss."
end if.

if health of alien = 0
then 
"You have slain the alien."
locate alien at nowhere.
end if.

end event.



event alien_counter
"The alien swipes at you with its venomous claws."

set dex of alien to random 0 to 10.
if dex of alien > 5 then "It hits you."
set health of hero to health of hero - 2.
"Your health falls to" say  health of hero.
else "It misses."
end if.

if health of hero = 0 
then 
"You fall to the floor in a mangled bloody heap."
quit.
end if.

end event.

event schrodinger

set cat_status of box to random 1 to 2.

 if cat_status of box = 1 then "Inside is a cat. The cat is alive."
 else "Inside is a cat. The cat is dead."  

end if.
end event.

event alienmove

LOCATE alien AT RANDOM IN {bridge, gun_deck, engine_room, living_quarters, medical_bay, laboratory, cryochamber, cargo_bay}.

end event.

event inspace
if spacesuit not in worn
then 
"You explode rather dramatically."
Quit.
end if.
end event.

-- things that need to happen right at the start

START AT nowhere.
schedule heromove after 0.

LOCATE alien AT RANDOM IN {bridge, gun_deck, engine_room, living_quarters, medical_bay, laboratory, cryochamber, cargo_bay}.

LOCATE spacesuit AT RANDOM IN {bridge, gun_deck, engine_room, living_quarters, 
medical_bay, laboratory, cryochamber, cargo_bay}.

 
if/source.txt · Last modified: 2008/01/04 18:02 by doan
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki