posted 08-10-2001 21:36 GMT
' Created with QDK 3.02define game <>
asl-version <300>
start <outside gate>
game info <Created with QDK 3.02>
command <open #object#> if action <#object#; open> then doaction <#object#; open> else msg <You can't do that.>
command <close #object#> if action <#object#; close> then doaction <#object#; close> else msg <You can't do that.>
command <look #lookthing#> if ( #lookthing# = ) then exec <look; normal> else if ( $instr(#lookthing# 1 ) then exec <look #lookthing#; normal> else exec <look at #lookthing#; normal>
command <talk #talkthing#> if ( $instr(#talkthing# 1 ) then exec <speak #talkthing#; normal> else exec <speak to #talkthing#; normal>
command <speak #talkthing#> if ( $instr(#talkthing# 1 ) then exec <speak #talkthing#; normal> else exec <speak to #talkthing#; normal>
command <go #gothing#> if ( $instr(#gothing# 1 ) then exec <go #gothing#; normal> else exec <go to #gothing#; normal>
end define
define type <openable>
closed
lookcloseddesc = null
lookopendesc = null
closedesc = null
opendesc = null
action <open> {
set string <lookedat; $thisobject$>
if property <$thisobject$; closed> then {
if ( $objectproperty(#lookedat# null ) then property <$thisobject$ ;opendesc =You open the #lookedat#.>
else {
property <$thisobject$ ;opendesc = $objectproperty(#lookedat#; opendesc)$>
}
property <$thisobject$; not closed>
msg <$objectproperty(#lookedat#; opendesc)$>
}
else msg <The #object# is already open.>
}
action <close> {
set string <lookedat; $thisobject$>
if not property <$thisobject$;closed> then {
if ( $objectproperty(#lookedat# null ) then property <$thisobject$ ;closedesc =You close the #lookedat#.>
else {
property <$thisobject$ ;closedesc = $objectproperty(#lookedat#; closedesc)$>
}
property <$thisobject$; closed>
msg <$objectproperty(#lookedat#; closedesc)$>
}
else msg <The #object# is already closed.>
}
action <look> {
set string <lookedat; $thisobject$>
if property <$thisobject$; closed> then if ( $objectproperty(#lookedat# null ) then set string <lookmessage ;The #lookedat# is closed>
else {
set string <lookmessage ;$objectproperty(#lookedat#; lookcloseddesc)$>
}
else {
if ( $objectproperty(#lookedat# null ) then set string <lookmessage ;The #lookedat# is open>
else {
set string <lookmessage ;$objectproperty(#lookedat#; lookopendesc)$>
}
}
msg <#lookmessage#.>
}
end define
define synonyms
end define
define room <outside gate>
description msg <You are standing outside the gate of the gloomy castle of the evil wizard Moldrok.>
define object <gate>
type <openable>
properties <lookcloseddesc = This ancient gate is made of sturdy iron bars, which over the years have become covered in rust and entangling vines. Beyond the gate you can see the castle courtyard; lookopendesc = The ancient, rusty gate lies open, beckoning you into the castle courtyard; opendesc = With an eerie creak, the ancient gate slowly opens.; closedesc = The ancient gate slowly closes.>
end define
indescription <You are standing>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define