I thought it might be useful to share some tips when writing in AdvSys. I use it to write my Jam entry. Got working locations, few hidden items and passages plus some descriptions and a set of verbs.
I wanted to write limited hints (like in Goblins 3 point-and-click game) which are random, but not repeated, displayed to the user when he/she types HINT command. Here's a list implementation.
First, I specified hint objects with description property and a link to next hint:
( OBJECT hint ( PROPERTY next hint-1 ) ) ( hint hint-1 ( PROPERTY ldesc "Look around couple of times and maybe you will see more details.\n" next hint-2 ) )
Then, I wrote the function that draws a number from 0 to number of left hints minus 1, then traverses the list, removes a hint from the list and decrements number of left hints. Next time this hint item won't be drawn:
( DEFINE ( hint-func &aux num p c ) ( IF ( = hints 0 ) ( PRINT "Sorry, no more hints available.\n" ) ( PROGN ( PRINT-NUMBER hints ) ( PRINT " hints available.\n" ) ( PRINT "Are you sure you want to use a hint? " ) ( IF ( YES-OR-NO ) ( PROGN ( PRINT "Hint: " ) ( SETQ num ( RAND hint-count ) ) ( SETQ p hint ) ( SETQ c ( GETP p next ) ) ( WHILE ( > num 0 ) ( SETQ p c ) ( SETQ c ( GETP c next ) ) ( SETQ num ( - num 1 ) ) ) ( PRINT ( GETP c ldesc ) ) ( SETP p next ( GETP c next ) ) ( SETQ hint-count ( - hint-count 1 ) ) ( SETQ hints ( - hints 1 ) ) ) ( PRINT "OK, no hint used.\n" ) ) ) ) )
This approach is nice and also the cost of traversal is exactly the number of items visited (so removed ones do not count).
Best regards to all and Good Luck with your adventures.