' "King's Quest V - text adventure"
' Created with QDK 3.52 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <King's Quest V - text adventure>
asl-version <350>
gametype singleplayer
start <small cottage>
game author <Steve Lingle>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
startscript do <start>
afterturn doaction <Cedric; following>
command <look at path> msg <The path is sturdy enough to walk on.>
command <look path> msg <The path is sturdy enough to walk on.>
command <x path> msg <The path is sturdy enough to walk on.>
command <examine path> msg <The path is sturdy enough to walk on.>
define variable <Score>
type numeric
value <0>
display <Score: ! of 230>
end define
end define
define synonyms
take = get
end define
define room <small cottage>
prefix <the>
look <A small cottage sits off of the main path that runs parallel to the stream. The cottage is made of stone and a small stone chimney reaches to the trees. It seems someone is here as you can see licks of smoke creeping from the chimney. An aging oak tree completes the picture that reaches its limbs across the length of the house out in front. On the front of the cottage is a small sign.|nTo the east is the entrance to the small town. To the north is a clearing in the forest. To the west is a small country inn.>
indescription <You are in front of>
north <clearing>
east <town entrance>
west <small country inn>
place <the; small cottage - inside>
command <read sign> msg <The sign says "Freshly Baked Pies">
define object <sign>
look <A small sign is nailed to the front of the cottage next to the door.>
examine <The sign says "Freshly Baked Pies">
prefix <the>
article <it>
end define
end define
define room <small country inn>
prefix <the>
look <The main path continues on east and west in front of a small country inn. In the back, you see a small barn with a large haystack sitting in front of it. A worn path winds its way north between the barn and the inn.|nTo the east is a small cottage. To the west is a more barren area with an old rotting tree. To the north you can make out a small house built into the bottom of a tree.>
indescription <You are in front of>
north <tree house>
east <small cottage>
west <old rotting tree>
place <the; small country inn - inside>
define object <barn>
look <A small barn sits towards the back of the land on which the inn is located.>
examine <There's nothing much interesting about this barn. The doors are locked.>
prefix <the>
article <it>
end define
end define
define room <inven room>
define object <crispin's wand>
alt <wand>
look <Crispin's wand seems dormant at the moment and does not seem to possess any magical power.>
speak <Talking to the wand will do nothing.>
article <it>
gender <it>
use msg <You wave the wand but only a couple sparkles fizzle out from the wand and nothing happens.>
use on anything msg <You wave the wand but only a couple sparkles fizzle out from the wand and nothing happens.>
drop nowhere <>
end define
define object <Cedric>
alt <owl; bird>
look <Cedric minds his own business as you explore your surroundings.>
take msg <Cedric would not appreciate you trying to pick him up.>
prefix < >
type <TLTactor>
properties <displaytype=owl>
action <following> if flag <cedric_following> and ( $locationof(Cedric)$ <> #quest.currentroom# ) then move <Cedric; #quest.currentroom#>
action <speak> do <cedric>
end define
define object <silver coin>
alt <coin>
look <A small silver coin.>
take {
msg <Graham picks up the silver coin.>
inc <Score; 1>
}
prefix <the>
article <it>
gender <it>
drop nowhere <The silver coin can be used elsewhere.>
end define
end define
define room <small country inn - inside>
prefix <the>
look <The inn is rather empty aside from the rough looking clerk behind the counter. He is having a conversation with two other roughly dressed men. They are just out of earshot so you can't hear what they are saying.>
out <out; small country inn>
end define
define room <small cottage - inside>
prefix <the>
look <Inside the small cottage, you can see a variety of baked goods. The smell of fresh bread hits your nose as soon as you walk in. On the front counter, a freshly baked custard pie sits tempting you.|nA baker in the back room can be heard clanging dishes and scurrying back and forth cooking the next batch of bread. The head baker is behind the counter near the custard pies.>
out <the; small cottage>
define object <bread>
look <The freshly baked bread fills the bakery with a pleasant aroma.>
prefix <the>
article <them>
gender <they>
invisible
type <TLTscenery>
end define
define object <custard pie>
look <This freshly baked pie looks and smells delicious.>
take {
msg <Graham requests the custard pie from the baker.|n|n|cr"I'd like to buy that custard pie, good man."|cb|n|n|cl"Of course, that will be one silver coin."|cb|n|n>
wait <press any key>
if got <silver coin> then {
msg <Graham hands the baker his silver coin.|n|n|cl"Very good. Now enjoy your pie."|cb|n|n>
give <custard pie>
lose <silver coin>
move <silver coin; inven room>
wait <press any key>
}
}
prefix <the>
article <it>
gender <it>
end define
define object <counter>
look <The counter has an array of freshly baked custard pies.>
prefix <the>
gender <it>
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end defineAlex wrote:Looking at the string variables debug window, quest.command shows that "inside" is being converted to "into". This is a synonym set up in TypeLib.qlb. Since there's no room "small cottage - into" you get an error.
I suppose one work around for this is to hard-code the command "go to small cottage - into" but it's rather messy.
!library
!asl-version <311>
!name <Override Type Library>
!version <1.00 24-Nov-2004>
!author <MaDbRiT (Al Bampton)>
!addto synonyms
inn - into = inn - inside
cottage - into = cottage - inside
!end