Axe Software Forums
  Quest Developer Forum
  The illusive "take all" command....


Author Topic:   The illusive "take all" command....
Computer Whizz posted 03-08-2001 11:07 GMT     
Hey all!
I've really just got a simple question to Al, about how he did his take all command which didn't need any prior settings (by us...).

Ok, so do you use a repeat until, or for command so that it increments a numeric, which is used with that $quest.object()$ or something?
What I BASICALLY mean (because frankly I confused myself back there!) is that.....
There is a command which will find the letters in-between two numbers of a sentance/string.
If you set the first to 1, and the second to an incrementing numeric then you can set it to "seek" out the first object in the room.
Say I had an object "book" here. It would come out with:
repeat until (no objects in room!)
set <object; $somecommand(1;n)$
give <#object#>
set <n; %n% + 1>
repeat..

now I'm sure there's something that returns 0, or ! if there isn't an object in the current room..... and if you use this then you can take all the objects in the room.... of course you will have to stop output first (otherwise you'd get "bo isn't here!", "boo isn't here!", "You take the book!", "c isn't here!" "cu isn't here!" ect....).

so did you do it this way? if you didn't how did you do it?

--CW

Computer Whizz posted 03-08-2001 12:04 GMT          
hey, I was just lookin through the pdf and I saw that you could use for each object {room} script...

so I guess that sorts everything out!

--CW