Tr0n wrote:
I'm not in the right mind for creating a demo right now, but I was certain that I was getting the exact reverse - seeing objects even if they were in a container.
command <loot #@person> {
if here <#person#> and property <#person#; person; lootable> then {
flag off <stolen>
for each object in <#person#.room> {
if property <#quest.thing#; takable> then move <#quest.thing#; inventory>
}
}
}Also for containers:command <take #@object# from #@container#> {
if here <#container#> and property <#container#; container> then {
for each object in <#container#.room>
if property <#quest.thing#; takable> then move <#quest.thing#; inventory>
}
}
}Now for putting some stuff into it:command <put #@object# in #@container#> {
if here <#container#> and property <#container#; container> and got <#object#> then {
move <#object#; #container#.room>
}
}You prolly want to open the compound 'if's out so you have have neat little else msg's incase you can't do it.There's an in-built container action called "add" which should make this easier.. Means for ANY command which would put an object into an object, then that script would be called.command <put #@object# in #@container#> {
I didn't know containers had rooms? .. or are you taking this from an example of having containers as rooms?for each object in <#container#.room>
"if ( #object:parent# = #container# ) then {