Import of Release 4
[rfk-inform.git] / kitten.inf
1 ! robotfindskitten
2 ! A Zen Simulation
3 ! Release 4 / Serial number 030131 / Inform v6.21
4 !
5 !     [-]       |\_/|        http://www.robotfindskitten.org
6 !     (+)=C     |o o|__      Leonard Richardson (C) 1997, 2000
7 !     | |       --*--__\     David Griffith (C) 2002  (Inform Edition)
8 !     OOO       C_C(____)
9 !
10 !
11 ! This Zen simulation is based on the C version v1600003.248b
12 ! by Leonard Richardson (C) 1997, 2000.
13 ! Written originally for the Nerth Pork robotfindskitten contest.
14 ! Reimplemented in Inform by David Griffith (C) 2002.
15 !
16 ! Lots more information on robotfindskitten is available at
17 ! http://www.robotfindskitten.org.
18 !
19 !
20 ! In this game, you are Robot (#).  Your job is to find Kitten.  This
21 ! task is complicated by the existance of various things which are not
22 ! kitten.  Robot must touch items to determine if they are Kitten or
23 ! not.  Move Robot with the cursor keys, the numeric keypad, or
24 ! using the vi/rogue movement keys. The game ends when robotfindskitten.
25 ! Alternatively, you may end the game by hitting the Esc or Q keys.
26 !
27 ! Developed with Inform 6.21.2 as installed from NetBSD's pkgsrc tree
28 ! and Frotz 2.42.
29
30 !
31 ! Compile it with:
32 !       inform "-~S" kitten.inf  <-- Assuming Unix
33 !                ^
34 !                | 
35 !               Gets rid of debugging code which doesn't really do
36 !               this sort of program any good in the first place.
37 !
38 ! Notes:
39 !       1) More than half of the code is taken up by non kitten items
40 !       (NKIs).  When I compiled the code with just five messages and
41 !       no debugging code, the resulting binary was less than 10k bytes.
42 !
43 !       2) If it wasn't already abundantly obvious, this program won't
44 !       compile to Glulx because of copious use of Z-machine assembly
45 !       instructions.
46
47 !Switches xv5s;
48
49 Switches v5;
50
51
52 ! Number of messages
53 ! This must be updated when adding new messages.
54 !
55 Constant MESSAGE_NUM    561;
56
57 Constant Nonkitten_Default 20;
58
59 ! Maxmimum possible number of non-kitten items on the playfield at once.
60 ! I don't know if there's a hard maximum for arrays built into the
61 ! Z-machine.  It's just that Inform won't let me set an array's 
62 ! dimensions at runtime.
63 !
64 Constant Nonkitten_Max  256;
65
66
67 Release 4;
68 Serial "030131";
69
70 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
71
72 Constant Story "robotfindskitten";
73
74 Constant Headline "^A Zen Simulation^";
75
76 ! Number of spaces from the left where Robot and Kitten meet during the
77 ! animation.
78 !
79 Constant Anim_Meet      10;
80
81 ! These are set at runtime.
82 !
83 Global Height = 0;
84 Global Width = 0;
85
86 Global Back_def = 2;
87 Global Fore_def = 9;
88
89 Global TopBar = 5;
90
91 Global player_x = 0;
92 Global player_y = 0;
93 Global player_x_last = 0;
94 Global player_y_last = 0;
95
96 Global kitten_x = 0;
97 Global kitten_y = 0;
98 Global kitten_char = 0;
99 Global kitten_color = 0;
100
101 Global last_message = "";
102
103 Global nonkitten_count = Nonkitten_Default;
104
105 Array nonkitten_x --> Nonkitten_Max;
106 Array nonkitten_y --> Nonkitten_Max;
107 Array nonkitten_color --> Nonkitten_Max;
108 Array nonkitten_char --> Nonkitten_Max;
109 Array nonkitten_msg --> Nonkitten_Max;
110
111 Global already_msg_count = 0;
112 Global already_count = 0;
113 Array already_x --> Nonkitten_Max + 2;
114 Array already_y --> Nonkitten_Max + 2;
115 Array already_msg --> Nonkitten_Max;
116
117
118 Global Real_Release = 0;
119
120 [ Main key;
121
122         @set_colour Fore_def Back_def;
123
124         if (MESSAGE_NUM < Nonkitten_Max) {
125                 nonkitten_count = MESSAGE_NUM;
126         } else {
127                 nonkitten_count = Nonkitten_Default;
128         }
129
130         ! If a key is held down while the found_kitten animation is playing,
131         ! (0-->1) & $03ff gets corrupted.  Seems like it might be a bug
132         ! somewhere in Unix Frotz.
133         !
134         Real_Release = (0-->1)&$03ff;
135
136         Width = $22-->0;
137         Height = $24-->0;
138
139         main_menu();    
140         while (true) {
141                 key = getkey();
142                 switch (key) {
143                 'F':    already_count = 0;
144                         init_nonkittens();
145                         init_kitten();
146                         init_robot();
147                         while (findkitten())
148                                 ;
149                 'D':    set_nonkitten_count();
150                 'I':    print_instructions();
151                 'A':    print_about();
152                 'T':    print_thoughts();
153 !               'P':    print_all_nki();
154                 }
155                 if (key == 'Q' || key == $1b)   ! $1b == ESC
156                         break;
157                 main_menu();
158         }
159         quit;
160 ];
161
162
163 [ main_menu psycho;
164
165         psycho = random(50);
166         if (psycho == 1)
167                 psycho = true;
168         else
169                 psycho = false;
170
171         @erase_window $ffff;
172         @split_window 11;
173         @set_window 1;
174
175         Banner();
176         draw_horiz(TopBar);
177
178         draw_big_robot(3, 7);
179
180         if (psycho)
181                 draw_big_kitten_psycho(14, 7);
182         else
183                 draw_big_kitten(15, 7);
184
185         @set_cursor 7 30;
186         print "http://www.robotfindskitten.org";
187         @set_cursor 8 30;
188         print "Leonard Richardson (C) 1997, 2000";
189         @set_cursor 9 30;
190         print "David Griffith (C) 2002  (Inform Edition)";
191
192         @set_cursor 10 30;
193         print "    ", MESSAGE_NUM, " different nonkittens!";
194
195         @set_window 0;
196
197         print "  F) Find Kitten^";
198         print "  D) Difficulty  (", nonkitten_count, ")^";
199         print "  I) Instructions^";
200         print "  T) Thoughts^";
201         print "  A) About^";
202         print "  Q) Quit^";
203         print "^> ";
204 ];
205
206 ! Copied from module/verblibm.h
207 !
208 [ Banner i;
209         if (Story ~= 0) {
210 #IFV5;
211                 style bold; 
212 #ENDIF;
213                 print (string) Story;
214 #IFV5;
215                 style roman;
216 #ENDIF;
217         }
218         if (Headline ~= 0) {
219                 print (string) Headline;
220         }
221         print "Release ", Real_Release, " / Serial number ";
222         for (i=18:i<24:i++) print (char) 0->i;
223         print " / Inform v"; inversion; print " ";
224 #ifdef STRICT_MODE;
225         print "S";
226 #endif;
227 #ifdef INFIX;
228         print "X";
229 #ifnot;
230 #ifdef DEBUG;
231         print "D";
232 #endif;
233 #endif;
234         new_line;
235 ];
236
237
238 Constant INBUFSIZE 80;
239 Array inbuf -> INBUFSIZE;
240
241 [ set_nonkitten_count maxnum val;
242
243         while (true) {
244                 @erase_window $ffff;
245                 @split_window 5;
246                 @set_window 1;
247                 Banner();
248                 draw_horiz(TopBar);
249                 @set_window 0;
250
251                 if (MESSAGE_NUM < Nonkitten_Max) {
252                         maxnum = MESSAGE_NUM;
253                 } else {
254                         maxnum = Nonkitten_Max;
255                 } 
256
257                 print "^Please enter the number of nonkittens you
258                         wish to search through.^(1 to ", maxnum, " only)^^> ";
259
260                 while (true) {
261                         val = get_number(1, maxnum, nonkitten_count);
262                         if (val == -1) {
263                                 break;
264                         } else {
265                                 nonkitten_count = val;
266                                 return;
267                         }
268                 }
269         }
270 ];
271
272
273 [ get_number min max init inbufvar ix cx len val;
274
275         while (true) {
276                 inbuf->0 = (INBUFSIZE-3);
277                 inbuf->1 = 0;
278                 inbufvar = inbuf;
279                 ix = 0;
280                 @aread inbufvar ix;
281                 new_line;
282                 len = inbuf->1;
283                 cx = 0;
284                 while (cx < len && inbuf->(2+cx) == ' ')
285                         cx++;
286                 if (cx < len && inbuf->(2+cx) == '.')
287                         break;
288
289                 ! If user just hit return, use what we have already. 
290                 if (len == 0)
291                         return init;
292                 if (cx == len || inbuf->(2+cx) < '0' || inbuf->(2+cx) > '9') {
293                         print "Please enter a value from ", min, " to ", max,
294                                 ", or Enter by itself to exit.^
295                                 [Press any key to continue.] ";
296                         getkey();
297                         return -1;
298                 }
299                 val = 0;
300                 while (cx < len && inbuf->(2+cx) >= '0' && inbuf->(2+cx) <= '9') {
301                         val = val * 10 + (inbuf->(2+cx) - '0');
302                         cx++;
303                 }
304                 if (val < min || val > max) {
305                         print "Please enter a value from ", min, " to ", max,
306                                 ", or Enter by itself to exit.^
307                                 [Press any key to continue.] ";
308                         getkey();
309                         return -1;
310                 } else break;
311         }
312         return val;
313 ];
314
315
316 [ print_about;
317
318         @erase_window $ffff;
319         @split_window TopBar;
320         @set_window 1;
321         Banner();
322         draw_horiz(TopBar);
323         @set_window 0;
324
325 print "^
326 This Zen simulation is based on the C version v1600003.248b^
327 by Leonard Richardson (C) 1997, 2000.^
328 Written originally for the Nerth Pork robotfindskitten contest.^
329 Reimplemented in Inform by David Griffith (C) 2002.^
330 ^
331 This code is freely redistributable.  Do with it what you will, but
332 don't go about claiming you wrote it.  I, David Griffith, retain
333 copyright on this program except for the NKIs imported from the POSIX
334 imported from the master (aka POSIX) port.^
335 ^
336 Lots more information on robotfindskitten is available at
337 http://www.robotfindskitten.org.^
338 ^
339 To submit new NKI's please go to the above URL.^
340 ^
341 ^
342 Release History:^
343 ^
344 Release 1 / Serial number 0211xx to 021214 or so^
345 Initial private release.  Limited distribution for beta testing and
346 debugging purposes.^
347 ^
348 Release 2 / Serial Number 021216^
349 First public release.^
350 ^
351 Release 3 / Serial Number 021221^
352 Bugfix release.^
353 - Movement keys 'J' and 'K' were swapped by mistake.  Fixed.^
354 - Special PalmOS movement key support added.^
355 - More NKIs added (401 total).^
356 ^
357 Release 4 / Serial Number 030131^
358 Light overhaul release.^
359 - Now an official port of robotfindskitten.^
360 - Typos in NKIs fixed.^
361 - Fixed diagonal collision-detection strangeness.^
362 - Added color support.^
363 - Added an easter egg.  Can you find it?^
364 - Removed PalmOS movement key support (superfluous and ugly).^
365 - Removed playfield resizing code (superfluous and ugly).^
366 - It's ~robotfindskitten~, not ~Robot Finds Kitten~.^
367 - Merged in new NKIs from the new POSIX release of robotfindskitten.^
368 - More NKIs added (561 total).^
369 ^
370 ^
371 Known Bugs:^
372 ^
373 1) I still don't know why already_seen_xy() occasionally causes Robot to
374 get placed on top of another object.  Fortunately this seems to happen
375 only very rarely and typically only if the difficulty is set to more
376 than 200.^
377 ^
378 2) Under Windows Frotz, Robot used to appear as a solid block.  This was
379 because of a bug in Windows Frotz which incorrectly makes the cursor 
380 opaque.  The cursor is now moved off to the upper-right corner so that
381 the game looks okay on terminals that use something other than reverse
382 for the cursor.  I still can't figure out how to make Inform hide the
383 cursor completely.  At least on xterm and NetBSD's console,
384 @@64set_cursor -1 doesn't work.^
385 ^
386 3) Under Windows Frotz, an annoying [MORE] prompt appears at the main
387 menu.  This is another bug in Windows Frotz which causes the
388 interpreter to follow Windows' suggestion something less than 24 or 25
389 lines is okay.^
390 ^
391 ^
392 Other Stuff:^
393 ^
394 1) PalmOS mode and screen-resizing was removed because PalmOS mode stunk
395 and screen-resizing was a failed attempt to make PalmOS mode work.  The
396 native PalmOS port of robotfindskitten looks much better than the Inform
397 version running on a PalmOS Z-machine interpreter.^
398 ^
399 [Press any key to continue.] "; 
400         getkey();
401 ];
402
403
404 [ print_instructions;
405
406         @erase_window $ffff;
407         @split_window TopBar;
408         @set_window 1;
409         Banner();
410         draw_horiz(TopBar);
411         @set_window 0;
412 print "^
413 In this game, you are Robot ( ";
414 #IFV5; style reverse; #ENDIF;
415 print "#";
416 #IFV5; style roman; #ENDIF;
417 print " ).  Your job is to find Kitten.  This task
418 is complicated by the existance of various things which are not 
419 Kitten.  Robot must touch items to determine if they are Kitten or
420 not.  Move Robot with the cursor keys, the numeric keypad (make sure
421 numlock is on), or using the vi/rogue/nethack movement keys.  The game
422 ends when robotfindskitten.  Alternatively, you may end the game by
423 hitting the Esc or Q keys.^
424 ^
425 [Press any key to continue.] "; 
426         getkey();
427 ];
428
429
430 [ print_thoughts;
431         @erase_window $ffff;
432         @split_window TopBar;
433         @set_window 1;
434         Banner();
435         draw_horiz(TopBar);
436         @set_window 0;
437 print "^
438 A Final Thought.^
439 ^
440 Day and night I feverishly worked upon the machine, creating both a soul
441 which could desire its goal, and a body with which it could realize 
442 it. Many who saw my creation called it an abomination, and denied me
443 grant money.  But they could not dissuade me from my impossible 
444 task.  It was a spectre that tormented me always, a ghost I had to give
445 a form and a life, lest it consume me from the inside.  And when at last
446 my task was done, when the grey box on wheels was complete and when it,
447 as well as I, knew what had to be done, I felt deep sympathy for the
448 machine.  For I had not destroyed the phantom, but merely exorcized it
449 into another body.  The robot knew not why this task had to be
450 performed, for I could not imbue it with knowledge I did not myself
451 posess.  And at the same time, I felt a sweeping sense of relief sweep
452 over me, that somehow, the dream that had driven me for my entire life
453 had come one step closer to fruition.^
454 ^
455 ~Gort, Klaatu Verada Nikto~^
456 ^
457 As I vocally activated the robot, I realized that it was following my
458 instructions, but not out of any desire to obey me.  Had I remained
459 silent, it would have performed exactly the same operations.  We were
460 two beings controlled by the same force now.  And yet, seeking vainly to
461 hold some illusion of control over the machine I thought I had created,
462 I gave my final command.^
463 ^
464 ~GO!~  I told the box as it began to roll out of my workshop into the
465 frozen desert beyond. ~FIND KITTEN!~^
466 ^
467 -- The Book of Found Kittens, pages 43-4, author unknown.^
468 ^
469 [Press any key to continue.] "; 
470         getkey();
471 ];
472
473
474 [ draw_big_robot x y; 
475
476         if (x == 0)
477                 x = 1;
478         if (y == 0)
479                 y = 1;
480         @set_cursor y x;
481         @set_colour 6 Back_def;
482         print "[";
483         @set_colour 4 Back_def;
484         print "-";
485         @set_colour 6 Back_def;
486         print "]";
487
488         y = y+1;
489         @set_cursor y x;
490         @set_colour 6 Back_def;
491         print "(";
492         @set_colour 3 Back_def;
493         print "+";
494         @set_colour 6 Back_def;
495         print ")";
496         @set_colour 8 Back_def;
497         print "=C";
498
499         y = y+1;
500         @set_cursor y x;
501         @set_colour 6 Back_def;
502         print "| |";
503
504         y = y+1;
505         @set_cursor y x;
506         @set_colour 8 Back_def;
507         print "OOO";
508
509         @set_colour Fore_def Back_def;
510 ];
511
512
513 [ draw_big_kitten x y;
514
515         if (x == 0)
516                 x = 1;
517         if (y == 0)
518                 y = 1;
519         @set_cursor y x;
520
521         @set_colour 5 Back_def;
522         print "|", (char) 92, "_/|";
523         y++;
524         @set_cursor y x;
525         print "|";
526         @set_colour 4 Back_def;
527         print "o o";
528         @set_colour 5 Back_def;
529         print "|__";
530         y++;
531         @set_cursor y x;
532         @set_colour 9 Back_def;
533         print "--";
534         @set_colour 3 Back_def;
535         print "*";
536         @set_colour 9 Back_def;
537         print "--";
538         @set_colour 5 Back_def;
539         print "__", (char) 92;
540         y++;
541         @set_cursor y x;
542         print "C_C(____)";      
543
544         @set_colour Fore_def Back_def;
545 ];
546
547
548 [ draw_big_kitten_psycho x y;
549
550         if (x == 0)
551                 x = 1;
552         if (y == 0)
553                 y = 1;
554         @set_cursor y x;
555
556         @set_colour 5 Back_def;
557         print " |", (char) 92, "_/|";
558         y++;
559         @set_cursor y x;
560         @set_colour 4 Back_def;
561         print "(|) (|)";
562         @set_colour 5 Back_def;
563         print "_";
564         y++;
565         @set_cursor y x;
566         @set_colour 9 Back_def;
567         print " --";
568         @set_colour 3 Back_def;
569         print "O";
570         @set_colour 9 Back_def;
571         print "--";
572         @set_colour 5 Back_def;
573         print "__", (char) 92;
574         y++;
575         @set_cursor y x;
576         print " 3_3(____)";     
577
578         @set_colour Fore_def Back_def;
579 ];
580
581 ! Something gets messed up if I make this local to findkitten()
582 ! When going right or left, then up or down to hit the Kitten, the
583 ! animation gets reversed.
584
585 Global last_right = false;
586
587 [ findkitten key i;
588
589         @erase_window $ffff;
590         @split_window TopBar;
591         @set_window 1;
592         @set_cursor 1 1;
593
594         Banner();
595         print (string) last_message;
596         draw_horiz(TopBar);
597
598         draw_object(kitten_x, kitten_y, kitten_char, kitten_color);
599         draw_nonkittens();
600
601         #IFV5; style reverse; #ENDIF;
602         draw_object(player_x, player_y, '#');
603         #IFV5; style roman; #ENDIF;
604
605         @set_cursor 1 Width;
606
607         ! Get movement key
608         !
609         key = getkey();
610
611         ! Move Robot
612         !
613         player_x_last = player_x;
614         player_y_last = player_y;
615         switch (key) {
616         'Q', $1b:       rfalse;                 ! exit game ($1b == Esc)
617         '8', 'K', 129:  player_y--;             ! up
618         '2', 'J', 130:  player_y++;             ! down
619         '4', 'H', 131:  player_x--;             ! left
620                         last_right = false;
621         '6', 'L', 132:  player_x++;             ! right
622                         last_right = true;
623
624         '7', 'Y':       player_y--; player_x--; ! up-left
625                         last_right = false;
626         '9', 'U':       player_y--; player_x++; ! up-right
627                         last_right = true;
628         '1', 'B':       player_y++; player_x--; ! down-left
629                         last_right = false;
630         '3', 'N':       player_y++; player_x++; ! down-right
631                         last_right = true;
632         }
633
634         ! Keep Robot from falling off edges of playfield.
635         !
636         if (player_y == TopBar || player_y > Height) {
637                 player_y = player_y_last;
638         }
639         if (player_x < 1 || player_x > Width) {
640                 player_x = player_x_last;
641         }
642
643         ! Detect and handle collisions.
644         !
645         if (player_x == kitten_x && player_y == kitten_y) {
646                 animate_kitten(key, last_right);
647                 getkey();
648                 rfalse;
649         }
650         for (i = 0: i < nonkitten_count: i++) {
651                 if (player_x == nonkitten_x-->i
652                 && player_y == nonkitten_y-->i) {
653                         @set_cursor 1 1;
654                         last_message = lookup_msg(nonkitten_msg-->i);
655                         player_x = player_x_last;
656                         player_y = player_y_last;
657                 }
658         }
659         rtrue;
660 ];
661
662
663 [ animate_kitten key my_last_right i j junk robot_x anim_finished;
664
665         switch (key) {
666         '8', 'J', 129:  player_y++;
667         '2', 'K', 130:  player_y--;
668         '4', 'H', 131:  player_x++;
669         '6', 'L', 132:  player_x--;
670         '7', 'Y':       player_y++; player_x++; 
671         '9', 'U':       player_y++; player_x--;
672         '1', 'B':       player_y--; player_x++;
673         '3', 'N':       player_y--; player_x--;
674         }
675
676         anim_finished = false;
677         for (i = 4: i >= 0: i--) {
678                 @erase_window $ffff;
679                 @split_window TopBar;
680                 @set_window 1;
681                 @set_cursor 1 1;
682
683                 Banner();
684                 draw_horiz(TopBar);
685
686                 if (i > 0) {
687                         if (my_last_right) {
688                                 robot_x = Anim_Meet - i;
689                                 #IFV5; style reverse; #ENDIF;
690                                 draw_object(robot_x, TopBar - 1, '#');
691                                 #IFV5; style roman; #ENDIF;
692                                 draw_object(Anim_Meet - 1 + i, TopBar - 1, 
693                                         kitten_char, kitten_color);
694                         } else {
695                                 robot_x = Anim_Meet - 1 + i;
696                                 #IFV5; style reverse; #ENDIF;
697                                 draw_object(robot_x, TopBar - 1, '#');
698                                 #IFV5; style roman; #ENDIF;
699                                 draw_object(Anim_Meet - i, TopBar - 1,
700                                         kitten_char, kitten_color);
701                         }
702                 } else {
703                         j = TopBar - 1;
704                         @set_cursor j 1;
705                         print "You found Kitten!  Way to go, Robot!";
706                         anim_finished = true;
707                 }
708
709                 draw_object(kitten_x, kitten_y, kitten_char, kitten_color);
710
711                 #IFV5; style reverse; #ENDIF;
712                 draw_object(player_x, player_y, '#');
713                 #IFV5; style roman; #ENDIF;
714                 draw_nonkittens();
715
716                 if (anim_finished == false) {
717                         j = TopBar - 1;
718                         @set_cursor 1 Width;
719                         @aread junk 0 10 pause -> junk;
720                 } else {
721                         #IFV5; style reverse; #ENDIF;
722                         draw_object(player_x, player_y, '#');
723                         #IFV5; style roman; #ENDIF;
724                         @set_cursor 1 Width;
725                 }
726         }
727 ];
728
729 [ already_seen_xy x y i;
730         for (i = 0: i < already_count: i++) {
731                 if (already_x-->already_count == x &&
732                 already_y-->already_count ==y) {
733                         rtrue;
734                 }
735         }
736         already_x-->already_count = x;
737         already_y-->already_count = y;
738         already_count++;
739         rfalse;
740 ];
741
742
743 [ pause;
744         rtrue;
745 ];
746
747
748 [ init_kitten;
749         kitten_x = get_random_x();
750         kitten_y = get_random_y();
751         kitten_color = get_random_color();
752
753         while (already_seen_xy(kitten_x, kitten_y) == true) {
754                 kitten_x = get_random_x();
755                 kitten_y = get_random_y();
756         }
757         kitten_char = get_random_char();
758 ];
759
760
761 [ init_robot;
762         player_x = get_random_x();
763         player_y = get_random_y();
764
765         while (already_seen_xy(player_x, player_y) == true) {
766                 player_x = get_random_x();
767                 player_y = get_random_y();
768         }
769 ];      
770
771
772 [ init_nonkittens i;
773         already_msg_count = 0;
774         last_message = "";
775
776         for (i = 0: i < nonkitten_count: i++) {
777                 nonkitten_x-->i = get_random_x();
778                 nonkitten_y-->i = get_random_y();
779                 nonkitten_color-->i = get_random_color();
780
781                 while (already_seen_xy(nonkitten_x-->i, 
782                         nonkitten_y-->i) == true) {
783                         nonkitten_x-->i = get_random_x();
784                         nonkitten_y-->i = get_random_y();
785                 }
786                 nonkitten_char-->i = get_random_char();
787                 nonkitten_msg-->i = get_random_msg();
788         }
789 ];
790
791
792 [ draw_nonkittens i;
793         for (i = 0: i < nonkitten_count: i++) {
794                 draw_object(nonkitten_x-->i,
795                                 nonkitten_y-->i,
796                                 nonkitten_char-->i,
797                                 nonkitten_color-->i);
798         }
799 ];
800
801
802 [ draw_object x y character fore back;
803         @set_cursor y x;
804
805         if (fore == "")
806                 fore = Back_def;
807         if (back == "")
808                 back = Back_def;
809         
810
811         @set_colour fore Back_def;
812         if (character)
813                 print (char) character;
814
815         @set_colour Fore_def Back_def;
816
817 ];
818
819
820 [ draw_horiz row i;
821         @set_cursor row 1;
822         for (i = 0 : i < Width : i++)
823                 print (char) '-';
824 ];
825
826
827 [ getkey x;
828         @read_char 1 -> x;
829         if (x >= 'a' && x <= 'z')
830                 x = x - ('a' - 'A');
831         return x;
832 ];
833
834
835 [ get_random_char num;
836         num = random(93);
837         num = num + 33;
838         while (num == 35) {             ! avoid choosing '#'
839                 num = random(93);
840                 num = num + 33;
841         }
842         return num;
843 ];
844
845
846 [ get_random_msg num;
847         num = random(MESSAGE_NUM);
848         while (is_duplicate_msg(num) == true) {
849                 num = random(MESSAGE_NUM);
850         }
851         return num;
852 ];
853
854 [ get_random_color num;
855         num = random(7) + 2;
856         ! 0 and 1 are default color and current color
857         ! and we want to avoid picking the default color explicitly
858         while (num == $2c-->0) {
859                 num = random(7) + 2;
860         }
861         return num;
862 ];
863
864
865 [ is_duplicate_msg num i;
866         for (i = 0: i < already_msg_count: i++) {
867                 if (already_msg-->i==num) {
868                         rtrue;
869                 }
870         }
871         already_msg-->already_msg_count = num;
872         already_msg_count++;
873         rfalse;
874 ];
875
876
877 [ get_random_x;
878         return random(Width);
879 ];
880
881
882 [ get_random_y num ok;
883         ok = false;
884         ! Make sure we don't draw in the status bar.
885         while (ok == false) {
886                 num = random(Height);
887                 if (num > TopBar)
888                         ok = true;
889         }
890         return num;
891 ];
892
893
894 ! This function is mainly of use to members of the robotfindskitten
895 ! development team.
896 !
897 ! When this function is uncommented and enabled in
898 ! the menu, this will cause a script file to be emitted which contains
899 ! all NKIs properly formatted.
900
901 ![ print_all_nki num mystring;
902 !       @output_stream 2; @output_stream -1;
903 !       for (num = 1: num <= MESSAGE_NUM: num++) {
904 !               mystring = lookup_msg(num);
905 !               print (string)lookup_msg(num), "^";
906 !       }
907 !       @output_stream -2; @output_stream 1;
908 !];
909
910
911 ! Note:
912 ! @@126 == '~'
913 ! @@64 == '@'
914
915 [ lookup_msg num;
916         switch(num) {
917 1:      return "~I pity the fool who mistakes me for kitten!~, sez Mr. T.";
918 2:      return "That's just an old tin can.";
919 3:      return "It's an altar to the horse god.";
920 4:      return "A box of dancing mechanical pencils.  They dance!  They sing!";
921 5:      return "It's an old Duke Ellington record.";
922 6:      return "A box of fumigation pellets.";
923 7:      return "A digital clock. It's stuck at 2:17 PM.";
924 8:      return "That's just a charred human corpse.";
925 9:      return "I don't know what that is, but it's not kitten.";
926 10:     return "An empty shopping bag.  Paper or plastic?";
927 11:     return "Could it be... a big ugly bowling trophy?";
928 12:     return "A coat hanger hovers in thin air.  Odd.";
929 13:     return "Not kitten, just a packet of Kool-Aid(tm).";
930 14:     return "A freshly-baked pumpkin pie.";
931 15:     return "A lone, forgotten comma, sits here, sobbing.";
932 16:     return "ONE HUNDRED THOUSAND CARPET FIBERS!!!!!";
933 17:     return "It's Richard Nixon's nose!";
934 18:     return "It's Lucy Ricardo. ~Aaaah, Ricky!~, she says.";
935 19:     return "You stumble upon Bill Gates' stand-up act.";
936 20:     return "Just an autographed copy of the Kama Sutra.";
937 21:     return "It's the Will Rogers Highway.  Who was Will Rogers, anyway?";
938 22:     return "It's another robot, more advanced in design than you but strangely immobile.";
939 23:     return "Leonard Richardson is here, asking people to lick him.";
940 24:     return "It's a stupid mask, fashioned after a beagle.";
941 25:     return "Your State Farm Insurance(tm) representative!";
942 26:     return "It's the local draft board.";
943 27:     return "Seven 1/4~ screws and a piece of plastic.";
944 28:     return "An 80286 machine.";
945 29:     return "One of those stupid ~Homes of the Stars~ maps.";
946 30:     return "A signpost saying ~TO KITTEN~.  It points in no particular direction.";
947 31:     return "A hammock stretched between a tree and a volleyball pole.";
948 32:     return "A Texas Instruments of Destruction calculator.";
949 33:     return "It's a dark, amphorous blob of matter.";
950 34:     return "Just a pincushion.";
951 35:     return "It's a mighty zombie talking about some love and prosperity.";
952 36:     return "~Dear robot, you may have already won our 10 MILLION DOLLAR prize...~";
953 37:     return "It's just an object.";
954 38:     return "A mere collection of pixels.";
955 39:     return "A badly dented high-hat cymbal lies on its side here.";
956 40:     return "A marijuana brownie.";
957 41:     return "A plush Chewbacca.";
958 42:     return "Daily hunger conditioner from Australasia";
959 43:     return "Just some stuff.";
960 44:     return "Why are you touching this when you should be finding kitten?";
961 45:     return "A glorious fan of peacock feathers.";
962 46:     return "It's some compromising photos of Babar the Elephant.";
963 47:     return "A copy of the Weekly World News. Watch out for the chambered nautilus!";
964 48:     return "It's the proverbial wet blanket.";
965 49:     return "A ~Get Out of Jail Free~ card.";
966 50:     return "An incredibly expensive ~Mad About You~ collector plate.";
967 51:     return "Paul Moyer's necktie.";
968 52:     return "A haircut and a real job.  Now you know where to get one!";
969 53:     return "An automated robot-hater.  It frowns disapprovingly at you.";
970 54:     return "An automated robot-liker.  It smiles at you.";
971 55:     return "It's a black hole.  Don't fall in!";
972 56:     return "Just a big brick wall.";
973 57:     return "You found kitten!  No, just kidding.";
974 58:     return "Heart of Darkness brand pistachio nuts.";
975 59:     return "A smoking branding iron shaped like a 24-pin connector.";
976 60:     return "It's a Java applet.";
977 61:     return "An abandoned used-car lot.";
978 62:     return "A shameless plug for Crummy: http://www.crummy.com/";
979 63:     return "A shameless plug for the UCLA Linux Users Group: http://linux.ucla.edu/";
980 64:     return "A can of Spam Lite.";
981 65:     return "This is another fine mess you've gotten us into, Stanley.";
982 66:     return "It's scenery for ~Waiting for Godot~.";
983 67:     return "This grain elevator towers high above you.";
984 68:     return "A Mentos wrapper.";
985 69:     return "It's the constellation Pisces.";
986 70:     return "It's a fly on the wall.  Hi, fly!";
987 71:     return "This kind of looks like kitten, but it's not.";
988 72:     return "It's a banana!  Oh, joy!";
989 73:     return "A helicopter has crashed here.";
990 74:     return "Carlos Tarango stands here, doing his best impression of Pat Smear.";
991 75:     return "A patch of mushrooms grows here.";
992 76:     return "A patch of grape jelly grows here.";
993 77:     return "A spindle, and a grindle, and a bucka-wacka-woom!";
994 78:     return "A geyser sprays water high into the air.";
995 79:     return "A toenail?  What good is a toenail?";
996 80:     return "You've found the fish!  Not that it does you much good in this game.";
997 81:     return "A Buttertonsils bar.";
998 82:     return "One of the few remaining discoes.";
999 83:     return "Ah, the uniform of a Revolutionary-era minuteman.";
1000 84:     return "A punch bowl, filled with punch and lemon slices.";
1001 85:     return "It's nothing but a G-thang, baby.";
1002 86:     return "IT'S ALIVE! AH HA HA HA HA!";
1003 87:     return "This was no boating accident!";
1004 88:     return "Wait!  This isn't the poker chip!  You've been tricked!  DAMN YOU, MENDEZ!";
1005 89:     return "A livery stable!  Get your livery!";
1006 90:     return "It's a perpetual immobility machine.";
1007 91:     return "~On this spot in 1962, Henry Winkler was sick.~";
1008 92:     return "There's nothing here; it's just an optical illusion.";
1009 93:     return "The World's Biggest Motzah Ball!";
1010 94:     return "A tribe of cannibals lives here.  They eat Malt-O-Meal for breakfast, you know.";
1011 95:     return "This appears to be a rather large stack of trashy romance novels.";
1012 96:     return "Look out!  Exclamation points!";
1013 97:     return "A herd of wild coffee mugs slumber here.";
1014 98:     return "It's a limbo bar!  How low can you go?";
1015 99:     return "It's the horizon.  Now THAT'S weird.";
1016 100:    return "A vase full of artificial flowers is stuck to the floor here.";
1017 101:    return "A large snake bars your way.";
1018 102:    return "A pair of saloon-style doors swing slowly back and forth here.";
1019 103:    return "It's an ordinary bust of Beethoven... but why is it painted green?";
1020 104:    return "It's TV's lovable wisecracking Crow! ~Bite me!~, he says.";
1021 105:    return "Hey, look, it's war.  What is it good for?  Absolutely nothing.  Say it again.";
1022 106:    return "It's the amazing self-referential thing that's not kitten.";
1023 107:    return "A flamboyant feather boa.  Now you can dress up like Carol Channing!";
1024 108:    return "~Sure hope we get some rain soon,~ says Farmer Joe.";
1025 109:    return "~How in heck can I wash my neck if it ain't gonna rain no more?~ asks Farmer Al.";
1026 110:    return "~Topsoil's all gone, ma,~ weeps Lil' Greg.";
1027 111:    return "This is a large brown bear.  Oddly enough, it's currently peeing in the woods.";
1028 112:    return "A team of arctic explorers is camped here.";
1029 113:    return "This object here appears to be Louis Farrakhan's bow tie.";
1030 114:    return "This is the world-famous Chain of Jockstraps.";
1031 115:    return "A trash compactor, compacting away.";
1032 116:    return "This toaster strudel is riddled with bullet holes!";
1033 117:    return "It's a hologram of a crashed helicopter.";
1034 118:    return "This is a television.  On screen you see a robot strangely similar to yourself.";
1035 119:    return "This balogna has a first name, it's R-A-N-C-I-D.";
1036 120:    return "A salmon hatchery?  Look again.  It's merely a single salmon.";
1037 121:    return "It's a rim shot.  Ba-da-boom!";
1038 122:    return "It's creepy and it's kooky, mysterious and spooky.  It's also somewhat ooky.";
1039 123:    return "This is an anagram.";
1040 124:    return "This object is like an analogy.";
1041 125:    return "It's a symbol.  You see in it a model for all symbols everywhere.";
1042 126:    return "The object pushes back at you.";
1043 127:    return "A traffic signal.  It appears to have been recently vandalized.";
1044 128:    return "~There is no kitten!~ cackles the old crone.  You are shocked by her blasphemy.";
1045 129:    return "This is a Lagrange point.  Don't come too close now.";
1046 130:    return "The dirty old tramp bemoans the loss of his harmonica.";
1047 131:    return "Look, it's Fanny the Irishman!";
1048 132:    return "What in blazes is this?";
1049 133:    return "It's the instruction manual for a previous version of this game.";
1050 134:    return "A brain cell.  Oddly enough, it seems to be functioning.";
1051 135:    return "Tea and/or crumpets.";
1052 136:    return "This jukebox has nothing but Cliff Richards albums in it.";
1053 137:    return "It's a Quaker Oatmeal tube, converted into a drum.";
1054 138:    return "This is a remote control.  Being a robot, you keep a wide berth.";
1055 139:    return "It's a roll of industrial-strength copper wire.";
1056 140:    return "Oh boy!  Grub!  Er, grubs.";
1057 141:    return "A puddle of mud, where the mudskippers play.";
1058 142:    return "Plenty of nothing.";
1059 143:    return "Look at that, it's the Crudmobile.";
1060 144:    return "Just Walter Mattheau and Jack Lemmon.";
1061 145:    return "Two crepes, two crepes in a box.";
1062 146:    return "An autographed copy of ~Primary Colors~, by Anonymous.";
1063 147:    return "Another rabbit?  That's three today!";
1064 148:    return "It's a segmentation fault.  Core dumped, by the way.";
1065 149:    return "A historical marker showing the actual location of /dev/null.";
1066 150:    return "Thar's Mobius Dick, the convoluted whale.  Arrr!";
1067 151:    return "It's a charcoal briquette, smoking away.";
1068 151:    return "A pizza, melting in the sun.";
1069 152:    return "It's a ~HOME ALONE 2: Lost in New York~ novelty cup.";
1070 153:    return "A stack of 7 inch floppies wobbles precariously.";
1071 153:    return "It's nothing but a corrupted floppy.  Coaster anyone?";
1072 154:    return "A section of glowing phosphor cells sings a song of radiation to you.";
1073 155:    return "This TRS-80 III is eerily silent.";
1074 156:    return "A toilet bowl occupies this space.";
1075 157:    return "This peg-leg is stuck in a knothole!";
1076 158:    return "It's a solitary vaccuum tube.";
1077 159:    return "This corroded robot is clutching a mitten.";
1078 160:    return "~Hi, I'm Anson Williams, TV's 'Potsy'.~";
1079 161:    return "This subwoofer was blown out in 1974.";
1080 162:    return "Three half-pennies and a wooden nickel.";
1081 163:    return "It's the missing chapter to ~A Clockwork Orange~.";
1082 164:    return "It's a burrito stand flyer.  ~Taqueria El Ranchito~.";
1083 165:    return "This smiling family is happy because they eat LARD.";
1084 166:    return "Roger Avery, persona un famoso de los Estados Unidos.";
1085 167:    return "Ne'er but a potted plant.";
1086 168:    return "A parrot, kipping on its back.";
1087 169:    return "A forgotten telephone switchboard.";
1088 170:    return "A forgotten telephone switchboard operator.";
1089 171:    return "It's an automated robot-disdainer.  It pretends you're not there.";
1090 172:    return "It's a portable hole.  A sign reads: ~Closed for the winter~.";
1091 173:    return "Just a moldy loaf of bread.";
1092 174:    return "A little glass tub of Carmex. ($.89)  Too bad you have no lips.";
1093 175:    return "A Swiss-Army knife.  All of its appendages are out.  (toothpick lost)";
1094 176:    return "It's a zen simulation, trapped within an ASCII character.";
1095 177:    return "It's a copy of ~The Rubaiyat of Spike Schudy~.";
1096 178:    return "It's ~War and Peace~ (unabridged, very small print).";
1097 179:    return "A willing, ripe tomato bemoans your inability to digest fruit.";
1098 180:    return "A robot comedian.  You feel amused.";
1099 181:    return "It's KITT, the talking car.";
1100 182:    return "Here's Pete Peterson.  His batteries seem to have long gone dead.";
1101 183:    return "~Blup, blup, blup~, says the mud pot.";
1102 184:    return "More grist for the mill.";
1103 185:    return "Grind 'em up, spit 'em out, they're twigs.";
1104 186:    return "The boom box cranks out an old Ethel Merman tune.";
1105 187:    return "It's ~Finding kitten~, published by O'Reilly and Associates.";
1106 188:    return "Pumpkin pie spice.";
1107 189:    return "It's the Bass-Matic '76!  Mmm, that's good bass!";
1108 190:    return "~Lend us a fiver 'til Thursday~, pleas Andy Capp.";
1109 191:    return "It's a tape of '70s rock.  All original hits!  All original artists!";
1110 192:    return "You've found the fabled America Online disk graveyard!";
1111 193:    return "Empty jewelboxes litter the landscape.";
1112 194:    return "It's the astounding meta-object.";
1113 195:    return "Ed McMahon stands here, lost in thought.  Seeing you, he bellows, ~YES SIR!~";
1114 196:    return "...thingy???";
1115 197:    return "It's 1000 secrets the government doesn't want you to know!";
1116 198:    return "The letters O and R.";
1117 199:    return "A magical... magic thing.";
1118 200:    return "It's a moment of silence.";
1119 201:    return "It's Sirhan-Sirhan, looking guilty.";
1120 202:    return "It's ~Chicken Soup for the Kitten-seeking Soulless Robot.~";
1121 203:    return "It is a set of wind-up chatter teeth.";
1122 204:    return "It is a cloud shaped like an ox.";
1123 205:    return "You see a snowflake here, melting slowly.";
1124 206:    return "It's a big block of ice.  Something seems to be frozen inside it.";
1125 207:    return "Vladimir Lenin's casket rests here.";
1126 208:    return "It's a copy of ~Zen and The Art of Robot Maintenance~.";
1127 209:    return "This invisible box contains a pantomime horse.";
1128 210:    return "A mason jar lies here open.  It's label reads: ~do not open!~.";
1129 211:    return "A train of thought chugs through here.";
1130 212:    return "This jar of pickles expired in 1957.";
1131 213:    return "Someone's identity disk lies here.";
1132 214:    return "~Yes!~ says the bit.";
1133 215:    return "~No!~ says the bit.";
1134 216:    return "A dodecahedron bars your way.";
1135 217:    return "Mr. Hooper is here, surfing.";
1136 218:    return "It's a big smoking fish.";
1137 219:    return "You have new mail in /var/spool/robot";
1138 220:    return "Just a monitor with the blue element burnt out.";
1139 221:    return "A pile of coaxial plumbing lies here.";
1140 222:    return "It's a rotten old shoe.";
1141 223:    return "It's a hundred-dollar bill.";
1142 224:    return "It's a Dvorak keyboard.";
1143 225:    return "It's a cardboard box full of 8-tracks.";
1144 226:    return "Just a broken hard drive containg the archives of Nerth Pork.";
1145 227:    return "A broken metronome sits here, it's needle off to one side.";
1146 228:    return "A sign reads: ~Go home!~";
1147 229:    return "A sign reads: ~No robots allowed!~";
1148 230:    return "It's the handheld robotfindskitten game, by Tiger.";
1149 231:    return "This particular monstrosity appears to be ENIAC.";
1150 232:    return "This is a tasty-looking banana creme pie.";
1151 233:    return "A wireframe model of a hot dog rotates in space here.";
1152 234:    return "Just the empty husk of a locust.";
1153 235:    return "You disturb a murder of crows.";
1154 236:    return "It's a copy of the RobotFindsKitten EULA.";
1155 237:    return "It's Death.";
1156 238:    return "It's an autographed copy of ~Secondary Colors~, by Bob Ross.";
1157 239:    return "It is a marzipan dreadnought that appears to have melted and stuck.";
1158 240:    return "It's a DVD of ~Crouching Monkey, Hidden Kitten~, region encoded for the moon.";
1159 241:    return "It's Kieran Hervold.  Damn dyslexia!";
1160 242:    return "A non-descript box of crackers.";
1161 243:    return "Carbonated Water, High Fructose Corn Syrup, Color, Phosphoric Acid, Flavors, Caffeine.";
1162 244:    return "~Move along! Nothing to see here!~";
1163 245:    return "It's the embalmed corpse of Vladimir Lenin.";
1164 246:    return "A coupon for one free steak-fish at your local family diner.";
1165 247:    return "A set of keys to a 2001 Rolls Royce.  Worthless.";
1166
1167 ! The following Non Kitten Items were added by David Griffith
1168 !
1169 248:    return "It's the Golden Banana of Discord!";
1170 249:    return "The Inform Designer's Manual (4th edition)";
1171 250:    return "A packet of pipe cleaners.";
1172 251:    return "It's Andrew Plotkin plotting something.";
1173 252:    return "A half-eaten cheese sandwich.";
1174 253:    return "Clang, clang, clang goes the tranny!";
1175 254:    return "A family of integrals are here integrating.";
1176 255:    return "A tuft of kitten fur, but no kitten.";
1177 256:    return "A bottle of oil!  Refreshing!";
1178 257:    return "A shameless plug for Frotz: http://www.cs.csubak.edu/@@126dgriffi/proj/frotz/";
1179 258:    return "Clifford Stoll is here selling Klein bottles.";
1180 259:    return "You found the marble in the oatmeal!";
1181 260:    return "An empty Altoids tin.";
1182 261:    return "An empty Penguin Mints tin.";
1183 262:    return "So, THAT's what an invisible barrier looks like!";
1184 263:    return "A cluster of cattails are growing here.";
1185 264:    return "A discarded bagpipe chanter reed.";
1186 265:    return "Big Bird is here looking for Mr. Looper.";
1187 266:    return "It's a Linux install CD.";
1188 267:    return "You found Puppy!  Too bad this isn't ~Robot Finds Puppy~.";
1189 268:    return "Several meters of cat5 cable.";
1190 269:    return "A scrap of parchment bears the single word, ~meow~.";
1191 270:    return "A puddle of chocolate sauce.";
1192 271:    return "Your pal Floyd is here and wants to play Hucka-Bucka-Beanstalk.";
1193 272:    return "Someone is talking to Ralph on the big white phone here.";
1194 273:    return "'Twas brillig in the slivey-toves...";
1195 274:    return "Darth Vader is here looking for his Teddywookie.";
1196 275:    return "A baboon with a bassoon hoots angrily at you.";
1197 276:    return "Catsup and Mustard all over the place!  It's the Human Hamburger!";
1198 277:    return "Gibble, Gobble, we ACCEPT YOU ...";
1199 278:    return "A rancid corn dog.";
1200 279:    return "It's a tribute to fishnet stockings.";
1201 280:    return "A jar of Vegemite is playing hopscotch here.";
1202 281:    return "Nipples, dimples, knuckles, NICKLES, wrinkles, pimples!!";
1203 282:    return "A bottle of hair tonic.";
1204 283:    return "A packet of catnip.";
1205 284:    return "Here's Cal Worthington and his dog ~Spot~!";
1206 285:    return "It's Uncle Doctor Hurkamur!";
1207 286:    return "YEEEEEEEEEEEHAAAAAAAA!!!!!";
1208 287:    return "Thunder, Thunder, Thunder, Thunder Cats!!!";
1209 288:    return "An overturned bottle of ink and lots of kitten pawprints.";
1210 289:    return "A flyer advertising a sale at Spatula City.";
1211 290:    return "A 540Hz tuning fork.";
1212 291:    return "A 3-inch floppy disk.";
1213 292:    return "Seargent Duffy is here.";
1214 293:    return "A ball of pocket fluff.";
1215 294:    return "A 3-sided Monty Python record.";
1216 295:    return "A Sanrio catalog.";
1217 296:    return "A scratching-post.";
1218 297:    return "Butane!!!";
1219 298:    return "An ice cube.";
1220 299:    return "Just a cage of white mice.";
1221 300:    return "You've found Harvey, the Wonder Hamster!";
1222 301:    return "A jar of dehydrated water.";
1223 302:    return "Just some swamp gas.";
1224 303:    return "A bowl of cherries.";
1225 304:    return "Spoon!!!";
1226 305:    return "A sign reads ~Don't step on the Mome Raths~.";
1227 306:    return "Dirty socks.";
1228 307:    return "~Dogbert's tech support, how may I abuse you?~";
1229 308:    return "A radio hisses away.  Kitten must have been here.";
1230 309:    return "~Kilroy was here~";
1231 310:    return "~Plexar was here~";
1232 311:    return "~Kibo was here~";
1233 312:    return "It's the cork to someone's lunch.";
1234 313:    return "A piping-hot pizza.  Useless.";
1235 314:    return "Diogenes is here demanding whisky.";
1236 315:    return "The Monolith of Spam towers above you.";
1237 316:    return "~Meow meow meow meow...~  How discouraging!  It's only a recording.";
1238 317:    return "Marvin is complaining about the pain in the diodes down his left side.";
1239 318:    return "Mr. Kamikaze and Mr. DNA are here drinking tea.";
1240 319:    return "Rene Descarte is whistling a happy tune here.";
1241 320:    return "Ooh, shiny!";
1242 321:    return "It's a giant slorr!";
1243 322:    return "A ketchup bottle (nearly empty).";
1244 323:    return "A large pile of rubber bands.";
1245 324:    return "A ton of feathers.";
1246 325:    return "This nonkitten may contain peanuts.";
1247 326:    return "A tree with some jelly nailed to it.";
1248 327:    return "Ah, the skirl of the pipes and the rustle of the silicon...";
1249 328:    return "You found Parakeet.  Too bad this isn't ~Robot Finds Parakeet~.";
1250 329:    return "A ball of yarn.";
1251 330:    return "A big chunk of frozen chocolate pudding.";
1252 331:    return "There is no tea here.";
1253 332:    return "An automated robot-doubter.  It doesn't believe in you.";
1254 333:    return "A plastic model of Kitten.";
1255 334:    return "It's Yorgle, the Yellow Dragon.";
1256 335:    return "It's Grundle, the Green Dragon.";
1257 336:    return "It's Rhindle, the Red Dragon.";
1258 337:    return "An old pattern is here going on and on.";
1259 338:    return "TV says donuts are high in fat.";
1260 339:    return "It's a pool with a straw in it.";
1261 340:    return "A singing frog.  Useless.";
1262 341:    return "It's a funky beat!";
1263 342:    return "A tiny ceramic Kitten.  It's probably not the Kitten you're looking for.";
1264 343:    return "An oven mitt with kittens on it.";
1265 344:    return "An empty coaxial cable spool.";
1266 345:    return "Billions and billions of things that aren't Kitten.";
1267 346:    return "Snarf?";
1268 347:    return "Faboo!";
1269 348:    return "99 bottles of beer are on a wall here.";
1270 349:    return "Hydraulic fluid and jagged metal bits.  You recoil from the scene of carnage.";
1271 350:    return "A bobolink is twittering a happy tune here.";
1272 351:    return "Biscuits.";
1273 352:    return "A blank deposit slip.";
1274 353:    return "What's that blue thing doing here?";
1275 354:    return "A travel-sized cyclotron.";
1276 355:    return "A largish bath towel.";
1277 356:    return "You found Chinchilla!  Too bad this isn't ~Robot Finds Chinchilla~.";
1278 357:    return "A meerkat... not even close.";
1279 358:    return "A green yo-yo.";
1280 359:    return "A hairless rat.";
1281 360:    return "Bright copper kettles.";
1282
1283 ! The following Non Kitten Items were added by David Griffith for
1284 ! Release 3
1285 !
1286 361:    return "Ten yards of avocado-green shag carpet.";
1287 362:    return "A zorkmid coin.";
1288 363:    return "It's Babe Flathead's favorite bat.";
1289 364:    return "It's cute like a kitten, but isn't a kitten.";
1290 365:    return "A cyclops glowers angrily at you.";
1291 366:    return "A discarded pop bottle.";
1292 367:    return "Definitely not Kitten.";
1293 368:    return "A mouse.";
1294 369:    return "Slack!";
1295 370:    return "A troll.  Ewww!!!";
1296 371:    return "A tube of white lithium grease.  Perfect for your robotic joints.";
1297 372:    return "Talcum powder.";
1298 373:    return "A breadbox.  Nope, Kitten isn't in the breadbox.";
1299 374:    return "An unlicensed nuclear accelerator.";
1300 375:    return "A sub-atomic particle languishes here all alone.";
1301 376:    return "A bowling ball with the name ~Bob~ inscribed on it.";
1302 377:    return "A briefcase filled with spy stuff.";
1303 378:    return "Is that an elephant's head or a winged sandal?";
1304 379:    return "Bibbidy bibbidy bibbidy bibbidy bibbidy bibbidy...";
1305 380:    return "A tube of toothpaste.  Too bad you have no teeth.";
1306 381:    return "This isn't the item you're looking for.";
1307 382:    return "A discarded refrigerator box.  Nope, Kitten isn't in the box.";
1308 383:    return "A paper shopping bag.  Nope, Kitten isn't in the bag.";
1309 384:    return "A flyer reads, ~Please donate hydraulic fluid~";
1310 385:    return "A dangly thing mangled by Kitten.";
1311 386:    return "A crouton.";
1312 387:    return "A patch from the Mammoth Caves.";
1313 388:    return "A leather pouch filled with multisided dice.";
1314 389:    return "A pair of combat boots.";
1315 390:    return "A pile of coconuts.";
1316 391:    return "A big bass drum bearing a hole and suspicious clawmarks.";
1317 392:    return "It's a clue!";
1318 393:    return "Long lost needle nose pliers.";
1319 394:    return "A vase of roses.";
1320 395:    return "A crystal ball.  It doesn't seem to know where Kitten is.";
1321 396:    return "It's Princess Leia, the yodel of life.";
1322 397:    return "Sigmund Freud is here asking about your mother.";
1323 398:    return "BURRRRP!!!!  Flavorful and full of protein!";
1324 399:    return "A jar of library paste.";
1325 400:    return "These aren't ordinary beans.  They're magic beans!";
1326 401:    return "Some sort of electronic handheld game from the 1970s.";
1327
1328 ! The following Non Kitten Items were added by David Griffith for
1329 ! Release 4
1330 !
1331 402:    return "Just some glop of some sort.";
1332 403:    return "A bottle of distilled water.";
1333 404:    return "A rusty slinky.  It was such a wonderful toy!";
1334 405:    return "Some coconut crabs are milling about here.";
1335 406:    return "Dancing cold water pipes.  Mikey must have been here.";
1336 407:    return "Ash is mumbling ~KLAATU BARATA NI<coughcough>~ here.";
1337 408:    return "It's a blob of white goo.";
1338
1339 ! The following Non Kitten Items were added by David Griffith from the
1340 ! official list of NKIs.
1341 !
1342 409:    return "A gravestone stands here.  ~Izchak Miller, ascended.~";
1343 410:    return "Someone has written ~ad aerarium~ on the ground here.";
1344 410:    return "A large blue eye floats in midair.";
1345 411:    return "This appears to be a statue of Perseus.";
1346 412:    return "There is an opulent throne here.";
1347 413:    return "It's a squad of Keystone Kops.";
1348 414:    return "This seems to be junk mail addressed to the finder of the Eye of Larn.";
1349 415:    return "A wondrous and intricate golden amulet.  Too bad you have no neck.";
1350 416:    return "The swampy ground around you seems to stink with disease.";
1351 417:    return "An animate blob of acid.  Being metallic, you keep well away.";
1352 418:    return "It's a copy of Knuth with the chapter on kitten-search algorithms torn out.";
1353 419:    return "A crowd of people, and at the center, a popular misconception.";
1354 420:    return "It's a blind man.  When you touch, he exclaims ~It's a kitten prospecting robot!~";
1355 421:    return "It's a lost wallet.  It's owner didn't have pets, so you discard it.";
1356 422:    return "This place is called Antarctica.  There is no kitten here.";
1357 423:    return "It's a mousetrap, baited with soap.";
1358 424:    return "A book with ~Don't Panic~ in large friendly letters across the cover.";
1359 425:    return "A compendium of haiku about metals.";
1360 426:    return "A discredited cosmology, relic of a bygone era.";
1361 427:    return "A hollow voice says ~Plugh~.";
1362 428:    return "A knight who says ~Either I am an insane knave, or you will find kitten.~";
1363 429:    return "A neural net -- maybe it's trying to recognize kitten.";
1364 430:    return "A screwdriver.";
1365 431:    return "A statue of a girl holding a goose like the one in Gottingen, Germany.";
1366 432:    return "A tetradrachm dated ~42 B.C.~";
1367 433:    return "A voice booms out ~Onward, kitten soldiers...~";
1368 434:    return "An eminently forgettable zahir.";
1369 435:    return "Apparently, it's Edmund Burke.";
1370 436:    return "For a moment, you feel something in your hands, but it disappears!";
1371 437:    return "Here is a book about Robert Kennedy.";
1372 438:    return "Hey, robot, leave those lists alone.";
1373 439:    return "Ho hum.  Another synthetic a posteriori.";
1374 440:    return "It's Asimov's Laws of Robotics.  You feel a strange affinity for them.";
1375 441:    return "It's Bach's Mass in B-minor!";
1376 442:    return "It's a bug.";
1377 443:    return "It's a synthetic a priori truth!  Immanuel would be so pleased!";
1378 444:    return "It's the Tiki Room.";
1379 445:    return "Just some old play by a Czech playwright, and you can't read Czech.";
1380 446:    return "Kitten is the letter 'Q'.  Oh, wait, maybe not.";
1381 447:    return "Quidquid Latine dictum sit, kitten non est.";
1382 448:    return "Sutro Tower is visible at some distance through the fog.";
1383 449:    return "The Digital Millennium Copyright Act of 1998.";
1384 450:    return "The United States Court of Appeals for the Federal Circuit.";
1385 451:    return "The non-kitten item like this but with ~false~ and ~true~ switched is true.";
1386 452:    return "This is the chapter called ~A Map of the Cat?~ from Feynman's autobiography.";
1387 453:    return "This is the forest primeval.";
1388 454:    return "Werner's ~Pocket Field Guide to Things That Are Not Kitten~.";
1389 455:    return "You found nettik, but that's backwards.";
1390 456:    return "You have found some zinc, but you must not stop here, for you must find kitten.";
1391 457:    return "~50 Years Among the Non-Kitten Items~, by Ann Droyd.";
1392 458:    return "~Robot may not injure kitten, or, through inaction, ...~";
1393 459:    return "~Address Allocation for Private Internets~ by Yakov Rekhter et al.";
1394 460:    return "~Mail Routing and the Domain System~ by Craig Partridge.";
1395 461:    return "~The Theory and Practice of Oligarchical Collectivism~ by Emmanuel Goldstein.";
1396 462:    return "~201 Kitten Verbs, Fully Conjugated~.  You look for ~find~.";
1397 463:    return "A card shark sits here, practicing his Faro shuffle.  He ignores you.";
1398 463:    return "A copy of DeCSS.  They're a dime a dozen these days.";
1399 464:    return "A demonic voice proclaims ~There is no kitten, only Zuul~.  You flee.";
1400 465:    return "A lotus.  You make an interesting pair.";
1401 466:    return "A milk carton, with a black and white picture of kitten on the side.";
1402 467:    return "Any ordinary robot could see from a mile away that this wasn't kitten.";
1403 468:    return "A stegosaurus, escaped from the stegosaurusfindsrobot game.  It finds you.";
1404 469:    return "Baling wire and chewing gum.";
1405 470:    return "Chewing gum and baling wire.";
1406 471:    return "Here is no kitten but only rock, rock and no kitten and the sandy road.";
1407 472:    return "Hey, I bet you thought this was kitten.";
1408 473:    return "It is an ancient mariner, and he stoppeth one of three.";
1409 474:    return "It pleases you to be kind to what appears to be kitten -- but it's not!";
1410 475:    return "It's a blatant plug for Ogg Vorbis, http://www.vorbis.com/";
1411 476:    return "It's a business plan for a new startup, kitten.net.";
1412 477:    return "It's a revised business plan for a new startup, my.kitten.net.";
1413 478:    return "It's a square.";
1414 479:    return "It seems to be a copy of ~A Tail of Two Kitties~.";
1415 480:    return "It's the Donation of Constantine!";
1416 481:    return "It's this message, nothing more.";
1417 482:    return "Lysine, an essential amino acid.  Well, maybe not for robots.";
1418 483:    return "No kitten here.";
1419 484:    return "The score for a Czech composer's ~Kitten-Finding Symphony in C~.";
1420 485:    return "This looks like Bradley's ~Appearance and Reality~, but it's really not.";
1421 486:    return "This non-kitten item no verb.";
1422 487:    return "You feel strangely unfulfilled.";
1423 488:    return "You hit the non-kitten item.  The non-kitten item fails to yowl.";
1424 489:    return "You suddenly yearn for your distant homeland.";
1425 490:    return "You've found the snows of yesteryear!  So that's where they all went to.";
1426 491:    return "Approaching.  One car.  J.  Followed by.  Two car.  M, M.  In five. Minutes.";
1427 491:    return "Free Jon Johansen!";
1428 492:    return "Free Dmitry Sklyarov!";
1429 493:    return "One person shouts ~What do we want?~ The crowd answers ~Free Dmitry!~";
1430 494:    return "Judith Platt insults librarians.";
1431 495:    return "This map is not the territory.";
1432 496:    return "~Go back to Libraria!~, says Pat Schroeder.";
1433 497:    return "This is a porcelain kitten-counter.  0, 0, 0, 0, 0...";
1434 498:    return "An old bootable business card, unfortunately cracked down the middle.";
1435 499:    return "A kitten sink, for washing kitten (if only kitten liked water).";
1436 500:    return "A kitten source (to match the kitten sink).";
1437 501:    return "If it's one thing, it's not another.";
1438 502:    return "If it's not one thing, it's another.";
1439 503:    return "A caboodle.";
1440 504:    return "A grin.";
1441 505:    return "A hedgehog.  It looks like it knows something important.";
1442 506:    return "You've found... Oh wait, that's just a cat.";
1443 507:    return "Robot should not be touching that.";
1444 508:    return "Air Guitar!!!  NA na NA na!!";
1445 509:    return "An aromatherapy candle burns with healing light.";
1446 510:    return "You find a bright shiny penny.";
1447 511:    return "It's a free Jon Johansen!";
1448 512:    return "It's a free Dmitry Sklyarov!";
1449 513:    return "The rothe hits!  The rothe hits!";
1450 514:    return "It's an Internet chain letter about sodium laureth sulfate.";
1451 515:    return "Ed Witten sits here, pondering string theory.";
1452 516:    return "Something is written here in the dust.  You read: ~rJbotfndQkttten~.";
1453 517:    return "We wish you a merry kitten, and a happy New Year!";
1454 518:    return "Run away!  Run away!";
1455 519:    return "You can see right through this copy of Brin's ~Transparent Society~.";
1456 520:    return "This copy of ~Steal This Book~ has been stolen from a bookstore.";
1457 521:    return "It's Roya Naini.";
1458 522:    return "This kit is the fourteenth in a series of kits named with Roman letters.";
1459 523:    return "This is the tenth key you've found so far.";
1460 524:    return "You find a fraud scheme in which loans are used as security for other loans.";
1461 525:    return "It's the phrase ~and her~, written in ancient Greek.";
1462 526:    return "It's the author of ~Randomness and Mathematical Proof~.";
1463 527:    return "It's the crusty exoskeleton of an arthropod!";
1464 528:    return "It's Emporer Shaddam the 4th's planet!";
1465 529:    return "It's the triangle leg adjacent to an angle divided by the leg opposite it.";
1466 530:    return "It's a bottle of nail polish remover.";
1467 531:    return "You found netkit!  Way to go, robot!";
1468 532:    return "It's the ASCII Floating Head of Seth David Schoen!";
1469 533:    return "A frosted pink party-cake, half eaten.";
1470 534:    return "A bitchin' homemade tesla coil.";
1471 535:    return "Conan O'Brian, sans jawbone.";
1472 536:    return "It's either a mirror, or another soulless kitten-seeking robot.";
1473 537:    return "Preoccupation with finding kitten prevents you from investigating further.";
1474 538:    return "Fonzie sits here, mumbling incoherently about a shark and a pair of waterskis.";
1475 539:    return "The ghost of your dance instructor, his face a paper-white mask of evil.";
1476 540:    return "A bag of groceries taken off the shelf before the expiration date.";
1477 541:    return "A book: Feng Shui, Zen: the art of randomly arranging items that are not kitten.";
1478 542:    return "This might be the fountain of youth, but you'll never know.";
1479 543:    return "Tigerbot Hesh.";
1480 544:    return "Stimutacs.";
1481 545:    return "A canister of pressurized whipped cream, sans whipped cream.";
1482 546:    return "The non-kitten item bites!";
1483 547:    return "A chain hanging from two posts reminds you of the Gateway Arch.";
1484 548:    return "A mathematician calculates the halting probability of a Turing machine.";
1485 549:    return "A number of short theatrical productions are indexed 1, 2, 3, ... n.";
1486 550:    return "A technical university in Australia.";
1487 551:    return "It is -- I just feel something wonderful is about to happen.";
1488 552:    return "It's a Cat 5 cable.";
1489 553:    return "It's a U.S. president.";
1490 554:    return "It's a piece of cloth used to cover a stage in between performances.";
1491 555:    return "The ionosphere seems charged with meaning.";
1492 556:    return "This tomography is like, hella axial, man!";
1493 557:    return "It's your favorite game -- robotfindscatan!";
1494 558:    return "Just a man selling an albatross.";
1495 559:    return "The intermission from a 1930s silent movie.";
1496 560:    return "It's an inverted billiard ball!";
1497 561:    return "The spectre of Sherlock Holmes wills you onwards.";
1498
1499 default: return "Unknown NKI";
1500         }
1501 ];