REVERSE‐DIR‐STR - KVonGit/zil-stuff GitHub Wiki
Routine to return a string like ' from [the opposite direction]'
<ROUTINE REVERSE-DIR-STR (DIR)
<COND
(<==? .DIR ,P?NORTH> " from the south")
(<==? .DIR ,P?SOUTH> " from the north")
(<==? .DIR ,P?EAST> " from the west")
(<==? .DIR ,P?WEST> " from the east")
(<==? .DIR ,P?UP> " from below")
(<==? .DIR ,P?DOWN> " from above")
(T ", seemingly out of thin air")
>
>
EXAMPLE USAGE:
<TELL "The NPC enters" <REVERSE-DIR-STR ,PRSO> "." CR>
Thanks to the ZIL Game Coding Guru!