define room <Beach>
look <You find yourself on a beach. Along the shore are parts of the royal ship torn apart by the angry sea. A small sandy path leads to the north through the tall grass. >
north <Path>
define object <ring>
look <Prince Alexander's royal insignia ring.>
take
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
type <TLTreadable>
properties <readMessage=Royal Family of Daventry>
end define
define object <plank>
look <This large plank seems to be from Alexander's ship. It does not look too heavy.>
take {
msg <You move the plank to the side revealing a small box.>
show <box>
}
speak <It's made of wood and cannot speak.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
end define
define object <box>
look <This small box is made of a dark sturdy wood.>
take {
msg <You can't take the box with you, but you decide to open it. It reveals a small coin.>
show <coin>
}
speak <It's just a box.>
prefix <the>
article <it>
gender <it>
hidden
type <TLTcontainer>
type <TLTcontainer>
type <TLTclosable>
end define
define object <coin>
look <This is a coin straight from Daventry.>
speak <Coins don't talk.>
examine <This is a coin straight from Daventry. There's a small inscription on it.>
type <TLTcontainable>
properties <isIn=box>
end define
end defineAny problems that seem to jump out at the more experienced coders here?
define room <Beach>
alias <beach>
prefix <the>
look <You find yourself on a beach. Along the shore are parts of the royal ship torn apart by the angry sea. A small sandy path leads to the north through the tall grass. >
north <Path>
define object <ring>
look <Prince Alexander's royal insignia ring.>
take {
msg <You take the royal insignia ring.>
give <ring>
inc <Score; 1>
}
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
type <TLTreadable>
properties <readMessage=Royal Family of Daventry>
end define
define object <plank>
look <This large plank seems to be from Alexander's ship. It does not look too heavy.>
take {
msg <You move the plank to the side revealing a small box.>
show <box>
hide <plank>
inc <Score; 1>
}
speak <It's made of wood and cannot speak.>
prefix <the>
article <it>
gender <it>
properties <not takeable; noTake=You move the plank to the side revealing a small box...>
end define
define object <box>
look <This is a small sturdy box.>
take {
msg <You decide to not take the box and simply open it. It reveals a shiny coin inside.>
show <coin>
inc <Score; 1>
hide <box>
}
speak <It's just a box.>
prefix <the>
article <it>
gender <it>
hidden
end define
define object <coin>
look <A coin from Daventry.>
take {
give <coin>
inc <Score; 1>
msg <You take the Daventry coin.>
}
speak <Coins can't talk.>
prefix <the>
article <it>
gender <it>
hidden
end define
end definesteve the gaming guy wrote:I'm still working with the other situation which will be temporarily solved by Al's suggestion of moving the box in from an inventory room when the plank is moved.:
define synonyms
get = take
end define
define room <Beach>
alias <beach>
prefix <the>
look <You find yourself on a beach. Along the shore are parts of the royal ship torn apart by the angry sea. A small sandy path leads to the north through the tall grass. >
north <Path>
define object <ring>
look <Prince Alexander's royal insignia ring.>
take {
msg <You take the royal insignia ring.>
give <ring>
inc <Score; 1>
}
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
end define
define object <plank>
look <This large plank seems to be from Alexander's ship. It does not look too heavy.>
take if not flag <plank moved> then {
msg <You move the plank aside revealing a small box.>
move <box; Beach>
inc <Score; 1>
}
else msg <The plank has already been moved.>
speak <It's made of wood and cannot speak.>
prefix <the>
article <it>
gender <it>
{
flag on <plank moved>
move <box; Beach>
inc <Score; 1>
}
end define
end definedefine room <inventory room>
define object <coin>
look <A coin from Daventry.>
take {
msg <You take the Daventry coin.>
inc <Score; 1>
give <coin>
}
speak <Coins can't talk.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
type <TLTcontainable>
properties <isIn=box>
end define
define object <box>
look <This is a small sturdy box.>
speak <It's just a box.>
prefix <the>
article <it>
gender <it>
type <TLTcontainer>
type <TLTcontainer>
type <TLTclosable>
properties <not takeable; listHeader=Small box; listHeader=Small box; isClosedDesc=This box is closed.; closingDesc=You close the box.; isOpenDesc=This box is open.; openingDesc=You open the box.>
action <opened> if not flag <box opened> then {
inc <Score; 1>
flag on <box opened>
}
end define
end define' "beach"
' Created with QDK Pro 3.52
!include <Typelib.qlb>
define game <beach>
asl-version <350>
gametype singleplayer
start <beach>
game author <Steve - hacked by MaDbRiT>
game info <Created with QDK Pro 3.52>
define variable <Score>
type numeric
value <0>
display <! Points scored>
end define
QuestNet
end define
define synonyms
get=take
end define
define room <Beach>
alias <beach>
prefix <the>
look <You find yourself on a beach. Along the shore are parts of the royal ship torn apart by the angry sea. A small sandy path leads to the north through the tall grass. >
north <Path>
define object <ring>
look <Prince Alexander's royal insignia ring.>
take {
msg <You take the royal insignia ring.>
give <ring>
inc <Score; 1>
}
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
end define
define object <plank>
look <This large plank seems to be from Alexander's ship. It does not look too heavy.>
speak <It's made of wood and cannot speak.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
action <take> {
if not flag <plank moved> then {
msg <You move the plank aside revealing a small box.>
move <box; Beach>
inc <Score; 1>
flag on <plank moved>
}
else msg <The plank has already been moved.>
}
end define
define object <coin>
look <A coin from Daventry.>
action <take> {
msg <You take the Daventry coin.>
inc <Score; 1>
give <coin>
}
speak <Coins can't talk.>
prefix <a>
article <it>
gender <it>
type <TLTobject>
type <TLTcontainable>
properties <isIn=box>
end define
end define
define room <limbo>
define object <box>
look <This is a small sturdy box.>
speak <It's just a box.>
prefix <the>
article <it>
gender <it>
type <TLTcontainer>
type <TLTclosable>
properties <not takeable; listHeader=The small box contains; isClosedDesc=This box is closed.; closingDesc=You close the box.; isOpenDesc=This box is open.; openingDesc=You open the box.>
action <opened> {
if not flag <box opened> then {
inc <Score; 1>
flag on <box opened>
msg <#(TLSthisObj):openingDesc#>
}
else msg <#(TLSthisObj):openingDesc#>
}
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define' "beach"
' Created with QDK Pro 3.52
!include <Typelib.qlb>
define game <beach>
asl-version <350>
gametype singleplayer
start <beach>
game author <Steve - hacked by MaDbRiT>
game info <Created with QDK Pro 3.52>
define variable <Score>
type numeric
value <0>
display <! Points scored>
end define
QuestNet
end define
define synonyms
get=take
end define
define room <Beach>
alias <beach>
prefix <the>
look <You find yourself on a beach. Along the shore are parts of the royal ship torn apart by the angry sea. A small sandy path leads to the north through the tall grass. >
north <Path>
define object <ring>
look <Prince Alexander's royal insignia ring.>
take {
msg <You take the royal insignia ring.>
give <ring>
inc <Score; 1>
}
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
end define
define object <plank>
look <This large plank seems to be from Alexander's ship. It does not look too heavy.>
speak <It's made of wood and cannot speak.>
prefix <the>
article <it>
gender <it>
type <TLTobject>
action <take> {
if not flag <plank moved> then {
msg <You move the plank aside revealing a small box.>
move <box; Beach>
inc <Score; 1>
flag on <plank moved>
}
else msg <The plank has already been moved.>
}
end define
define object <coin>
look <A coin from Daventry.>
type <TLTobject>
type <TLTcontainable>
action <take> {
msg <You take the Daventry coin.>
inc <Score; 1>
give <coin>
}
speak <Coins can't talk.>
prefix <a>
article <it>
gender <it>
properties <isIn=box>
end define
end define
define room <limbo>
define object <box>
look <This is a small sturdy box.>
speak <It's just a box.>
prefix <the>
article <it>
gender <it>
type <TLTcontainer>
type <TLTclosable>
properties <not takeable; listHeader=The small box contains; isClosedDesc=This box is closed.; closingDesc=You close the box.; isOpenDesc=This box is open.; openingDesc=You open the box.>
action <opened> {
if not flag <box opened> then {
inc <Score; 1>
flag on <box opened>
msg <#(TLSthisObj):openingDesc#>
}
else msg <#(TLSthisObj):openingDesc#>
}
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end defineHave you noticed in other situations where typelib makes quest ignore the take tab? Is there another place to enter a script when a player takes an object?
I assume you mean to create my own special action commands in the room or game properties section. Which I take to mean in this example, I would type "take or move plank" and a script is assigned to the command and not the plank?
I sort of understand where you were going with that suggestion but I just am not certain where in QDK you are suggesting to enter the script.
The code you presented worked like a charm in regards to opening the box and getting the coin. However, I can't take the ring despite what the code says. Just thought I'd mention it. Thanks for the box code though
define object <ring>
look <Prince Alexander's royal insignia ring.>
type <TLTobject>
action <take> {
msg <You take the royal insignia ring.>
give <ring>
inc <Score; 1>
}
speak <This ring cannot speak.>
examine <Prince Alexander's royal insignia ring.>
prefix <the>
article <it>
gender <it>
end define