Wow CW, that's one of the most detailed answers I've seen on here! Cool! Anyway, I was thinking, I don't know if Christopher wants to create a custom command to move all the objects, or JUST a procedure, but if he was talking about a custom command, I thought what if there's an object that isn't able to be taken, or something like that. Then, if you say 'for each object in the room,' it will disregard if it's 'takeable' or not.
Also, what if you want to drop all items, but there are certain ones that have the 'can't be dropped' ticked? Now, there might be a different way to solve these problems, but I came up with a solution using good old properties. I'll post the code in case you can use it, christopher.
Also, judging from your post, it sounds like you are new to this, so here's how you make the code I post into a working "game." Just copy the whole code, and paste it into a word program, like notepad. Then, save it as .asl, and just click on it to run it. Simple! Hope this helps!
(In the demo, I made a few objects....1 can't be picked up, and one can't be dropped...to test it out, just type in 'take all,' and 'drop all.')
' "Test Inventory Check/quest.thing"
' Created with QDK 3.53 - UNREGISTERED VERSION
define game <Test Inventory Check/quest.thing>
asl-version <350>
gametype singleplayer
start <Start Room>
game author <>
game version <1.0>
game copyright <© Artistic Productions 2005>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
background <black>
foreground <green>
startscript {
msg <|jc|n|n|n|n>
exec <about>
msg <|b|cr>
wait <Hit a key to try out this demo...>
msg <|c|n|n|n|n|n|cb|s23Try typing in |cy"Take all,"|cb and |cy"Drop all."|cb|s00|n>
wait <|bHit any key to start...|xb>
msg <|cb|c|xb>
background <white>
foreground <black>
}
description {
msg <You are in |cr#quest.formatroom#|cb.|n|n#quest.lookdesc#|n>
do <Print Directions>
}
command <drop all> for each object in <inventory> if property <#quest.thing#; un drop> then {
msg <|jlYou try to drop the |b|i#quest.thing#|i|xb but fail, because:|b|cl |n|jc>
exec <drop #quest.thing#>
msg <|cb|xb>
}
else {
lose <#quest.thing#>
msg <|jl|b|i*-*#quest.thing#|xb|xi dropped.|n|jc>
}
command <take all> for each object in <#quest.currentroom#> if property <#quest.thing#; un take> then msg <|jlYou can't take the |b|i#quest.thing#.|xb|xi|n|jc> else {
if exists <#quest.thing#> then {
give <#quest.thing#>
msg <|jl|b|i*-*#quest.thing#|xb|xi taken.|n|jc>
}
}
end define
define synonyms
end define
define room <Start Room>
prefix <|cbthe|cr>
look <This is the room that you start off in.>
north <second room>
properties <dir>
define object <Ball>
alt <toy>
look <A ball.>
take
examine <It's red.>
prefix <a>
detail <The ball>
article <it>
gender <it>
end define
define object <Toy truck>
alt <truck; toy>
look <A toy truck.>
take
examine <It's a Tonka truck.>
prefix <a>
detail <The truck>
article <it>
gender <it>
end define
define object <Apple>
look <An apple.>
take
examine <It's a green one.>
prefix <an>
article <it>
gender <it>
drop nowhere <You may want to hang on to the apple in case you get hungry later.>
properties <un drop>
end define
define object <Statue>
look <It's a statue.>
examine <It's in the shape of a hero.>
prefix <a heavy>
article <it>
gender <it>
properties <un take>
end define
end define
define room <second room>
prefix <|cra|cr>
look <This is the second room.>
south <Start Room>
properties <dir>
end define
define procedure <Print Directions>
if property <#quest.currentroom#; dir> then msg <You can go: |cl#quest.doorways.dirs#|cb|n>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define