' "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 <Crispin's house -out front>
game author <Steve Lingle>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
startscript move <cloak; Tailor's Shop>
define variable <Score>
type numeric
value <0>
display <Score: ! of 230>
end define
end define
define synonyms
take = get
end define
define room <Crispin's house -out front>
look <To the south you can almost make out a small town. To the west is a dark path that winds into the forest beyond.>
indescription <You are at>
south <town>
end define
define room <town>
prefix <the>
look <As you walk on the cobblestone street, townspeople walk up and down minding their own business and walking in and out of the town's quaint little shops.>
north <Crispin's house -out front>
place <the; Tailor's Shop>
end define
define room <Tailor's Shop>
prefix <the>
look <Inside the shop, you first notice the sales clerk behind the counter measuring pieces of fabric. There's a nice cloak on display near the front.>
out <the; town>
script {
msg <The sales clerk notices you,>
say <|clHello there, how fare you today?|cb>
}
description msg <#quest.lookdesc#>
define object <sales clerk>
alt <clerk>
look <The sales clerk stands behind the counter measuring fabric and looks up when Graham enters the shop.>
speak {
if flag <tailor1> then do <tailor>
else {
msg <Graham approaches the tailor,>
wait <press any key>
say <|crGood day, I am wondering about this cloak you have on display. How much does it cost?|cb>
wait <press any key>
say <|clAh yes, an excellent cloak. Very warm for cold weather. I would take one gold piece for such a garment.|cb>
wait <press any key>
say <|crThank you, sir. I will come back when I have a gold piece.|cb>
flag on <tailor1>
}
}
prefix <the>
gender <he>
give <golden needle> do <tailor>
type <TLTactor>
properties <displaytype=sales clerk>
action <speak> if flag <tailor1> then do <tailor>
else {
msg <Graham approaches the tailor,>
wait <press any key>
say <|crGood day, I am wondering about this cloak you have on display. How much does it cost?|cb>
wait <press any key>
say <|clAh yes, an excellent cloak. Very warm for cold weather. I would take one gold piece for such a garment.|cb>
wait <press any key>
say <|crThank you, sir. I will come back when I have a gold piece.|cb>
flag on <tailor1>
}
end define
end define
define room <inven room>
define object <cloak>
look <A high-quality blue cloak is on display near the front of the Tailor's shop.>
examine <This blue cloak looks like it would keep its owner very warm in a cold place.>
prefix <a>
article <it>
gender <it>
drop nowhere <There's no need to drop the cloak.>
properties <wearmessage=Graham puts on the blue cloak.; unwearmessage=Graham takes off the cloak.; sex=male>
end define
end define
define procedure <tailor>
msg <Graham approaches the sales clerk.>
wait <press any key>
say <|crGood day, sir. I don't have any money but can I have that cloak anyway?|cb>
wait <press any key>
msg <|cl"I'm feeling generous today. Sure!"|cb>
wait <press any key>
msg <The sales clerk walks to the blue cloak on display and hands it to you. |cl"I hope this bides you well on your quest."|cb>
wait <press any key>
msg <|crThank you, sir. I'm sure it will indeed.|cb>
give <cloak>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
The player is (by default) given the property ‘sex=1’ as are all the clothing items. If you set ‘sex=2’ for the player, attempting to put on an article of clothing that has property sex=1 will result in a message to the effect that the clothes won’t suit a woman like you. The reverse is also true, setting player sex=1 and an article of clothing to sex=2 will produce “won’t suit a man like you.†If the player sex property is equal to the individual clothing’s sex property, the library makes no restrictions, so although sex=1 is nominally male if you want a female player character and only provide suitable female clothes, you need not bother to alter the sex properties at all.
' Quest 3.5 ASL Template
!include <Typelib.qlb>
define game <Game Name>
asl-version <350>
gametype singleplayer
game version <0.1a>
game author <MaDbRiT>
game copyright <© 2004 ...>
game info <This is a daemon demo.>
start <Start>
startscript set numeric <freeze;3>
end define
define room <Start>
look <Description Goes Here>
prefix <the>
south <freezer>
define object <cloak>
look <very thick with a thermal lining.>
type <TLTobject>
type <TLTcoat>
end define
end define
define room <freezer>
look <It's icy - nothing else to see.
north <Start>
prefix <the>
script {
if not property <cloak;worn> then {
msg <It is FREEZING in here!>
dec <freeze>
}
}
afterturn {
if not property <cloak;worn> then {
msg <It is FREEZING in here!>
dec <freeze>
}
if (%freeze%<1) then {
msg <You've frozen to death!>
playerlose
}
}
end define
define text <intro>
Enter intro text here
end define
define text <win>
Enter win text here
end define
define text <lose>
Enter lose text here
end defineRun-time error ‘-2147417848 (80010108)’:
Automation error
define object <amulet>
look <This amulet is a gold necklace with a jewel fitting that hangs at the base. Its purpose is to deflect certain magic spells but it is only effective if worn.>
take
prefix <the>
article <it>
gender <it>
type <TLTvest>
action <wear> {
exec <wear amulet>
flag on <amulet>
msg <Graham puts on the amulet and the jewel begins to glow so he tucks it away in his tunic.>
}
end define
define object <amulet>
look <This amulet is a gold necklace with a jewel fitting that hangs at the base. Its purpose is to deflect certain magic spells but it is only effective if worn.>
take
prefix <the>
article <it>
gender <it>
type <TLTobject>
type <TLTvest>
properties <wearmessage =Graham puts on the amulet and the jewel begins to glow so he tucks it away in his tunic.>
end define