Re: Distribute Command`

From: Chuck (creed@EXIT1.I-55.COM)
Date: 06/30/98

>I need a command that would take everything in my inv. and teeport it to
>the given room numbers
>ex.  distribute 1 99999
>(that would put everything in my inv in random rooms between room 1 and

>I doubt any coder can code this but.. hey its worth a try.

Make a do_distribute command, and call two_arguments() inside.  Find the
numeric value of the two args using atoi, do all the happy little checks to
make sure this is possible.  Then do something along the lines of

for(obj = ch->carrying; obj; obj = obj->next_carrying) {
/*I dunno if next_carrying is right :) */
   temp = number(atoi(arg1), atoi(arg2));
   if(real_room(temp)) {
      obj_from_char(ch, obj);
      obj_to_room(obj, real_room(temp));

It's quick and I didn't look anything up, but you get the idea.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST