STAC - Object Listing Contributed by Darrel O'Neil There is a lamp, a sword here. There is a lamp and a sword here. Spotted the difference? With STAC, listing the objects in a room is simplicity itself using the LIST ROOM command. But with simplicity there is nearly always a drawback, and with STAC the "and" is it. The absence of an "and" when the objects are listed is a minor one, but it can make all the difference to the presentation of your adventure. The following routine does just that. Create three messages eg: 9913 There is 9914 here. 9800 and Now go to the Special Conditions. I used Special Condition 22 and counters 10, 11 and 12 but you can easily change them to suit. Now type in this listing: 1 LF (This is optional) 2 CNTOBJ ROOM SETCNTR 10 3 1 SETCNTR 11 1 SETCNTR 12 4 MESSAGE 9913 5 IF 1 =COUNT 10 THEN LIST ROOM MESSAGE 9914 RETURN 6 REPEAT 7 IF HERE COUNTER 11 THEN INC 12 8 INC 11 9 UNTIL COUNTER 12 = COUNTER 10 + 1 10 DEC 11 11 COUNTER 11 TO 0 12 LIST ROOM MESSAGE 9800 13 BRING COUNTER 11 OBJSHT COUNTER 11 14 MESSAGE 9914 Now you'll have to edit Special Conditions 14 and 15. Where you see the command IF FIRSTOB ROOM THEN MESSAGE 9913 LIST ROOM MESSAGE 9914, replace it with IF FIRSTOB ROOM THEN SPECIAL 22 (or whichever Special Condition you have designated). Basically, what the condition does is count the number of objects in the room, which is stored in counter 10. If there is only one object then that object is listed with the LIST ROOM command and the rest of the condition is scrapped (line 5). If there are two or more objects then lines 7 and 8 are repeated until the number of the last object is reached. This is stored in counter 11. Now that we have that magic number, the last object is moved to an unused room (line 11). In this example the object is stored in room 0. The remaining objects are listed with the LIST ROOM command and the "and" message is tagged on the end (line 12), giving us something like this: There is a lamp, a sword and Finally the object we stored in room 0 is returned and its short description is added onto the end of "and" in line 13. The last line prints the "here" message. A word of warning: this routine will only work if your objects and nouns are of the same number. For example, if object 1 is a lamp then "lamp" must be entered as noun 1 and so on. The changes made to Special Conditions 14 and 15 just call the routine when you enter a new location or type LOOK and there are one or more objects present.