home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume14 / dunnet / part01 < prev    next >
Encoding:
Text File  |  1992-08-30  |  55.7 KB  |  1,603 lines

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i028:  dunnet - emacs-lisp text adventure, Part01/02
  5. Message-ID: <3323@master.CNA.TEK.COM>
  6. Date: 4 Aug 92 19:59:29 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1592
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: ronnie@eddie.mit.edu (Ron Schnell)
  12. Posting-number: Volume 14, Issue 28
  13. Archive-name: dunnet/Part01
  14. Environment: gnu-emacs, emacs-lisp
  15.  
  16.     [I don't use gnu-emacs and so haven't tried this.  -br]
  17.  
  18. [From the author...]
  19. Dunnet is a text adventure game written in emacs-lisp.  It requires
  20. that you have gnu-emacs, and the usual lisp libraries that come with it.
  21.  
  22. Please e-mail me any comments or questions, especially if you find it
  23. too easy or hard.
  24.  
  25. See the README for further information.
  26.  
  27. #! /bin/sh
  28. # This is a shell archive.  Remove anything before this line, then unpack
  29. # it by saving it into a file and typing "sh file".  To overwrite existing
  30. # files, type "sh file -c".  You can also feed this as standard input via
  31. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  32. # will see the following message at the end:
  33. #        "End of archive 1 (of 2)."
  34. # Contents:  MANIFEST LCD-entry dun-globals.el dun-unix.el makefile
  35. # Wrapped by billr@saab on Tue Aug  4 12:57:54 1992
  36. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  37. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  38.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  39. else
  40. echo shar: Extracting \"'MANIFEST'\" \(517 characters\)
  41. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  42. X   File Name        Archive #    Description
  43. X-----------------------------------------------------------
  44. X COPYRIGHT                  2    
  45. X LCD-entry                  1    
  46. X MANIFEST                   1    This shipping list
  47. X dun-batch.el               2    
  48. X dun-commands.el            2    
  49. X dun-globals.el             1    
  50. X dun-main.el                2    
  51. X dun-save.el                2    
  52. X dun-unix.el                1    
  53. X dun-util.el                2    
  54. X dunnet                     2    
  55. X dunnet.window              2    
  56. X makefile                   1    
  57. END_OF_FILE
  58. if test 517 -ne `wc -c <'MANIFEST'`; then
  59.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  60. fi
  61. # end of 'MANIFEST'
  62. fi
  63. if test -f 'LCD-entry' -a "${1}" != "-c" ; then 
  64.   echo shar: Will not clobber existing file \"'LCD-entry'\"
  65. else
  66. echo shar: Extracting \"'LCD-entry'\" \(133 characters\)
  67. sed "s/^X//" >'LCD-entry' <<'END_OF_FILE'
  68. X;; LCD Archive Entry:
  69. X;; dunnet|Ron Schnell|ronnie@eddie.mit.edu
  70. X;; |Text adventure.
  71. X;; |92-07-25|Version: 1.0|~/games/dunnet.tar.Z|
  72. END_OF_FILE
  73. if test 133 -ne `wc -c <'LCD-entry'`; then
  74.     echo shar: \"'LCD-entry'\" unpacked with wrong size!
  75. fi
  76. # end of 'LCD-entry'
  77. fi
  78. if test -f 'dun-globals.el' -a "${1}" != "-c" ; then 
  79.   echo shar: Will not clobber existing file \"'dun-globals.el'\"
  80. else
  81. echo shar: Extracting \"'dun-globals.el'\" \(37374 characters\)
  82. sed "s/^X//" >'dun-globals.el' <<'END_OF_FILE'
  83. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  84. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  85. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  86. X;;;
  87. X;;;       Globals
  88. X;;;
  89. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  90. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  91. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  92. X
  93. X;;;; IMPORTANT
  94. X;;;; All globals which can change must be saved from 'save-game.  Add
  95. X;;;; all new globals to bottom of file.
  96. X
  97. X(setq visited '(27))
  98. X(setq current-room 1)
  99. X(defvar dungeon-mode-map nil)
  100. X(setq dungeon-mode-map (make-sparse-keymap))
  101. X(define-key dungeon-mode-map "\r" 'dungeon-parse)
  102. X(setq computer nil)
  103. X(setq door1 'locked)
  104. X(setq key-level 0)
  105. X(setq hole nil)
  106. X(setq correct-answer nil)
  107. X(setq lastdir 0)
  108. X(setq numsaves 0)
  109. X(setq numcmds 0)
  110. X(setq wizard nil)
  111. X(setq endgame-question nil)
  112. X(setq logged-in nil)
  113. X(setq dungeon-mode 'dungeon)
  114. X(setq unix-verbs '((ls . ls) (ftp . ftp) (echo . echo) (exit . uexit) (cd . cd)
  115. X           (pwd . pwd) (rlogin . rlogin) (uncompress . uncompress)
  116. X           (cat . cat) (zippy . zippy)))
  117. X
  118. X(setq batch-mode nil)
  119. X
  120. X(setq cdpath "/usr/toukmond")
  121. X(setq cdroom -10)
  122. X(setq uncompressed nil)
  123. X(setq ethernet t)
  124. X(setq restricted '(room-objects dungeon-map rooms room-silents))
  125. X(setq path "/usr/toukmond")
  126. X(setq ftptype 'ascii)
  127. X(setq endgame nil)
  128. X(setq gottago t)
  129. X(setq jar nil)
  130. X(setq black nil)
  131. X
  132. X(setq rooms '(
  133. X          (
  134. X"You are in the treasure room.  A door leads out to the north."
  135. X               "Treasure room"
  136. X           )
  137. X          (
  138. X"You are at a dead end of a dirt road.  The road goes to the east.
  139. XIn the distance you can see that it will eventually fork off.  The
  140. Xtrees here are very tall royal palms, and they are spaced equidistant
  141. Xfrom each other."
  142. X           "Dead end"
  143. X           )
  144. X          (
  145. X"You are on the continuation of a dirt road.  There are more trees on
  146. Xboth sides of you.  The road continues to the east and west."
  147. X               "E/W Dirt road"
  148. X           )
  149. X          (
  150. X"You are at a fork of two passages, one to the northeast, and one to the
  151. Xsoutheast.  You can also go back west."
  152. X               "Fork"
  153. X           )
  154. X          (
  155. X"You are on a northeast/southwest road."
  156. X               "NE/SW road"
  157. X           )
  158. X          (
  159. X"You are at the end of the road.  There is a building in front of you
  160. Xto the northeast, and the road leads back to the southwest."
  161. X               "Building front"
  162. X           )
  163. X          (
  164. X"You are on a southeast/northwest road."
  165. X               "SE/NW road"
  166. X           )
  167. X          (
  168. X"You are standing at the end of a road.  A passage leads back to the
  169. Xnorthwest."
  170. X               "Bear hangout"
  171. X           )
  172. X          (
  173. X"You are in the hallway of an old building.  There are rooms to the east
  174. Xand west, and doors leading out to the north and south."
  175. X               "Old Building hallway"
  176. X           )
  177. X          (
  178. X"You are in a mailroom.  There are many bins where the mail is usually
  179. Xkept.  The exit is to the west."
  180. X               "Mailroom"
  181. X           )
  182. X          (
  183. X"You are in a computer room.  It seems like most of the equipment has
  184. Xbeen removed.  There is a VAX 11/780 in front of you, however, with
  185. Xone of the cabinets wide open.  A sign on the front of the machine
  186. Xsays: This VAX is named 'pokey'.  To type on the console, use the
  187. X'type' command.  The exit is to the east."
  188. X               "Computer room"
  189. X           )
  190. X          (
  191. X"You are in a meadow in the back of an old building.  A small path leads
  192. Xto the west, and a door leads to the south."
  193. X               "Meadow"
  194. X           )
  195. X          (
  196. X"You are in a round, stone room with a door to the east.  There
  197. Xis a sign on the wall that reads: 'receiving room'."
  198. X               "Receiving room"
  199. X           )
  200. X          (
  201. X"You are at the south end of a hallway that leads to the north.  There
  202. Xare rooms to the east and west."
  203. X               "Northbound Hallway"
  204. X           )
  205. X          (
  206. X"You are in a sauna.  There is nothing in the room except for a dial
  207. Xon the wall.  A door leads out to west."
  208. X               "Sauna"
  209. X               )
  210. X          (
  211. X"You are at the end of a north/south hallway.  You can go back to the south,
  212. Xor off to a room to the east."
  213. X               "End of N/S Hallway"
  214. X           )
  215. X          (
  216. X"You are in an old weight room.  All of the equipment is either destroyed
  217. Xor completely broken.  There is a door out to the west, and there is a ladder
  218. Xleading down a hole in the floor."
  219. X               "Weight room"                 ;16
  220. X           )
  221. X          (
  222. X"You are in a maze of twisty little passages, all alike.
  223. XThere is a button on the ground here."
  224. X               "Maze"
  225. X           )
  226. X          (
  227. X"You are in a maze of little twisty passages, all alike."
  228. X               "Maze"
  229. X           )
  230. X          (
  231. X"You are in a maze of thirsty little passages, all alike."
  232. X               "Maze"    ;19
  233. X           )
  234. X          (
  235. X"You are in a maze of twenty little passages, all alike."
  236. X               "Maze"
  237. X           )
  238. X          (
  239. X"You are in a daze of twisty little passages, all alike."
  240. X               "Maze"   ;21
  241. X           )
  242. X          (
  243. X"You are in a maze of twisty little cabbages, all alike."
  244. X               "Maze"   ;22
  245. X           )
  246. X          (
  247. X"You are in a reception area for a health and fitness center.  The place
  248. Xappears to have been recently ransacked, and nothing is left.  There is
  249. Xa door out to the south, and a crawlspace to the southeast."
  250. X               "Reception area"
  251. X           )
  252. X          (
  253. X"You are outside a large building to the north which used to be a health
  254. Xand fitness center.  A road leads to the south."
  255. X               "Health Club front"
  256. X           )
  257. X          (
  258. X"You are at the north side of a lake.  On the other side you can see
  259. Xa road which leads to a cave.  The water appears very deep."
  260. X               "Lakefront North"
  261. X           )
  262. X          (
  263. X"You are at the south side of a lake.  A road goes to the south."
  264. X               "Lakefront South"
  265. X           )
  266. X          (
  267. X"You are in a well-hidden area off to the side of a road.  Back to the
  268. Xnortheast through the brush you can see the bear hangout."
  269. X               "Hidden area"
  270. X           )
  271. X          (
  272. X"The entrance to a cave is to the south.  To the north, a road leads
  273. Xtowards a deep lake.  On the ground nearby there is a chute, with a sign
  274. Xthat says 'put treasures here for points'."
  275. X               "Cave Entrance"                      ;28
  276. X           )
  277. X          (
  278. X"You are in a misty, humid room carved into a mountain.
  279. XTo the north is the remains of a rockslide.  To the east, a small
  280. Xpassage leads away into the darkness."              ;29
  281. X               "Misty Room"
  282. X           )
  283. X          (
  284. X"You are in an east/west passageway.  The walls here are made of
  285. Xmulticolored rock and are quite beautiful."
  286. X               "Cave E/W passage"                   ;30
  287. X           )
  288. X          (
  289. X"You are at the junction of two passages. One goes north/south, and
  290. Xthe other goes west."
  291. X               "N/S/W Junction"                     ;31
  292. X           )
  293. X          (
  294. X"You are at the north end of a north/south passageway.  There are stairs
  295. Xleading down from here.  There is also a door leading west."
  296. X               "North end of cave passage"         ;32
  297. X           )
  298. X          (
  299. X"You are at the south end of a north/south passageway.  There is a hole
  300. Xin the floor here, into which you could probably fit."
  301. X               "South end of cave passage"         ;33
  302. X           )
  303. X          (
  304. X"You are in what appears to be a worker's bedroom.  There is a queen-
  305. Xsized bed in the middle of the room, and a painting hanging on the
  306. Xwall.  A door leads to another room to the south, and stairways
  307. Xlead up and down."
  308. X               "Bedroom"                          ;34
  309. X           )
  310. X          (
  311. X"You are in a bathroom built for workers in the cave.  There is a
  312. Xurinal hanging on the wall, and some exposed pipes on the opposite
  313. Xwall where a sink used to be.  To the north is a bedroom."
  314. X               "Bathroom"        ;35
  315. X           )
  316. X          (
  317. X"This is a marker for the urinal.  User will not see this, but it
  318. Xis a room that can contain objects."
  319. X               "Urinal"          ;36
  320. X           )
  321. X          (
  322. X"You are at the northeast end of a northeast/southwest passageway.
  323. XStairs lead up out of sight."
  324. X               "Ne end of ne/sw cave passage"       ;37
  325. X           )
  326. X          (
  327. X"You are at the junction of northeast/southwest and east/west passages."
  328. X               "Ne/sw-e/w junction"                      ;38
  329. X           )
  330. X          (
  331. X"You are at the southwest end of a northeast/southwest passageway."
  332. X               "Sw end of ne/sw cave passage"        ;39
  333. X           )
  334. X          (
  335. X"You are at the east end of an e/w passage.  There are stairs leading up
  336. Xto a room above."
  337. X               "East end of e/w cave passage"    ;40
  338. X           )
  339. X          (
  340. X"You are at the west end of an e/w passage.  There is a hole on the ground
  341. Xwhich leads down out of sight."
  342. X               "West end of e/w cave passage"    ;41
  343. X           )
  344. X          (
  345. X"You are in a room which is bare, except for a horseshoe shaped boulder
  346. Xin the center.  Stairs lead down from here."     ;42
  347. X               "Horseshoe boulder room"
  348. X           )
  349. X          (
  350. X"You are in a room which is completely empty.  Doors lead out to the north
  351. Xand east."
  352. X               "Empty room"                      ;43
  353. X           )
  354. X          (
  355. X"You are in an empty room.  Interestingly enough, the stones in this
  356. Xroom are painted blue.  Doors lead out to the east and south."  ;44
  357. X               "Blue room"
  358. X           )
  359. X          (
  360. X"You are in an empty room.  Interestingly enough, the stones in this
  361. Xroom are painted yellow.  Doors lead out to the south and west."    ;45
  362. X               "Yellow room"
  363. X           )
  364. X          (
  365. X"You are in an empty room.  Interestingly enough, the stones in this room
  366. Xare painted red.  Doors lead out to the west and north."
  367. X               "Red room"                                 ;46
  368. X           )
  369. X          (
  370. X"You are in the middle of a long north/south hallway."     ;47
  371. X               "Long n/s hallway"
  372. X           )
  373. X          (
  374. X"You are 3/4 of the way towards the north end of a long north/south hallway."
  375. X               "3/4 north"                                ;48
  376. X           )
  377. X          (
  378. X"You are at the north end of a long north/south hallway.  There are stairs
  379. Xleading upwards."
  380. X               "North end of long hallway"                 ;49
  381. X           )
  382. X          (
  383. X"You are 3/4 of the way towards the south end of a long north/south hallway."
  384. X               "3/4 south"                                 ;50
  385. X           )
  386. X          (
  387. X"You are at the south end of a long north/south hallway."
  388. X               "South end of long hallway"                 ;51
  389. X           )
  390. X          (
  391. X"You are at a landing in a stairwell which continues up and down."
  392. X               "Stair landing"                             ;52
  393. X           )
  394. X          (
  395. X"You are at the continuation of an up/down staircase."
  396. X               "Up/down staircase"                         ;53
  397. X           )
  398. X          (
  399. X"You are at the top of a staircase leading down.  A crawlway leads off
  400. Xto the northeast."
  401. X               "Top of staircase."                        ;54
  402. X           )
  403. X          (
  404. X"You are in a crawlway that leads northeast or southwest."
  405. X               "Ne crawlway"                              ;55
  406. X           )
  407. X          (
  408. X"You are in a small crawlspace.  There is a hole in the ground here, and
  409. Xa small passage back to the southwest."
  410. X               "Small crawlspace"                         ;56
  411. X           )
  412. X          (
  413. X"You are in the Gamma Computing Center.  An IBM 3090/600s is whirring
  414. Xaway in here.  There is an ethernet cable coming out of one of the units,
  415. Xand going through the ceiling.  There is no console here on which you
  416. Xcould type."
  417. X               "Gamma computing center"                   ;57
  418. X           )
  419. X          (
  420. X"You are near the remains of a post office.  There is a mail drop on the
  421. Xface of the building, but you cannot see where it leads.  A path leads
  422. Xback to the east, and a road leads to the north."
  423. X               "Post office"                             ;58
  424. X           )
  425. X          (
  426. X"You are at the intersection of Main Street and Maple Ave.  Main street
  427. Xruns north and south, and Maple Ave runs east off into the distance.
  428. XIf you look north and east you can see many intersections, but all of
  429. Xthe buildings that used to stand here are gone.  Nothing remains except
  430. Xstreet signs.
  431. XThere is a road to the northwest leading to a gate that guards a building."
  432. X               "Main-Maple intersection"                       ;59
  433. X           )
  434. X          (
  435. X"You are at the intersection of Main Street and the west end of Oaktree Ave."
  436. X               "Main-Oaktree intersection"   ;60
  437. X           )
  438. X          (
  439. X"You are at the intersection of Main Street and the west end of Vermont Ave."
  440. X               "Main-Vermont intersection"  ;61
  441. X           )
  442. X          (
  443. X"You are at the north end of Main Street at the west end of Sycamore Ave." ;62
  444. X               "Main-Sycamore intersection"
  445. X           )
  446. X          (
  447. X"You are at the south end of First Street at Maple Ave." ;63
  448. X               "First-Maple intersection"
  449. X           )
  450. X          (
  451. X"You are at the intersection of First Street and Oaktree Ave."  ;64
  452. X               "First-Oaktree intersection"
  453. X           )
  454. X          (
  455. X"You are at the intersection of First Street and Vermont Ave."  ;65
  456. X               "First-Vermont intersection"
  457. X           )
  458. X          (
  459. X"You are at the north end of First Street at Sycamore Ave."  ;66
  460. X               "First-Sycamore intersection"
  461. X           )
  462. X          (
  463. X"You are at the south end of Second Street at Maple Ave."  ;67
  464. X               "Second-Maple intersection"
  465. X           )
  466. X          (
  467. X"You are at the intersection of Second Street and Oaktree Ave."  ;68
  468. X               "Second-Oaktree intersection"
  469. X           )
  470. X          (
  471. X"You are at the intersection of Second Street and Vermont Ave."  ;69
  472. X               "Second-Vermont intersection"
  473. X           )
  474. X          (
  475. X"You are at the north end of Second Street at Sycamore Ave."  ;70
  476. X               "Second-Sycamore intersection"
  477. X           )
  478. X          (
  479. X"You are at the south end of Third Street at Maple Ave."  ;71
  480. X               "Third-Maple intersection"
  481. X           )
  482. X          (
  483. X"You are at the intersection of Third Street and Oaktree Ave."  ;72
  484. X               "Third-Oaktree intersection"
  485. X           )
  486. X          (
  487. X"You are at the intersection of Third Street and Vermont Ave."  ;73
  488. X               "Third-Vermont intersection"
  489. X           )
  490. X          (
  491. X"You are at the north end of Third Street at Sycamore Ave."  ;74
  492. X               "Third-Sycamore intersection"
  493. X           )
  494. X          (
  495. X"You are at the south end of Fourth Street at Maple Ave."  ;75
  496. X               "Fourth-Maple intersection"
  497. X           )
  498. X          (
  499. X"You are at the intersection of Fourth Street and Oaktree Ave."  ;76
  500. X               "Fourth-Oaktree intersection"
  501. X           )
  502. X          (
  503. X"You are at the intersection of Fourth Street and Vermont Ave."  ;77
  504. X               "Fourth-Vermont intersection"
  505. X           )
  506. X          (
  507. X"You are at the north end of Fourth Street at Sycamore Ave."  ;78
  508. X               "Fourth-Sycamore intersection"
  509. X           )
  510. X          (
  511. X"You are at the south end of Fifth Street at the east end of Maple Ave."  ;79
  512. X               "Fifth-Maple intersection"
  513. X           )
  514. X          (
  515. X"You are at the intersection of Fifth Street and the east end of Oaktree Ave.
  516. XThere is a cliff off to the east."
  517. X               "Fifth-Oaktree intersection"  ;80
  518. X           )
  519. X          (
  520. X"You are at the intersection of Fifth Street and the east end of Vermont Ave."
  521. X               "Fifth-Vermont intersection"  ;81
  522. X           )
  523. X          (
  524. X"You are at the north end of Fifth Street and the east end of Sycamore Ave."
  525. X               "Fifth-Oaktree intersection"  ;82
  526. X           )
  527. X          (
  528. X"You are in front of the Museum of Natural History.  A door leads into
  529. Xthe building to the north, and a road leads to the southeast."
  530. X               "Museum entrance"                  ;83
  531. X           )
  532. X          (
  533. X"You are in the main lobby for the Museum of Natural History.  In the center
  534. Xof the room is the huge skeleton of a dinosaur.  Doors lead out to the
  535. Xsouth and east." 
  536. X               "Museum lobby"                     ;84
  537. X           )
  538. X          (
  539. X"You are in the geological display.  All of the objects that used to
  540. Xbe on display are missing.  There are rooms to the east, west, and 
  541. Xnorth."
  542. X               "Geological display"               ;85
  543. X           )
  544. X          (
  545. X"You are in the marine life area.  The room is filled with fish tanks,
  546. Xwhich are filled with dead fish that have apparently died due to
  547. Xstarvation.  Doors lead out to the south and east."
  548. X               "Marine life area"                   ;86
  549. X           )
  550. X          (
  551. X"You are in some sort of maintenance room for the museum.  There is a
  552. Xswitch on the wall labeled 'BL'.  There are doors to the west and north."
  553. X               "Maintenance room"                   ;87
  554. X           )
  555. X          (
  556. X"You are in a classroom where school children were taught about natural
  557. Xhistory.  On the blackboard is written, 'No children allowed downstairs.'
  558. XThere is a door to the east with an 'exit' sign on it.  There is another
  559. Xdoor to the west."
  560. X               "Classroom"                          ;88
  561. X           )
  562. X          (
  563. X"You are at the Vermont St. subway station.  A train is sitting here waiting."
  564. X               "Vermont station."                    ;89
  565. X           )
  566. X          (
  567. X"You are at the Museum subway stop.  A passage leads off to the north."
  568. X               "Museum station."                     ;90
  569. X           )
  570. X          (
  571. X"You are in a north/south tunnel."
  572. X               "N/S tunnel"                          ;91
  573. X           )
  574. X          (
  575. X"You are at the north end of a north/south tunnel.  Stairs lead up and
  576. Xdown from here.  There is a garbage disposal here."
  577. X               "North end of n/s tunnel"             ;92
  578. X               )
  579. X          (
  580. X"You are at the top of some stairs near the subway station.  There is
  581. Xa door to the west."
  582. X               "Top of subway stairs"           ;93
  583. X           )
  584. X          (
  585. X"You are at the bottom of some stairs near the subway station.  There is
  586. Xa room to the northeast."
  587. X               "Bottom of subway stairs"       ;94
  588. X           )
  589. X          (
  590. X"You are in another computer room.  There is a computer in here larger
  591. Xthan you have ever seen.  It has no manufacturers name on it, but it
  592. Xdoes have a sign that says: This machine's name is 'endgame'.  The
  593. Xexit is to the southwest.  There is no console here on which you could
  594. Xtype."
  595. X               "Endgame computer room"         ;95
  596. X           )
  597. X          (
  598. X"You are in a north/south hallway."
  599. X               "Endgame n/s hallway"           ;96
  600. X           )
  601. X          (
  602. X"You have reached a question room.  You must answer a question correctly in
  603. Xorder to get by.  Use the 'answer' command to answer the question."
  604. X               "Question room 1"              ;97
  605. X           )
  606. X          (
  607. X"You are in a north/south hallway."
  608. X               "Endgame n/s hallway"           ;98
  609. X           )
  610. X          (
  611. X"You are in a second question room."
  612. X               "Question room 2"               ;99
  613. X           )
  614. X          (
  615. X"You are in a north/south hallway."
  616. X               "Endgame n/s hallway"           ;100
  617. X           )
  618. X          (
  619. X"You are in a third question room."
  620. X               "Question room 3"               ;101
  621. X           )
  622. X          (
  623. X"You are in the endgame treasure room.  A door leads out to the north, and
  624. Xa hallway leads to the south."
  625. X               "Endgame treasure room"         ;102
  626. X           )
  627. X          (
  628. X"You are in the winner's room.  A door leads back to the south."
  629. X               "Winner's room"                 ;103
  630. X           )
  631. X))
  632. X
  633. X(setq light-rooms '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 24 25 26 27 28 58 59
  634. X             60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
  635. X             77 78 79 80 81 82 83))
  636. X
  637. X(setq verblist '((die . die) (ne . ne) (north . n) (south . s) (east . e)
  638. X         (west . w) (u . up) (d . down) (i . inven) (inventory . inven)
  639. X         (look . examine) (n . n) (s . s) (e . e) (w . w) (se . se)
  640. X         (nw . nw) (sw . sw) (up . up) (down . down) (in . in)
  641. X         (out . out) (go . go) (drop . drop) (southeast . se)
  642. X         (southwest . sw) (northeast . ne) (northwest . nw)
  643. X         (save . save-game) (restore . restore)
  644. X         (long . long) (dig . dig) (shake . shake) (wave . shake)
  645. X         (examine . examine) (describe . examine) (climb . climb)
  646. X         (eat . eat) (put . dput) (type . type) 
  647. X         (score . score) (help . help) (quit . quit) (read . examine)
  648. X         (verbose . long) (urinate . piss) (piss . piss)
  649. X         (flush . flush) (sleep . sleep) (lie . sleep) (x . examine)
  650. X         (break . break) (drive . drive) (board . in) (enter . in)
  651. X         (turn . turn) (press . press) (push . press) (swim . swim)
  652. X         (on . in) (off . out) (chop . break) (switch . press)
  653. X         (cut . break) (exit . out) (leave . out)
  654. X         (flick . press) (superb . superb) (answer . answer)
  655. X         (throw . drop) (l . examine) (take . take) (get . take)))
  656. X
  657. X(setq inbus nil)
  658. X(setq nomail nil)
  659. X(setq ignore '(the to at))
  660. X(setq mode 'moby)
  661. X(setq sauna-level 0)
  662. X(setq dungeon-map '(
  663. X;              no  so  ea  we  ne  se  nw  sw  up  do  in  ot
  664. X            ( 96  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;0
  665. X            ( -1  -1   2  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;1
  666. X            ( -1  -1   3   1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;2
  667. X            ( -1  -1  -1   2   4   6  -1  -1  -1  -1  -1  -1 ) ;3
  668. X            ( -1  -1  -1  -1   5  -1  -1   3  -1  -1  -1  -1 ) ;4
  669. X            ( -1  -1  -1  -1  255 -1  -1   4  -1  -1  255 -1 ) ;5
  670. X            ( -1  -1  -1  -1  -1   7   3  -1  -1  -1  -1  -1 ) ;6
  671. X            ( -1  -1  -1  -1  -1  255  6  27  -1  -1  -1  -1 ) ;7
  672. X            ( 255  5   9  10  -1  -1  -1   5  -1  -1  -1   5 ) ;8
  673. X            ( -1  -1  -1   8  -1  -1  -1  -1  -1  -1  -1  -1 ) ;9
  674. X            ( -1  -1   8  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;10
  675. X            ( -1   8  -1  58  -1  -1  -1  -1  -1  -1  -1  -1 ) ;11
  676. X            ( -1  -1  13  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;12
  677. X            ( 15  -1  14  12  -1  -1  -1  -1  -1  -1  -1  -1 ) ;13
  678. X            ( -1  -1  -1  13  -1  -1  -1  -1  -1  -1  -1  -1 ) ;14
  679. X            ( -1  13  16  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;15
  680. X            ( -1  -1  -1  15  -1  -1  -1  -1  -1  17  16  -1 ) ;16
  681. X            ( -1  -1  17  17  17  17 255  17 255  17  -1  -1 ) ;17
  682. X            ( 18  18  18  18  18  -1  18  18  19  18  -1  -1 ) ;18
  683. X            ( -1  18  18  19  19  20  19  19  -1  18  -1  -1 ) ;19
  684. X            ( -1  -1  -1  18  -1  -1  -1  -1  -1  21  -1  -1 ) ;20
  685. X            ( -1  -1  -1  -1  -1  20  22  -1  -1  -1  -1  -1 ) ;21
  686. X            ( 18  18  18  18  16  18  23  18  18  18  18  18 ) ;22
  687. X            ( -1 255  -1  -1  -1  19  -1  -1  -1  -1  -1  -1 ) ;23
  688. X            ( 23  25  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;24
  689. X            ( 24 255  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;25
  690. X            (255  28  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;26
  691. X            ( -1  -1  -1  -1   7  -1  -1  -1  -1  -1  -1  -1 ) ;27
  692. X            ( 26 255  -1  -1  -1  -1  -1  -1  -1  -1  255 -1 ) ;28
  693. X            ( -1  -1  30  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;29
  694. X            ( -1  -1  31  29  -1  -1  -1  -1  -1  -1  -1  -1 ) ;30
  695. X            ( 32  33  -1  30  -1  -1  -1  -1  -1  -1  -1  -1 ) ;31
  696. X            ( -1  31  -1  57  -1  -1  -1  -1  -1  34  -1  -1 ) ;32
  697. X            ( 31  -1  -1  -1  -1  -1  -1  -1  -1  35  -1  -1 ) ;33
  698. X            ( -1  35  -1  -1  -1  -1  -1  -1  32  37  -1  -1 ) ;34
  699. X            ( 34  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;35
  700. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;36
  701. X            ( -1  -1  -1  -1  -1  -1  -1  38  34  -1  -1  -1 ) ;37
  702. X            ( -1  -1  40  41  37  -1  -1  39  -1  -1  -1  -1 ) ;38
  703. X            ( -1  -1  -1  -1  38  -1  -1  -1  -1  -1  -1  -1 ) ;39
  704. X            ( -1  -1  -1  38  -1  -1  -1  -1  42  -1  -1  -1 ) ;40
  705. X            ( -1  -1  38  -1  -1  -1  -1  -1  -1  43  -1  -1 ) ;41
  706. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  40  -1  -1 ) ;42
  707. X            ( 44  -1  46  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;43
  708. X            ( -1  43  45  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;44
  709. X            ( -1  46  -1  44  -1  -1  -1  -1  -1  -1  -1  -1 ) ;45
  710. X            ( 45  -1  -1  43  -1  -1  -1  -1  -1  255 -1  -1 ) ;46
  711. X            ( 48  50  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;47
  712. X            ( 49  47  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;48
  713. X            ( -1  48  -1  -1  -1  -1  -1  -1  52  -1  -1  -1 ) ;49
  714. X            ( 47  51  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;50
  715. X            ( 50  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;51
  716. X            ( -1  -1  -1  -1  -1  -1  -1  -1  53  49  -1  -1 ) ;52
  717. X            ( -1  -1  -1  -1  -1  -1  -1  -1  54  52  -1  -1 ) ;53
  718. X            ( -1  -1  -1  -1  55  -1  -1  -1  -1  53  -1  -1 ) ;54
  719. X            ( -1  -1  -1  -1  56  -1  -1  54  -1  -1  -1  54 ) ;55
  720. X            ( -1  -1  -1  -1  -1  55  -1  -1  -1  31  -1  -1 ) ;56
  721. X            ( -1  -1  32  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;57
  722. X            ( 59  -1  11  -1  -1  -1  -1  -1  -1  -1  255 255) ;58
  723. X            ( 60  58  63  -1  -1  -1  255 -1  -1  -1  255 255) ;59
  724. X            ( 61  59  64  -1  -1  -1  -1  -1  -1  -1  255 255) ;60
  725. X            ( 62  60  65  -1  -1  -1  -1  -1  -1  -1  255 255) ;61
  726. X            ( -1  61  66  -1  -1  -1  -1  -1  -1  -1  255 255) ;62
  727. X            ( 64  -1  67  59  -1  -1  -1  -1  -1  -1  255 255) ;63
  728. X            ( 65  63  68  60  -1  -1  -1  -1  -1  -1  255 255) ;64
  729. X            ( 66  64  69  61  -1  -1  -1  -1  -1  -1  255 255) ;65
  730. X            ( -1  65  70  62  -1  -1  -1  -1  -1  -1  255 255) ;66
  731. X            ( 68  -1  71  63  -1  -1  -1  -1  -1  -1  255 255) ;67
  732. X            ( 69  67  72  64  -1  -1  -1  -1  -1  -1  255 255) ;68
  733. X            ( 70  68  73  65  -1  -1  -1  -1  -1  -1  255 255) ;69
  734. X            ( -1  69  74  66  -1  -1  -1  -1  -1  -1  255 255) ;70
  735. X            ( 72  -1  75  67  -1  -1  -1  -1  -1  -1  255 255) ;71
  736. X            ( 73  71  76  68  -1  -1  -1  -1  -1  -1  255 255) ;72
  737. X            ( 74  72  77  69  -1  -1  -1  -1  -1  -1  255 255) ;73
  738. X            ( -1  73  78  70  -1  -1  -1  -1  -1  -1  255 255) ;74
  739. X            ( 76  -1  79  71  -1  -1  -1  -1  -1  -1  255 255) ;75
  740. X            ( 77  75  80  72  -1  -1  -1  -1  -1  -1  255 255) ;76
  741. X            ( 78  76  81  73  -1  -1  -1  -1  -1  -1  255 255) ;77
  742. X            ( -1  77  82  74  -1  -1  -1  -1  -1  -1  255 255) ;78
  743. X            ( 80  -1  -1  75  -1  -1  -1  -1  -1  -1  255 255) ;79
  744. X            ( 81  79  255 76  -1  -1  -1  -1  -1  -1  255 255) ;80
  745. X            ( 82  80  -1  77  -1  -1  -1  -1  -1  -1  255 255) ;81
  746. X            ( -1  81  -1  78  -1  -1  -1  -1  -1  -1  255 255) ;82
  747. X            ( 84  -1  -1  -1  -1  59  -1  -1  -1  -1  255 255) ;83
  748. X            ( -1  83  85  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;84
  749. X            ( 86  -1  87  84  -1  -1  -1  -1  -1  -1  -1  -1 ) ;85
  750. X            ( -1  85  88  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;86
  751. X            ( 88  -1  -1  85  -1  -1  -1  -1  -1  -1  -1  -1 ) ;87
  752. X            ( -1  87 255  86  -1  -1  -1  -1  -1  -1  -1  -1 ) ;88
  753. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;89
  754. X            ( 91  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;90
  755. X            ( 92  90  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;91
  756. X            ( -1  91  -1  -1  -1  -1  -1  -1  93  94  -1  -1 ) ;92
  757. X            ( -1  -1  -1  88  -1  -1  -1  -1  -1  92  -1  -1 ) ;93
  758. X            ( -1  -1  -1  -1  95  -1  -1  -1  92  -1  -1  -1 ) ;94
  759. X            ( -1  -1  -1  -1  -1  -1  -1  94  -1  -1  -1  -1 ) ;95
  760. X            ( 97   0  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;96
  761. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;97
  762. X            ( 99  97  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;98
  763. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;99
  764. X            ( 101 99  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;100
  765. X            ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;101
  766. X            ( 103 101 -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;102
  767. X            ( -1  102 -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;103
  768. X            )
  769. X;              no  so  ea  we  ne  se  nw  sw  up  do  in  ot
  770. X)
  771. X
  772. X
  773. X;;; The initial setup of what objects are in each room.
  774. X;;; Regular objects have whole numbers lower than 255.
  775. X;;; Objects that cannot be taken but might move and are
  776. X;;; described during room description are negative.
  777. X;;; Stuff that is described and might change are 255, and are
  778. X;;; handled specially by 'describe-room. 
  779. X
  780. X(setq room-objects '(nil 
  781. X             (0) (-1) nil nil nil (3) (-3) nil (16) (255)     ;1-10
  782. X             (1 15) nil nil (255) nil (8 9) nil nil (6) nil  ;11-20
  783. X             nil nil nil nil nil nil (10) nil (11) nil       ;21-30
  784. X             nil nil nil nil nil nil nil nil nil nil         ;31-40
  785. X             nil nil nil nil nil (13 255) nil nil nil nil    ;41-50
  786. X             nil (-15) nil nil nil (14) nil nil nil nil      ;51-60
  787. X             nil nil nil nil nil nil nil nil nil nil         ;61-70
  788. X             nil nil nil nil nil nil (255) nil nil (17)         ;71-80
  789. X             nil (-18) nil (20) nil (19 255 23) (21) (22) nil nil
  790. X             nil nil nil (24) nil nil (255) nil (255) nil    ;91-100
  791. X             (255) nil (25) nil nil nil nil nil nil nil
  792. X             nil nil nil nil nil nil nil nil nil nil
  793. X             nil nil nil nil nil nil nil nil nil nil
  794. X             nil nil nil nil nil nil nil nil nil nil
  795. X             nil nil nil nil nil nil nil nil nil nil
  796. X             nil nil nil nil nil nil nil nil nil nil))
  797. X
  798. X;;; These are objects in a room that are only described in the
  799. X;;; room description.  They are permanent.
  800. X
  801. X(setq room-silents '(nil
  802. X             (-2) (-2) nil nil nil nil nil nil (-4) (-5) ;1-10
  803. X             nil nil nil (-7) nil (-27) (-8 -27) nil nil nil    ;11-20
  804. X             nil nil nil nil nil nil nil (-9) nil nil     ;21-30
  805. X         nil nil nil (-10 -11) (-12 -14) nil nil nil nil nil  ;31-40
  806. X             nil (-1) nil nil nil nil nil nil nil nil     ;41-50
  807. X             nil nil nil nil nil nil (-5 -16) (-17) (-19) nil
  808. X             nil nil nil nil nil nil nil nil nil nil      ;61-70
  809. X             nil nil nil nil nil nil nil nil nil (-20)      ;71-80
  810. X             nil nil nil (-21) nil (-22 -23) (-24) (-25) (-28) nil
  811. X             nil (-26) nil nil (-5) nil nil nil nil nil      ;91-100
  812. X             nil nil nil nil nil nil nil nil nil nil
  813. X))
  814. X(setq inventory '(1))
  815. X
  816. X
  817. X(setq objects '(
  818. X        ("There is a shovel here." "A shovel")                ;0
  819. X        ("There is a lamp nearby." "A lamp")                  ;1
  820. X        ("There is a CPU card here." "A computer board")      ;2
  821. X        ("There is some food here." "Some food")              ;3
  822. X        ("There is a shiny brass key here." "A brass key")    ;4
  823. X        ("There is a slip of paper here." "A slip of paper")  ;5
  824. X        ("There is a wax statuette of Richard Stallman here." ;6
  825. X         "An RMS statuette")
  826. X        ("There is a shimmering diamond here." "A diamond")   ;7
  827. X        ("There is a 10 pound weight here." "A weight")       ;8
  828. X        ("There is a life preserver here." "A life preserver");9
  829. X        ("There is an emerald bracelet here." "A bracelet")   ;10
  830. X        ("There is a gold bar here." "A gold bar")            ;11
  831. X        ("There is a platinum bar here." "A platinum bar")    ;12
  832. X        ("There is a beach towel on the ground here." "A beach towel")
  833. X        ("There is an axe here." "An axe") ;14
  834. X        ("There is a silver bar here." "A silver bar")  ;15
  835. X        ("There is a bus driver's license here." "A license") ;16
  836. X        ("There are some valuable coins here." "Some valuable coins")
  837. X        ("There is a jewel-encrusted egg here." "A valuable egg") ;18
  838. X        ("There is a glass jar here." "A glass jar") ;19
  839. X        ("There is a dinosaur bone here." "A bone") ;20
  840. X        ("There is a packet of nitric acid here." "Some nitric acid")
  841. X        ("There is a packet of glycerine here." "Some glycerine") ;22
  842. X        ("There is a valuable ruby here." "A ruby") ;23
  843. X        ("There is a valuable amethyst here." "An amethyst") ;24
  844. X        ("The Mona Lisa is here." "The Mona Lisa") ;25
  845. X        ("There is a 100 dollar bill here." "A $100 bill") ;26
  846. X           )
  847. X)
  848. X
  849. X;;; Weight of objects
  850. X
  851. X(setq object-lbs '(2 1 1 1 1 0 2 2 10 3 1 1 1 0 1 1 0 1 1 1 1 0 0 2 2 1 0))
  852. X(setq object-pts '(0 0 0 0 0 0 0 10 0 0 10 10 10 0 0 10 0 10 10 0 0 0 0 10 10 10 10))
  853. X
  854. X;;; How the user references *all* objects, permanent and regular.
  855. X
  856. X(setq objnames '((lamp . 1) (shovel . 0) (boulder . -1) (tree . -2) 
  857. X         (trees . -2) (cpu . 2) (board . 2) (card . 2)
  858. X         (food . 3) (key . 4) (bear . -3) (bin . -4)
  859. X         (bins . -4) (cabinet . -5) (computer . -5) (vax . -5)
  860. X         (protoplasm . -6) (paper . 5) (dial . -7) (rms . 6)
  861. X         (statue . 6) (statuette . 6) (diamond . 7) (stallman . 6)
  862. X         (weight . 8) (button . -8) (life . 9) (preserver . 9)
  863. X         (bracelet . 10) (emerald . 10) (chute . -9) (gold . 11)
  864. X         (painting . -10) (bed . -11) (urinal . -12) (URINE . -13)
  865. X         (pipes . -14) (pipe . -14) (platinum . 12) (towel . 13)
  866. X         (ibm . -5) (cable . -16) (ethernet . -16) (axe . 14)
  867. X         (beach . 13) (box . -15) (slit . -15) (silver . 15)
  868. X         (mail . -17) (ladder . -27) (subway . -28) (train . -28)
  869. X         (drop . -17) (license . 16) (bus . -18) (gate . -19)
  870. X         (coins . 17) (cliff . -20) (egg . 18) (jar . 19) (bone . 20)
  871. X         (nitric . 21) (glycerine . 22) (skeleton . -21)  (acid . 21)
  872. X         (dinosaur . -21) (disposal . -26) (garbage . -26) (ruby . 23)
  873. X         (fish . -22) (tanks . -23) (switch . -24) (blackboard . -25)
  874. X         (amethyst . 24) (mona . 25) (bill . 26)
  875. X))
  876. X
  877. X;;; Unix representation of objects.
  878. X(setq objfiles '(
  879. X         "shovel.o" "lamp.o" "cpu.o" "food.o" "key.o" "paper.o"
  880. X         "rms.o" "diamond.o" "weight.o" "preserver.o" "bracelet.o"
  881. X         "gold.o" "platinum.o" "towel.o" "axe.o" "silver.o" "license.o"
  882. X         "coins.o" "egg.o" "jar.o" "bone.o" "nitric.o" "glycerine.o"
  883. X         "ruby.o" "amethyst.o"
  884. X         ))
  885. X
  886. X;;; These are the descriptions for the negative numbered objects from
  887. X;;; room-objects
  888. X
  889. X(setq perm-objects '(
  890. X             nil
  891. X             ("There is a large boulder here.")
  892. X             nil
  893. X             ("There is a ferocious bear here!")
  894. X             nil
  895. X             nil
  896. X             ("There is a worthless pile of protoplasm here.")
  897. X             nil
  898. X             nil
  899. X             nil
  900. X             nil
  901. X             nil
  902. X             nil
  903. X             ("There is a strange smell in this room.")
  904. X             nil
  905. X             (
  906. X"There is a box with a slit in it, bolted to the wall here."
  907. X                     )
  908. X             nil
  909. X             nil
  910. X             ("There is a bus here.")
  911. X             nil
  912. X             nil
  913. X             nil
  914. X))
  915. X
  916. X
  917. X;;; These are the descriptions the user gets when regular objects are
  918. X;;; examined.
  919. X
  920. X(setq physobj-desc '(
  921. X"It is a normal shovel with a price tag attached that says $19.99."
  922. X"The lamp is hand-crafted by Geppetto."
  923. X"The CPU board has a VAX chip on it.  It seems to have
  924. X2 Megabytes of RAM onboard."
  925. X"It looks like some kind of meat.  Smells pretty bad."
  926. Xnil
  927. X"The paper says: Don't forget to type 'help' for help.  Also, remember
  928. Xthis word: 'worms'"
  929. X"The statuette is of the likeness of Richard Stallman, the author of the
  930. Xfamous EMACS editor.  You notice that he is not wearing any shoes."
  931. Xnil
  932. X"You observe that the weight is heavy."
  933. X"It says S. S. Minnow."
  934. Xnil
  935. Xnil
  936. Xnil
  937. X"It has a picture of snoopy on it."
  938. Xnil
  939. Xnil
  940. X"It has your picture on it!"
  941. X"They are old coins from the 19th century."
  942. X"It is a valuable Fabrege egg."
  943. X"It is a a plain glass jar."
  944. Xnil
  945. Xnil
  946. Xnil
  947. Xnil
  948. Xnil
  949. X                     )
  950. X)
  951. X
  952. X;;; These are the descriptions the user gets when non-regular objects
  953. X;;; are examined.
  954. X
  955. X(setq permobj-desc '(
  956. X             nil
  957. X"It is just a boulder.  It cannot be moved."
  958. X"They are palm trees with a bountiful supply of coconuts in them."
  959. X"It looks like a grizzly to me."
  960. X"All of the bins are empty.  Looking closely you can see that there
  961. Xare names written at the bottom of each bin, but most of them are
  962. Xfaded away so that you cannot read them.  You can only make out three
  963. Xnames:
  964. X                   Jeffrey Collier
  965. X                   Robert Toukmond
  966. X                   Thomas Stock
  967. X"
  968. X                      nil
  969. X"It is just a garbled mess."
  970. X"The dial points to a temperature scale which has long since faded away."
  971. Xnil
  972. Xnil
  973. X"It is a velvet painting of Elvis Presly.  It seems to be nailed to the
  974. Xwall, and you cannot move it."
  975. X"It is a queen sized bed, with a very firm mattress."
  976. X"The urinal is very clean compared with everything else in the cave.  There
  977. Xisn't even any rust.  Upon close examination you realize that the drain at the
  978. Xbottom is missing, and there is just a large hole leading down the
  979. Xpipes into nowhere.  The hole is too small for a person to fit in."
  980. Xnil
  981. Xnil
  982. X"The box has a slit in the top of it, and on it, in sloppy handwriting, is
  983. Xwritten: 'For key upgrade, put key in here.'"
  984. Xnil
  985. X"It says 'express mail' on it."
  986. X"It is a 35 passenger bus with the company name 'mobytours' on it."
  987. X"It is a large metal gate that is too big to climb over."
  988. X"It is a HIGH cliff."
  989. X"Unfortunately you do not know enough about dinosaurs to tell very much about
  990. Xit.  It is very big, though."
  991. X"The fish look like they were once quite beautiful."
  992. Xnil
  993. Xnil
  994. Xnil
  995. Xnil
  996. X"It is a normal ladder that is permanently attached to the hole."
  997. X"It is a passenger train that is ready to go."
  998. X            )
  999. X)
  1000. X
  1001. X(setq diggables '(nil nil nil (2) nil nil nil nil nil nil nil   ;0-10
  1002. X          nil nil nil nil nil nil nil nil nil nil      ;11-20
  1003. X          nil nil nil nil nil nil nil nil nil nil      ;21-30
  1004. X          nil nil nil nil nil nil nil nil nil nil      ;31-40
  1005. X          nil (12) nil nil nil nil nil nil nil nil))
  1006. X
  1007. X(setq scroll-step 2)
  1008. X(setq room-shorts nil)
  1009. X(dolist (x rooms)
  1010. X  (setq room-shorts  
  1011. X             (append room-shorts (list (downcase (space-to-hyphen
  1012. X                              (cadr x)))))))
  1013. X
  1014. X(setq endgame-questions '(
  1015. X              (
  1016. X"What is your password on the machine called 'pokey'?" "robert")
  1017. X              (
  1018. X"What password did you use during anonymous ftp to gamma?" "foo")
  1019. X              (
  1020. X"Excluding the endgame, how many places are there where you can put
  1021. Xtreasures for points?" "4" "four")
  1022. X              (
  1023. X"What is your login name on the 'endgame' machine?" "toukmond"
  1024. X)
  1025. X              (
  1026. X"What is the nearest whole dollar to the price of the shovel?" "20" "twenty")
  1027. X              (
  1028. X"What is the name of the bus company serving the town?" "mobytours")
  1029. X              (
  1030. X"Give either of the two last names in the mailroom, other than your own."
  1031. X"collier" "stock")
  1032. X              (
  1033. X"What cartoon character is on the towel?" "snoopy")
  1034. X              (
  1035. X"What is the last name of the author of EMACS?" "stallman")
  1036. X              (
  1037. X"How many megabytes of memory is on the CPU board for the Vax?" "2")
  1038. X              (
  1039. X"Which street in town is named after a U.S. state?" "vermont")
  1040. X              (
  1041. X"How many pounds did the weight weigh?" "ten" "10")
  1042. X              (
  1043. X"Name the STREET which runs right over the subway stop." "fourth" "4" "4th")
  1044. X              (
  1045. X"How many corners are there in town (excluding the one with the Post Office)?"
  1046. X                  "24" "twentyfour" "twenty-four")
  1047. X              (
  1048. X"What type of bear was hiding your key?" "grizzly")
  1049. X              (
  1050. X"Name either of the two objects you found by digging." "cpu" "card" "vax"
  1051. X"board" "platinum")
  1052. X              (
  1053. X"What network protocol is used between pokey and gamma?" "tcp/ip" "ip")
  1054. X))
  1055. X
  1056. END_OF_FILE
  1057. if test 37374 -ne `wc -c <'dun-globals.el'`; then
  1058.     echo shar: \"'dun-globals.el'\" unpacked with wrong size!
  1059. fi
  1060. # end of 'dun-globals.el'
  1061. fi
  1062. if test -f 'dun-unix.el' -a "${1}" != "-c" ; then 
  1063.   echo shar: Will not clobber existing file \"'dun-unix.el'\"
  1064. else
  1065. echo shar: Extracting \"'dun-unix.el'\" \(13746 characters\)
  1066. sed "s/^X//" >'dun-unix.el' <<'END_OF_FILE'
  1067. X;;;;;;;;;;;;;;;;;;;
  1068. X;;;;
  1069. X;;;; UNIX
  1070. X;;;;
  1071. X;;;;;;;;;;;;;;;;;;;
  1072. X
  1073. X(defun unix-parse (args)
  1074. X  (interactive "*p")
  1075. X  (beginning-of-line)
  1076. X  (let (beg esign)
  1077. X    (setq beg (+ (point) 2))
  1078. X    (end-of-line)
  1079. X    (if (and (not (= beg (point)))
  1080. X         (string= "$" (buffer-substring (- beg 2) (- beg 1))))
  1081. X    (progn
  1082. X      (setq line (downcase (buffer-substring beg (point))))
  1083. X      (princ line)
  1084. X      (if (eq (parse2 nil unix-verbs line) -1)
  1085. X          (progn
  1086. X        (if (setq esign (string-match "=" line))
  1087. X            (doassign line)        
  1088. X          (mprinc (car line-list))
  1089. X          (mprincl ": not found.")))))
  1090. X      (goto-char (point-max))
  1091. X      (mprinc "\n"))
  1092. X    (if (eq dungeon-mode 'unix)
  1093. X    (mprinc "$ "))))
  1094. X
  1095. X(defun doassign (line)
  1096. X  (if (not wizard)
  1097. X      (let (passwd)
  1098. X    (mprinc "Enter wizard password: ")
  1099. X    (setq passwd (read-line))
  1100. X    (if (not batch-mode)
  1101. X        (mprinc "\n"))
  1102. X    (if (string= passwd "moby")
  1103. X        (progn
  1104. X          (setq wizard t)
  1105. X          (doassign line))
  1106. X      (mprincl "Incorrect.")))
  1107. X
  1108. X    (let (varname epoint afterq i value)
  1109. X      (setq varname (substring line 0 esign))
  1110. X      (if (not (setq epoint (string-match ")" line)))
  1111. X      (if (string= (substring line (1+ esign) (+ esign 2))
  1112. X               "\"")
  1113. X          (progn
  1114. X        (setq afterq (substring line (+ esign 2)))
  1115. X        (setq epoint (+
  1116. X                  (string-match "\"" afterq)
  1117. X                  (+ esign 3))))
  1118. X        
  1119. X        (if (not (setq epoint (string-match " " line)))
  1120. X        (setq epoint (length line))))
  1121. X    (setq epoint (1+ epoint))
  1122. X    (while (and
  1123. X        (not (= epoint (length line)))
  1124. X        (setq i (string-match ")" (substring line epoint))))
  1125. X      (setq epoint (+ epoint i 1))))
  1126. X      (setq value (substring line (1+ esign) epoint))
  1127. X      (dungeon-eval varname value))))
  1128. X
  1129. X(defun dungeon-eval (varname value)
  1130. X  (let (eval-error)
  1131. X    (switch-to-buffer (get-buffer-create "*dungeon-eval*"))
  1132. X    (erase-buffer)
  1133. X    (insert "(setq ")
  1134. X    (insert varname)
  1135. X    (insert " ")
  1136. X    (insert value)
  1137. X    (insert ")")
  1138. X    (setq eval-error nil)
  1139. X    (condition-case nil
  1140. X    (eval-current-buffer)
  1141. X      (error (setq eval-error t)))
  1142. X    (kill-buffer (current-buffer))
  1143. X    (switch-to-buffer "*dungeon*")
  1144. X    (if eval-error
  1145. X    (mprincl "Invalid syntax."))))
  1146. X  
  1147. X
  1148. X(defun unix-interface ()
  1149. X  (login)
  1150. X  (if logged-in
  1151. X      (progn
  1152. X    (setq dungeon-mode 'unix)
  1153. X    (define-key dungeon-mode-map "\r" 'unix-parse)
  1154. X    (mprinc "$ "))))
  1155. X
  1156. X
  1157. X
  1158. X(defun login ()
  1159. X  (let (tries username password)
  1160. X    (setq tries 4)
  1161. X    (while (and (not logged-in) (> (setq tries (- tries 1)) 0))
  1162. X      (mprinc "\n\nUNIX System 5, Release 2.2 (pokey)\n\nlogin: ")
  1163. X      (setq username (read-line))
  1164. X      (if (not batch-mode)
  1165. X      (mprinc "\n"))
  1166. X      (mprinc "password: ")
  1167. X      (setq password (read-line))
  1168. X      (if (not batch-mode)
  1169. X      (mprinc "\n"))
  1170. X      (if (or (not (string= username "toukmond"))
  1171. X          (not (string= password "robert")))
  1172. X      (mprincl "login incorrect")
  1173. X    (setq logged-in t)
  1174. X    (mprincl "
  1175. XWelcome to Unix\n
  1176. XPlease clean up your directories.  The filesystem is getting full.
  1177. XOur tcp/ip link to gamma is a little flakey, but seems to work.
  1178. XThe current version of ftp can only send files from the current
  1179. Xdirectory, and deletes them after they are sent!  Be careful.
  1180. X
  1181. XNote: Restricted bourne shell in use.\n")))
  1182. X  (setq dungeon-mode 'dungeon)))
  1183. X
  1184. X(defun ls (args)
  1185. X  (if (car args)
  1186. X      (let (ocdpath ocdroom)
  1187. X    (setq ocdpath cdpath)
  1188. X    (setq ocdroom cdroom)
  1189. X    (if (not (eq (cd args) -2))
  1190. X        (ls nil))
  1191. X    (setq cdpath ocdpath)
  1192. X    (setq cdroom ocdroom))
  1193. X    (if (= cdroom -10)
  1194. X    (ls-inven))
  1195. X    (if (= cdroom -2)
  1196. X    (ls-rooms))
  1197. X    (if (= cdroom -3)
  1198. X    (ls-root))
  1199. X    (if (= cdroom -4)
  1200. X    (ls-usr))
  1201. X    (if (> cdroom 0)
  1202. X    (ls-room))))
  1203. X
  1204. X(defun ls-root ()
  1205. X  (mprincl "total 4
  1206. Xdrwxr-xr-x  3 root     staff           512 Jan 1 1970 .
  1207. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..
  1208. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 usr
  1209. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 rooms"))
  1210. X
  1211. X(defun ls-usr ()
  1212. X  (mprincl "total 4
  1213. Xdrwxr-xr-x  3 root     staff           512 Jan 1 1970 .
  1214. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..
  1215. Xdrwxr-xr-x  3 toukmond restricted      512 Jan 1 1970 toukmond"))
  1216. X
  1217. X(defun ls-rooms ()
  1218. X  (mprincl "total 16
  1219. Xdrwxr-xr-x  3 root     staff           512 Jan 1 1970 .
  1220. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..")
  1221. X  (dolist (x visited)
  1222. X    (mprinc
  1223. X"drwxr-xr-x  3 root     staff           512 Jan 1 1970 ")
  1224. X    (mprincl (nth x room-shorts))))
  1225. X
  1226. X(defun ls-room ()
  1227. X  (mprincl "total 4
  1228. Xdrwxr-xr-x  3 root     staff           512 Jan 1 1970 .
  1229. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..
  1230. X-rwxr-xr-x  3 root     staff          2048 Jan 1 1970 description")
  1231. X  (dolist (x (nth cdroom room-objects))
  1232. X    (if (and (>= x 0) (not (= x 255)))
  1233. X    (progn
  1234. X      (mprinc "-rwxr-xr-x  1 toukmond restricted        0 Jan 1 1970 ")
  1235. X      (mprincl (nth x objfiles))))))
  1236. X
  1237. X(defun ls-inven ()
  1238. X  (mprinc "total 467
  1239. Xdrwxr-xr-x  3 toukmond restricted      512 Jan 1 1970 .
  1240. Xdrwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..")
  1241. X  (dolist (x unix-verbs)
  1242. X    (if (not (eq (car x) 'IMPOSSIBLE))
  1243. X    (progn
  1244. X      (mprinc"
  1245. X-rwxr-xr-x  1 toukmond restricted    10423 Jan 1 1970 ")
  1246. X      (mprinc (car x)))))
  1247. X  (mprinc "\n")
  1248. X  (if (not uncompressed)
  1249. X      (mprincl
  1250. X"-rwxr-xr-x  1 toukmond restricted        0 Jan 1 1970 paper.o.Z"))
  1251. X  (dolist (x inventory)
  1252. X    (mprinc 
  1253. X"-rwxr-xr-x  1 toukmond restricted        0 Jan 1 1970 ")
  1254. X    (mprincl (nth x objfiles))))
  1255. X
  1256. X(defun echo (args)
  1257. X  (let (nomore var)
  1258. X    (setq nomore nil)
  1259. X    (dolist (x args)
  1260. X        (if (not nomore)
  1261. X        (progn
  1262. X          (if (not (string= (substring x 0 1) "$"))
  1263. X              (progn
  1264. X            (mprinc x)
  1265. X            (mprinc " "))
  1266. X            (setq var (intern (substring x 1)))
  1267. X            (if (not (boundp var))
  1268. X            (mprinc " ")
  1269. X              (if (member var restricted)
  1270. X              (progn
  1271. X                (mprinc var)
  1272. X                (mprinc ": Permission denied")
  1273. X                (setq nomore t))
  1274. X            (eval (list 'mprinc var))
  1275. X            (mprinc " ")))))))
  1276. X        (mprinc "\n")))
  1277. X
  1278. X
  1279. X(defun ftp (args)
  1280. X  (let (host username passwd)
  1281. X    (if (not (car args))
  1282. X    (mprincl "ftp: hostname required on command line.")
  1283. X      (setq host (intern (car args)))
  1284. X      (if (not (member host '(gamma endgame)))
  1285. X      (mprincl "ftp: Unknown host.")
  1286. X    (if (eq host 'endgame)
  1287. X        (mprincl "ftp: connection to endgame not allowed")
  1288. X      (if (not ethernet)
  1289. X          (mprincl "ftp: host not responding.")
  1290. X        (mprincl "Connected to gamma. FTP ver 0.9 00:00:00 01/01/70")
  1291. X        (mprinc "Username: ")
  1292. X        (setq username (read-line))
  1293. X        (if (string= username "toukmond")
  1294. X        (if batch-mode
  1295. X            (mprincl "toukmond ftp access not allowed.")
  1296. X          (mprincl "\ntoukmond ftp access not allowed."))
  1297. X          (if (string= username "anonymous")
  1298. X          (if batch-mode
  1299. X              (mprincl
  1300. X               "Guest login okay, send your user ident as password.")
  1301. X            (mprincl 
  1302. X             "\nGuest login okay, send your user ident as password."))
  1303. X        (if batch-mode
  1304. X            (mprinc "Password required for ")
  1305. X          (mprinc "\nPassword required for "))
  1306. X        (mprincl username))
  1307. X          (mprinc "Password: ")
  1308. X          (setq ident (read-line))
  1309. X          (if (not (string= username "anonymous"))
  1310. X          (if batch-mode
  1311. X              (mprincl "Login failed.")
  1312. X            (mprincl "\nLogin failed."))
  1313. X        (if batch-mode
  1314. X           (mprincl "Guest login okay, user access restrictions apply.")
  1315. X          (mprincl "\nGuest login okay, user access restrictions apply."))
  1316. X        (ftp-commands)
  1317. X        (setq newlist 
  1318. X'("What password did you use during anonymous ftp to gamma?"))
  1319. X        (setq newlist (append newlist (list ident)))
  1320. X        (rplaca (nthcdr 1 endgame-questions) newlist)))))))))
  1321. X  
  1322. X(defun ftp-commands ()
  1323. X  (setq exitf nil)
  1324. X  (let (line)
  1325. X    (while (not exitf)
  1326. X      (mprinc "ftp> ")
  1327. X      (setq line (read-line))
  1328. X      (if 
  1329. X      (eq
  1330. X       (parse2 nil 
  1331. X         '((type . ftptype) (binary . bin) (bin . bin) (send . send)
  1332. X           (put . send) (quit . ftpquit) (help . ftphelp)
  1333. X           (ascii . fascii)
  1334. X         ) line)
  1335. X     -1)
  1336. X      (mprincl "No such command.  Try help.")))
  1337. X    (setq ftptype 'ascii)))
  1338. X
  1339. X(defun ftptype (args)
  1340. X  (if (not (car args))
  1341. X      (mprincl "Usage: type [binary | ascii]")
  1342. X    (setq args (intern (car args)))
  1343. X    (if (eq args 'binary)
  1344. X    (bin nil)
  1345. X      (if (eq args 'ascii)
  1346. X      (fascii 'nil)
  1347. X    (mprincl "Unknown type.")))))
  1348. X
  1349. X(defun bin (args)
  1350. X  (mprincl "Type set to binary.")
  1351. X  (setq ftptype 'binary))
  1352. X
  1353. X(defun fascii (args)
  1354. X  (mprincl "Type set to ascii.")
  1355. X  (setq ftptype 'ascii))
  1356. X
  1357. X(defun ftpquit (args)
  1358. X  (setq exitf t))
  1359. X
  1360. X(defun send (args)
  1361. X  (if (not (car args))
  1362. X      (mprincl "Usage: send <filename>")
  1363. X    (setq args (car args))
  1364. X    (let (counter foo)
  1365. X      (setq foo nil)
  1366. X      (setq counter 0)
  1367. X
  1368. X;;; User can send commands!  Stupid user.
  1369. X
  1370. X
  1371. X      (if (assq (intern args) unix-verbs)
  1372. X      (progn
  1373. X        (rplaca (assq (intern args) unix-verbs) 'IMPOSSIBLE)
  1374. X        (mprinc "Sending ")
  1375. X        (mprinc ftptype)
  1376. X        (mprinc " file for ")
  1377. X        (mprincl args)
  1378. X        (mprincl "Transfer complete."))
  1379. X
  1380. X    (dolist (x objfiles)
  1381. X      (if (string= args x)
  1382. X          (progn
  1383. X        (if (not (member counter inventory))
  1384. X            (progn
  1385. X              (mprincl "No such file.")
  1386. X              (setq foo t))
  1387. X          (mprinc "Sending ")
  1388. X          (mprinc ftptype)
  1389. X          (mprinc " file for ")
  1390. X          (mprinc (downcase (cadr (nth counter objects))))
  1391. X          (mprincl ", (0 bytes)")
  1392. X          (if (not (eq ftptype 'binary))
  1393. X              (progn
  1394. X            (if (not (member -6 (nth 12 room-objects)))
  1395. X                (replace room-objects 12
  1396. X                     (append (nth 12 room-objects) (list -6))))
  1397. X            (remove-obj-from-inven counter))
  1398. X            (remove-obj-from-inven counter)
  1399. X            (replace room-objects 12
  1400. X                 (append (nth 12 room-objects) (list counter))))
  1401. X          (setq foo t)
  1402. X          (mprincl "Transfer complete."))))
  1403. X      (setq counter (+ 1 counter)))
  1404. X    (if (not foo)
  1405. X        (mprincl "No such file."))))))
  1406. X
  1407. X(defun ftphelp (args)
  1408. X  (mprincl 
  1409. X   "Possible commands are:\nsend    quit    type   ascii  binary   help"))
  1410. X
  1411. X(defun uexit (args)
  1412. X  (setq dungeon-mode 'dungeon)
  1413. X  (mprincl "\nYou step back from the console.")
  1414. X  (define-key dungeon-mode-map "\r" 'dungeon-parse)
  1415. X  (if (not batch-mode)
  1416. X      (dungeon-messages)))
  1417. X
  1418. X(defun pwd (args)
  1419. X  (mprincl cdpath))
  1420. X
  1421. X(defun uncompress (args)
  1422. X  (if (not (car args))
  1423. X      (mprincl "Usage: uncompress <filename>")
  1424. X    (setq args (car args))
  1425. X    (if (or uncompressed
  1426. X        (and (not (string= args "paper.o"))
  1427. X         (not (string= args "paper.o.z"))))
  1428. X    (mprincl "Uncompress command failed.")
  1429. X      (setq uncompressed t)
  1430. X      (setq inventory (append inventory (list 5))))))
  1431. X
  1432. X(defun rlogin (args)
  1433. X  (if (not (car args))
  1434. X      (mprincl "Usage: rlogin <hostname>")
  1435. X    (setq args (car args))
  1436. X    (if (string= args "endgame")
  1437. X    (rlogin-endgame)
  1438. X      (if (not (string= args "gamma"))
  1439. X      (mprincl "No such host.")
  1440. X    (if (not ethernet)
  1441. X        (mprincl "Host not responding.")
  1442. X      (mprinc "Password: ")
  1443. X      (setq passwd (read-line))
  1444. X      (if (not (string= passwd "worms"))
  1445. X          (mprincl "\nlogin incorrect")
  1446. X        (mprinc 
  1447. X"\nYou begin to feel strange for a moment, and you lose your items."
  1448. X         )
  1449. X        (replace room-objects 10 (append (nth 0 room-objects) inventory))
  1450. X        (setq inventory nil)
  1451. X        (setq current-room 12)
  1452. X        (uexit nil)))))))
  1453. X  
  1454. X(defun cd (args)
  1455. X  (if (not (car args))
  1456. X      (mprincl "Usage: cd <path>")
  1457. X    (setq tcdpath cdpath)
  1458. X    (setq tcdroom cdroom)
  1459. X    (setq badcd nil)
  1460. X    (condition-case nil
  1461. X    (setq path-elements (get-path (car args) nil))
  1462. X      (error (mprincl "Invalid path.")
  1463. X         (setq badcd t)))
  1464. X    (dolist (pe path-elements)
  1465. X      (unless badcd
  1466. X      (if (not (string= pe "."))
  1467. X      (if (string= pe "..")
  1468. X          (progn
  1469. X        (if (> tcdroom 0)                       ;In a room
  1470. X            (progn
  1471. X              (setq tcdpath "/rooms")
  1472. X              (setq tcdroom -2))
  1473. X                    ;In /rooms,/usr,root
  1474. X          (if (or (= tcdroom -2) (= tcdroom -4) (= tcdroom -3))
  1475. X              (progn
  1476. X            (setq tcdpath "/")
  1477. X            (setq tcdroom -3))
  1478. X            (if (= tcdroom -10)                  ;In /usr/toukmond
  1479. X            (progn
  1480. X              (setq tcdpath "/usr")
  1481. X              (setq tcdroom -4))))))
  1482. X        (if (string= pe "/")
  1483. X        (progn
  1484. X          (setq tcdpath "/")
  1485. X          (setq tcdroom -3))
  1486. X          (if (= tcdroom -4)
  1487. X          (if (string= pe "toukmond")
  1488. X              (progn
  1489. X            (setq tcdpath "/usr/toukmond")
  1490. X            (setq tcdroom -10))
  1491. X            (nosuchdir))
  1492. X        (if (= tcdroom -10)
  1493. X            (nosuchdir)
  1494. X          (if (> tcdroom 0)
  1495. X              (nosuchdir)
  1496. X            (if (= tcdroom -3)
  1497. X            (progn
  1498. X              (if (string= pe "rooms")
  1499. X                  (progn
  1500. X                (setq tcdpath "/rooms")
  1501. X                (setq tcdroom -2))
  1502. X                (if (string= pe "usr")
  1503. X                (progn
  1504. X                  (setq tcdpath "/usr")
  1505. X                  (setq tcdroom -4))
  1506. X                  (nosuchdir))))
  1507. X              (if (= tcdroom -2)
  1508. X              (progn
  1509. X                (dolist (x visited)
  1510. X                  (setq room-check (nth x room-shorts))
  1511. X                  (if (string= room-check pe)
  1512. X                  (progn
  1513. X                    (setq tcdpath 
  1514. X                      (concat "/rooms/" room-check))
  1515. X                    (setq tcdroom x))))
  1516. X                (if (= tcdroom -2)
  1517. X                (nosuchdir)))))))))))))
  1518. X    (if (not badcd)
  1519. X    (progn
  1520. X      (setq cdpath tcdpath)
  1521. X      (setq cdroom tcdroom)
  1522. X      0)
  1523. X      -2)))
  1524. X
  1525. X(defun nosuchdir ()
  1526. X  (mprincl "No such directory.")
  1527. X  (setq badcd t))
  1528. X
  1529. X(defun cat (args)
  1530. X  (if (not (setq args (car args)))
  1531. X      (mprincl "Usage: cat <ascii-file-name>")
  1532. X    (if (string-match "/" args)
  1533. X    (mprincl "cat: only files in current directory allowed.")
  1534. X      (if (and (> cdroom 0) (string= args "description"))
  1535. X      (mprincl (car (nth cdroom rooms)))
  1536. X    (if (setq doto (string-match "\\.o" args))
  1537. X        (progn
  1538. X          (if (= cdroom -10)
  1539. X          (setq checklist inventory)
  1540. X        (setq checklist (nth cdroom room-objects)))
  1541. X          (if (not (member (cdr 
  1542. X               (assq (intern (substring args 0 doto)) objnames))
  1543. X                   checklist))
  1544. X          (mprincl "File not found.")
  1545. X        (mprincl "Ascii files only.")))
  1546. X      (if (assq (intern args) unix-verbs)
  1547. X          (mprincl "Ascii files only.")
  1548. X        (mprincl "File not found.")))))))
  1549. X  
  1550. X(defun zippy (args)
  1551. X  (mprincl (yow)))
  1552. X
  1553. X(defun rlogin-endgame ()
  1554. X  (if (not (= (score nil) 90))
  1555. X      (mprincl "You have not achieved enough points to connect to endgame.")
  1556. X    (mprincl"\nWelcome to the endgame.  You are a truly noble adventurer.")
  1557. X    (setq current-room 0)
  1558. X    (setq endgame t)
  1559. X    (replace room-objects 102 '(26))
  1560. X    (uexit nil)))
  1561. END_OF_FILE
  1562. if test 13746 -ne `wc -c <'dun-unix.el'`; then
  1563.     echo shar: \"'dun-unix.el'\" unpacked with wrong size!
  1564. fi
  1565. # end of 'dun-unix.el'
  1566. fi
  1567. if test -f 'makefile' -a "${1}" != "-c" ; then 
  1568.   echo shar: Will not clobber existing file \"'makefile'\"
  1569. else
  1570. echo shar: Extracting \"'makefile'\" \(200 characters\)
  1571. sed "s/^X//" >'makefile' <<'END_OF_FILE'
  1572. X
  1573. Xall:    dun-globals.el
  1574. X    -mkdir ../bin
  1575. X    -emacs -batch -f batch-byte-compile *.el
  1576. X    -emacs -batch -l `pwd`/dun-util -f compile-globals
  1577. X    -rm dun-globals.elc
  1578. X    -mv dun-globals.dat ../bin
  1579. X    -mv *.elc ../bin
  1580. END_OF_FILE
  1581. if test 200 -ne `wc -c <'makefile'`; then
  1582.     echo shar: \"'makefile'\" unpacked with wrong size!
  1583. fi
  1584. # end of 'makefile'
  1585. fi
  1586. echo shar: End of archive 1 \(of 2\).
  1587. cp /dev/null ark1isdone
  1588. MISSING=""
  1589. for I in 1 2 ; do
  1590.     if test ! -f ark${I}isdone ; then
  1591.     MISSING="${MISSING} ${I}"
  1592.     fi
  1593. done
  1594. if test "${MISSING}" = "" ; then
  1595.     echo You have unpacked both archives.
  1596.     rm -f ark[1-9]isdone
  1597. else
  1598.     echo You still need to unpack the following archives:
  1599.     echo "        " ${MISSING}
  1600. fi
  1601. ##  End of shell archive.
  1602. exit 0
  1603.