home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / games2 / trellis / !Pyramid / DataFiles / Script < prev    next >
Encoding:
Text File  |  1995-10-22  |  15.5 KB  |  390 lines

  1. The Sacred Pyramid
  2. Archimedes version
  3. (c)1991-5 Soft Rock Software
  4.  
  5. REM ********************** 1: Initialise stores, etc. *************************
  6.  
  7. REM **** Player has no light source
  8. LET Store%(0)=0
  9. LET Store%(20)=0
  10.  
  11. REM **** Weight limit and weight carried
  12. LET Store%(1)=100
  13. LET Store%(2)=0
  14.  
  15. REM **** Player start location
  16. LET Store%(3)=2
  17.  
  18. REM ********************** 2: Describe location *******************************
  19.  
  20. :movement_loop
  21.  CLS
  22. :look_loop
  23.  LOOK
  24.  
  25. REM ********************** 3: Conditions 1 ************************************
  26.  
  27. REM **** is player in desert?
  28. IF Store%(3)=1 THEN GOTO game_won
  29.  
  30. REM **** is player in trap?
  31. IF Store%(3)>=29 THEN GOTO game_over
  32.  
  33. REM **** comment on hole in 9
  34. IF Store%(3)=9 AND North%(9)=0 THEN PRINT" There is a small hole in the floor near the base of the North wall."
  35.  
  36. REM **** has player taken diamond from room 13 to room 9?
  37. IF Store%(3)=9 AND Location%(3)=0 THEN
  38.  PRINT" You can feel warmth coming from the diamond you carry. Looking down at it, you can see that it is beginning to glow. A mist forms in the air around you, and you begin to find yourself struggling more and more for each breath."''
  39.  PRINT"As the moment of death approaches you hear a deep voice in your head, saying 'You have removed the Chameleon Crystal from the Death Chamber of Atstulis. You must be punished with death...."''
  40.  PRINT" The diamond is ripped from your clutch and flies into the chamber to the North, just as you lose consciousness..."''
  41.  GOTO game_over
  42. END IF
  43.  
  44. REM **** If player has moved North to 16, roof must collapse South
  45. IF Store%(3)=16 AND North%(11)=16 THEN
  46.  PRINT" The roof of the passage to the South collapses, blocking your exit in that direction."
  47.  LET North%(11)=0
  48.  LET South%(16)=0
  49. END IF
  50.  
  51. REM **** If player has passed through secret door from 15 to 10, door must close
  52. IF Store%(3)=10 AND East%(15)=10 THEN
  53.  PRINT" The secret door through which you have just come closes with such force that the whole pyramid shakes. There is no longer an exit West."
  54.  LET East%(15)=0
  55.  LET West%(10)=0
  56. END IF
  57.  
  58. REM **** If player at 21/25 secret door at 24 closes (if open)
  59. IF (Store%(3)=21 OR Store%(3)=25) AND North%(24)=27 THEN
  60.  PRINT" The secret door in the section of passage you have just left closes, causing the whole pyramid to shudder."
  61.  LET North%(24)=0
  62.  LET South%(27)=0
  63. END IF
  64.  
  65. REM **** If player at 21/17 secret door at 28 closes (if open)
  66. IF (Store%(3)=21 OR Store%(3)=17) AND West%(28)=26 THEN
  67.  PRINT" The secret door in the section of passage you have just left closes, causing the whole pyramid to shudder."
  68.  LET West%(28)=0
  69.  LET East%(26)=0
  70. END IF     
  71.  
  72. REM **** start a new line after location descriptions
  73. PRINT'
  74.  
  75. REM ********************** 4: Player input ************************************
  76.  
  77. :input_loop
  78.  INPUT
  79.  IF FNSaid("QUIT") THEN
  80.   QUIT
  81.   GOTO input_loop
  82.  END IF
  83.  REM **** increment counter. when this reaches 8, players eyes will be adjusted
  84.  REM      to the dark if he/she can't see.
  85.  LET Store%(20)=Store%(20)+1
  86.      
  87. REM ********************** 5: Conditions 2 ************************************
  88.  
  89. REM **** check if player's eyes adjusted to the dark.
  90. IF Store%(20)=8 AND Store%(0)=0 THEN
  91.  PRINT'"Your eyes begin to adjust to the darkness. In the gloom you can see only shadows at first, but they soon become solid shapes."''"You are now able to see!!"'
  92.  LET Store%(0)=1
  93. END IF
  94.  
  95. REM **** commands that Trellis can deal with 100% automatically
  96. IF FNSaid("EAST") OR FNSaid("WEST") OR FNSaid("UP") THEN GOTO process_command
  97. IF FNSaid("DOWN") OR FNSaid("INV") THEN GOTO process_command
  98.  
  99. REM **** at 7, walk North through waterfall
  100. IF Store%(3)=7 AND FNSaid("NORTH") THEN
  101.  PRINT"You walk into the waterfall and find that there is no wall beyond it. You pass through into another passage."'
  102.  LET Store%(3)=9
  103.  GOTO look_loop
  104. END IF
  105. IF FNSaid("NORTH") THEN GOTO process_command
  106.  
  107. REM **** at 9, walk South through waterfall
  108. IF Store%(3)=9 AND FNSaid("SOUTH") THEN
  109.  PRINT"You walk into the waterfall and find that there is no wall beyond it. You pass through into another passage."'
  110.  LET Store%(3)=7
  111.  GOTO look_loop
  112. END IF
  113. IF FNSaid("SOUTH") THEN GOTO process_command
  114.  
  115. REM **** player asks for help
  116. IF FNSaid("HELP") THEN GOTO help
  117.  
  118. REM **** if player says look, jump to look_loop (makes mentioning hole in room
  119. REM      9 occur after player walks through waterfall.)
  120. IF FNSaid("LOOK") THEN GOTO look_loop
  121.  
  122. REM **** player says wait - do nothing
  123. IF FNSaid("WAIT") THEN
  124.  PRINT"You wait. Nothing happens."'
  125.  GOTO input_loop
  126. END IF
  127.  
  128. REM **** at 9, player examines hole
  129. IF FNSaid("EXAMINE") AND FNSaid("HOLE") AND Store%(3)=9 THEN
  130.  IF North%(9)=0 THEN PRINT"The hole is about two inches in diameter. "
  131.  IF Location%(5)=0 THEN PRINT"It is just the right size for the ruby."
  132.  IF North%(9)=13 THEN PRINT"The ruby has been placed in the hole."
  133.  PRINT'
  134.  GOTO input_loop
  135. END IF
  136.  
  137. REM **** at 2, put orb on pedestal to open exit door
  138. IF (FNSaid("DROP") OR FNSaid("PUT")) AND FNSaid("ORB") AND FNSaid("PEDESTAL") THEN
  139.  IF Store%(3)<>2 OR Location%(2)<>0 THEN GOTO you_cant
  140.  DROP ORB
  141.  LET South%(2)=1
  142.  LET North%(1)=2
  143.  PRINT"The heavy stone door to the South opens. From beyond, you can see a clear blue sky. The Sun is beating down on the yellow sands of the desert."'
  144.  LET Room$(2)="You are in a passage. It is light here, due to the sunlight shining in through the door to the South, beyond which lies the desert."
  145.  GOTO input_loop
  146. END IF                                              
  147.  
  148. REM **** at 2, take orb from pedestal to close exit door
  149. IF FNSaid("GET") AND FNSaid("ORB") AND Location%(2)=2 AND Store%(3)=1 THEN
  150.  GET ORB
  151.  IF South%(2)=0 THEN GOTO input_loop
  152.  PRINT"The stone door to the South closes very quickly and with such force that the walls and floor around you shake. The sudden change from light to dark leaves you unable to see."'
  153.  LET Room$(2)="You are in a passage. It is very dark, but your eyes are suitably adjusted for you to see. The walls are a rough cut stone, and the passage is high and wide."
  154.  LET Store%(20)=0
  155.  LET Store%(0)=0
  156.  LET South%(2)=0
  157.  LET North%(1)=0
  158.  GOTO input_loop
  159. END IF
  160.  
  161. REM **** at 9, put ruby in hole to open door
  162. IF (FNSaid("DROP") OR FNSaid("PUT")) AND FNSaid("RUBY") AND FNSaid("HOLE") THEN
  163.  IF Store%(3)<>9 AND Location%(5)<>0 THEN GOTO you_cant
  164.  DROP RUBY
  165.  LET North%(9)=13
  166.  LET South%(13)=9
  167.  PRINT"You hear the sound of stone scraping against stone, as a stone door swings open to the North."'
  168.  GOTO input_loop
  169. END IF
  170.  
  171. REM **** at 9, get ruby from hole to close door
  172. IF FNSaid("GET") AND FNSaid("RUBY") AND Location%(5)=9 AND Store%(3)=9 THEN
  173.  GET RUBY
  174.  LET North%(9)=0
  175.  LET South%(13)=0                                              
  176.  PRINT"You hear the sound of stone scraping against stone, as a stone door swings closed to the North."'
  177.  GOTO input_loop
  178. END IF
  179.  
  180. REM **** Dip sword in wrong pool (at 27) - lose sword
  181. IF Store%(3)=27 AND FNSaid("DIP") AND FNSaid("SWORD") AND FNSaid("WATER") THEN
  182.  IF Location%(8)<>0 THEN GOTO you_cant
  183.  PRINT"Okay."'
  184.  PRINT"The sword gets wet. When you lift it out of the pool, the sword starts to melt. Dripping into the pool, the sword turns to water. Soon, nothing remains of it."'
  185.  LET Location%(8)=-1
  186.  GOTO input_loop
  187. END IF
  188.  
  189. REM **** Dip sword in right pool (at 26) - enchant sword
  190. IF Store%(3)=26 AND FNSaid("DIP") AND FNSaid("SWORD") AND FNSaid("WATER") THEN
  191.  IF Location%(8)<>0 THEN GOTO you_cant
  192.  PRINT"Okay."'
  193.  IF List$(8)="an enchanted sword" THEN GOTO input_loop
  194.  PRINT"The sword gets wet. When you lift it out of the pool, you realise it seems to weigh much less than before. The hilt seems to change shape to suit your hand, and something in your head tells you that it is now enchanted."'
  195.  LET List$(8)="an enchanted sword"
  196.  LET Examine$(8)="Though big, the sword is very light. The jewel studded hilt is just the right size and shape to fit comfortably in your hand. Something in your mind tells you that the sword is enchanted."
  197.  GOTO input_loop
  198. END IF
  199.  
  200. REM **** Drink water at 7,9,26,27 - all water in Pyramid is poisonous
  201. IF FNSaid("DRINK") AND FNSaid("WATER") THEN
  202.  IF Store%(3)<>9 AND Store%(3)<>13 AND Store%(3)<>26 AND Store%(3)<>27 THEN GOTO you_cant
  203.  PRINT"Okay."'"The water tastes cool and fresh."'"Suddenly, you find yourself without breath. You collapse to the floor, choking, and soon lose consciousness...."'(
  204.  GOTO game_over
  205. END IF
  206.  
  207. REM **** Take ruby at 14
  208. IF FNSaid("GET") AND FNSaid("RUBY") AND Store%(3)=14 AND Location%(5)=14 THEN
  209.  IF Location%(6)=-1 THEN GOTO process_command
  210.  PRINT"As you go to take the ruby, the ghoul lets out an ear splitting wail. The air around the ruby freezes, and you have to pull your hand back sharply."'
  211.  GOTO input_loop
  212. END IF
  213.  
  214. REM **** Fight ghoul at 14 (go to routine in section 10 to win or lose)
  215. IF FNSaid("FIGHT") AND FNSaid("GHOUL") AND Store%(3)=Location%(6) THEN
  216.  IF Location%(8)=0 AND List$(8)="an enchanted sword" THEN GOTO win_fight
  217.  GOTO lose_fight
  218. END IF                         
  219.  
  220. REM **** Read text at 10
  221. IF (FNSaid("READ") OR FNSaid("EXAMINE")) AND FNSaid("TEXT") AND Store%(3)=10 THEN
  222.  PRINT"The marks on the wall appear to have been put there by someone else who was once trapped in the Pyramid. It says:"
  223.  PRINT" 'To all who follow me. I know now how to escape from this tomb but, alas, it is too late for me for I am weak and dying. The waterfall is a door. To the North, beyond it is the Burial Chamber of Atstulis."
  224.  PRINT" In the chamber is an Orb. Take this, and place it on the pedestal in the entrance passage and you will be free. The chamber itself is locked. You will need the key to open it, a ruby."
  225.  PRINT" That, however, is protected by an evil ghoul. You need an enchanted weapon to destroy it. If you have a weapon, dip it in the holy pool to enchant it. I wish you the luck that wasn't with me.'"'
  226.  GOTO input_loop
  227. END IF
  228.  
  229.  
  230. REM **** Take staff at 15 to open door to 10
  231. IF FNSaid("TAKE") AND FNSaid("STAFF") AND Store%(3)=15 AND East%(15)=0 THEN
  232.  PRINT"You are unable to take the staff, but in trying you trigger a mechanism that opens a secret door leading East."'
  233.  LET East%(15)=10
  234.  LET West%(10)=15
  235.  GOTO input_loop
  236. END IF
  237.  
  238. REM **** Take staff at 15 to close door to 10
  239. IF FNSaid("TAKE") AND FNSaid("STAFF") AND Store%(3)=15 AND East%(15)=10 THEN
  240.  PRINT"You are unable to take the staff, but in trying you trigger a mechanism that closes the door leading East."'
  241.  LET East%(15)=0
  242.  LET West%(10)=0
  243.  GOTO input_loop
  244. END IF
  245.  
  246. REM **** Stand on slab at 28 to open door to 26
  247. IF FNSaid("STAND") AND FNSaid("SLAB") AND Store%(3)=28 AND West%(28)=0 THEN
  248.  PRINT"You hear a loud scraping noise, like stone moving against stone, and a heavy stone door opens to reveal another exit."'
  249.  LET West%(28)=26
  250.  LET East%(26)=28
  251.  GOTO input_loop
  252. END IF
  253.  
  254. REM **** Stand on slab at 24 to open door to 27
  255. IF FNSaid("STAND") AND FNSaid("SLAB") AND Store%(3)=24 AND North%(24)=0 THEN
  256.  PRINT"You hear a loud scraping noise, like stone moving against stone, and a heavy stone door opens to reveal another exit."'
  257.  LET North%(24)=27
  258.  LET South%(27)=24
  259.  GOTO input_loop
  260. END IF       
  261.  
  262. REM ********************** 6: Act on player input *****************************
  263.  
  264. :process_command
  265. COMMAND
  266.  
  267. REM ********************** 7: Loop ********************************************
  268.  
  269. IF Moved% THEN GOTO movement_loop
  270. GOTO input_loop
  271.  
  272. REM ********************** 8: End game ****************************************
  273.  
  274. :game_won
  275. PRINT'''"Congratulations."'''
  276. GOTO end_game
  277.  
  278. :game_over
  279. PRINT'''"Hard luck."'''
  280.  
  281. :end_game
  282. RESTART
  283.  
  284. REM ********************** 9: Routines ****************************************
  285.                                       
  286. REM **** player fights ghoul and wins
  287. :win_fight
  288. PRINT'"You attack the ghoul with your sword. Normally, this would be a fruitless effort, since the ghoul does not physically exist in this world, and the sword would just slice through the air as if there were nothing there."
  289. PRINT" However, because the sword is enchanted you are somehow able to strike the spirit again and again, weakening it more and more with each blow. Eventually the ghoul vanishes with a shriek. You have defeated it."'
  290. LET Location%(6)=-1
  291. GOTO input_loop
  292.  
  293. REM **** player fights ghoul and loses
  294. :lose_fight
  295. IF Location%(8)=0 THEN
  296.  PRINT'"You attack the ghoul with your sword. This turns out to be a fruitless effort as the ghoul does not physically exist in this world, and the sword is just cutting through the air with nothing to land home on."
  297. ELSE 
  298.  PRINT'"You attack the ghoul with your fists. This turns out to be a fruitless effort as the ghoul does not physically exist in this world, and you are just punching the air."
  299. END IF
  300. PRINT" The ghoul is angered by your attack, and opens it's arms. You feel a sudden, freezing cold wind which makes you shudder. The wind doesn't stop, and you can see your hands turning blue as you shiver uncontrollably."
  301. PRINT'"You fall to your knees as the wind becomes stronger and colder, and then onto your side. The last thing you remember before you black out is an evil laugh that seems to be coming from inside your head..."
  302. GOTO game_over
  303.  
  304. REM **** help routine
  305. :help
  306.  
  307. REM **** tell player to wait for eyes to adjust to dark, if need be.
  308. IF Store%(0)=0 THEN
  309.  PRINT'"Obviously, you will need to be able to see. I therefore suggest that you wait for your eyes to adjust to the dark."'
  310.  GOTO input_loop
  311. END IF
  312.  
  313. REM **** Check for other words with help command, ie player wants specific help.
  314. REM      The player can only have help with something seen or carried.
  315.  
  316. REM **** Help with Pedestal
  317. IF FNSaid("PEDESTAL") AND Store%(3)=2 THEN
  318.  PRINT"The pedestal should have an orb on it."'
  319.  GOTO input_loop
  320. END IF
  321.  
  322. REM **** Help with Orb
  323. IF FNSaid("ORB") AND (Location%(2)=Store%(3) OR Location%(2)=0) THEN
  324.  PRINT"The orb must be placed on a pedestal."'
  325.  GOTO input_loop
  326. END IF
  327.  
  328. REM **** Help with diamond
  329. IF FNSaid("DIAMOND") AND (Location%(3)=Store%(3) OR Location%(3)=0) THEN
  330.  PRINT"The diamond must remain in the burial chamber of Atstulis."'
  331.  GOTO input_loop
  332. END IF
  333.  
  334. REM **** Help with Ruby
  335. IF FNSaid("RUBY") AND (Location%(5)=Store%(3) OR Location%(5)=0) THEN
  336.  PRINT"The ruby must is the key to the burial chamber of Atstulis."'
  337.  GOTO input_loop
  338. END IF
  339.  
  340. REM **** Help with ghoul
  341. IF FNSaid("GHOUL") AND Location%(6)=Store%(3) THEN
  342.  PRINT"The ghoul must be killed with an enchanted weapon."'
  343.  GOTO input_loop
  344. END IF
  345.  
  346. REM **** Help with statue
  347. IF FNSaid("STATUE") AND Store%(3)=15 AND East%(15)=0 THEN
  348.  PRINT"The staff is the key to a secret door."'
  349.  GOTO input_loop
  350. END IF
  351.  
  352. REM **** Help with sword
  353. IF FNSaid("SWORD") AND (Location%(8)=Store%(3) OR Location%(8)=0) AND List$(8)="a sword" THEN
  354.  PRINT"The sword must be dipped in holy water."'
  355.  GOTO input_loop
  356. END IF
  357.  
  358. REM **** Help with hole
  359. IF FNSaid("HOLE") AND Store%(3)=9 THEN
  360.  PRINT"The hole was made for a ruby. It is a keyhole."'
  361.  GOTO input_loop
  362. END IF
  363.  
  364. REM **** Help with water
  365. IF FNSaid("WATER") THEN
  366.  IF Store%(3)=7 OR Store%(3)=9 THEN PRINT"The artificial waterfall is a doorway."'
  367.  IF Store%(3)=26 THEN PRINT"The water in the pool is holy water."'
  368.  IF Store%(3)=27 THEN PRINT"The water in the pool is unholy water."'
  369.  IF Store%(3)=7 OR Store%(3)=9 OR Store%(3)=26 OR Store%(3)=27 THEN GOTO input_loop
  370. END IF
  371.  
  372. REM **** help with slabs (slabs not entered by player - location checked instead)
  373. IF Store%(3)=24 OR Store%(3)=28 THEN
  374.  PRINT"The slab is a key to a secret door. It is opened with weight."'
  375.  GOTO input_loop
  376. END IF
  377.  
  378. REM **** tell player there are clues within the game. Display location number
  379. REM      to aid mapping.
  380. PRINT'"There is a major clue somewhere in the game. It tells you most of what you need to know, the rest you must work out for yourself. What I can do is help you to map the pyramid by telling you that you are in location "[Store%(3)]'
  381. GOTO input_loop
  382.  
  383. REM **** player entered command that cant be carried out.
  384. :you_cant
  385. PRINT"You can't do that."'
  386. GOTO input_loop
  387.  
  388.  
  389. STOP
  390.