I'm pretty sure Quest used to do this, though not as vague as you are suggesting. It was more like...
>go to door
The door is locked you can't go through it.
>unlock it
You unlock the door.
Pulling the feature off through code would require in your case a custom travel command for each compass direction interacting with exit direction properties the room would have, where as trying to south would interact abd fail with the south exit property then redirect a common IT variable to the door object blocking the path.
set string <quest.lastobject; #Game_LastObject#>set string <Game_LastObject; #Self#>set string <Self; $thisobject$>
' "IT-Game"
define game <IT-Game>
asl-version <400>
gametype singleplayer
start <IT-Room>
game author <TheRizzle>
game info <A sample/tutorial example on implementing the use of IT to refer to the last used object.>
beforeturn {
if ( $lengthof(#quest.command#)$ > 0 ) then {
set numeric <quest.SubIT-LocateStart; $instr(#quest.command#;_;)$>
set numeric <quest.SubIT-LocateEnd; $lengthof(#quest.command#)$>
set numeric <quest.SubIT-Math; %quest.SubIT-LocateEnd% - %quest.SubIT-LocateStart%>
set string <quest.SubIT-Parse; $right(#quest.command#; %quest.SubIT-Math%)$>
set string <quest.SubIT-Format; $left(#quest.command#; %quest.SubIT-LocateStart%)$>
if ( #quest.SubIT-Parse# = it ) then exec <#quest.SubIT-Format# #quest.FindIT-Parse#> else msg <no>
}
}
afterturn {
set numeric <quest.FindIT-LocateStart; $instr(#quest.command#;_;)$>
set numeric <quest.FindIT-LocateEnd; $lengthof(#quest.command#)$>
set numeric <quest.FindIT-Math; %quest.FindIT-LocateEnd% - %quest.FindIT-LocateStart%>
set string <quest.FindIT-Parse; $right(#quest.command#;%quest.FindIT-Math%)$>
msg <It = #quest.FindIT-Parse#>
}
command <push #object#> {
for each object in <#quest.currentroom#> if ( $objectproperty(#quest.thing#; alias)$ = #object# ) then msg <$objectproperty(#quest.thing#; push)$>
}
command <punch #object#> {
for each object in <#quest.currentroom#> if ( $objectproperty(#quest.thing#; alias)$ = #object# ) then msg <$objectproperty(#quest.thing#; punch)$>
}
end define
define options
debug on
panes disabled
end define
define room <IT-Room>
define object <obj001>
alias <ball>
look <You see a blue ball.>
prefix <a blue>
displaytype <Object>
article <it>
gender <it>
properties <push=You push the ball.; punch=You punch the ball.>
end define
define object <obj002>
alias <dog>
look <You see a brown dog.>
prefix <a brown>
displaytype <Object>
article <it>
gender <it>
properties <push=You push the dog.; punch=You punch the dog.>
end define
end define
Oh man that was exciting. I hurriedly threw this together thinking you and I were both racing towards the same solution.
The open challenge was awesome fun, and if you think of any other challenges post them.
' "IT-Game"
define game <IT-Game>
asl-version <400>
gametype singleplayer
start <IT-Room>
game author <TheRizzle>
game info <A sample/tutorial example on implementing the use of IT to refer to the last used object.>
beforeturn {
if ( $lengthof(#quest.command#)$ > 0 ) then {
set numeric <quest.SubIT-LocateStart; $instr(#quest.command#;_;)$>
set numeric <quest.SubIT-LocateEnd; $lengthof(#quest.command#)$>
set numeric <quest.SubIT-Math; %quest.SubIT-LocateEnd% - %quest.SubIT-LocateStart%>
set string <quest.SubIT-Parse; $right(#quest.command#; %quest.SubIT-Math%)$>
set string <quest.SubIT-Format; $left(#quest.command#; %quest.SubIT-LocateStart%)$>
if ( #quest.SubIT-Parse# = it ) then exec <#quest.SubIT-Format# #quest.FindIT-Parse#> else msg <no>
}
}
afterturn {
set numeric <quest.FindIT-LocateStart; $instr(#quest.command#;_;)$>
set numeric <quest.FindIT-LocateEnd; $lengthof(#quest.command#)$>
set numeric <quest.FindIT-Math; %quest.FindIT-LocateEnd% - %quest.FindIT-LocateStart%>
set string <quest.FindIT-Parse; $right(#quest.command#;%quest.FindIT-Math%)$>
msg <It = #quest.FindIT-Parse#>
}
command <push #object#> {
for each object in <#quest.currentroom#> if ( $objectproperty(#quest.thing#; alias)$ = #object# ) then msg <$objectproperty(#quest.thing#; push)$>
}
command <punch #object#> {
for each object in <#quest.currentroom#> if ( $objectproperty(#quest.thing#; alias)$ = #object# ) then msg <$objectproperty(#quest.thing#; punch)$>
}
end define
define options
debug on
panes disabled
end define
define room <IT-Room>
define object <obj001>
alias <ball>
look <You see a blue ball.>
prefix <a blue>
displaytype <Object>
article <it>
gender <it>
properties <push=You push the ball.; punch=You punch the ball.>
end define
define object <obj002>
alias <dog>
look <You see a brown dog.>
alt <brown; brown dog>
prefix <a brown>
displaytype <Object>
article <it>
gender <it>
properties <push=You push the brown dog.; punch=You punch the brown dog.>
end define
define object <obj003>
alias <dog>
alt <grey; grey dog>
look <You see a grey dog.>
prefix <a grey>
displaytype <Object>
article <it>
gender <it>
properties <push=You push the grey dog.; punch=You punch the grey dog.>
end define
end define
beforeturn {
if ( $lengthof(#quest.input#)$ > 0 ) then {
set numeric <dis-obj-count; 0>
for each object in <#quest.currentroom#> {
if ( $objectproperty(#quest.thing#; alias)$ = #quest.input# ) then {
set numeric <dis-obj-count; %dis-obj-count% + 1>
set string <dis-obj[%dis-obj-count%]; #quest.thing#>
}
}
if ( %dis-obj-count% > 1 ) then {
msg <Which object did you mean?|n>
for <i;1;%dis-obj-count%> {
msg <%i%. $displayname(#dis-obj[%dis-obj-count%]#)$|n>
}
}
' Selection of applicable object choices code would go here.
}
}
command <push #quest.input#> {
for each object in <#quest.currentroom#> if ( $objectproperty(#quest.thing#; alias)$ = #quest.input# ) then msg <$objectproperty(#quest.thing#; push)$>
}
As for the rest of this thread, I'm somewhat baffled. I think a feature request would be simpler than all of that code... but maybe less fun