Re: Distribute Command` 10:18:08 PDT"

From: James Turner (turnerjh@XTN.NET)
Date: 06/30/98


The Mighty Mighty Bosstone <skaking@HOTMAIL.COM> writes:

> 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
> 99999)
>
> I doubt any coder can code this but.. hey its worth a try.

Fifteen or twenty lines of code, depending on if you pretty it up or
not.

Oh... you don't actually expect us to WRITE it for you, do you? ;)

A few hints: count the number of real rooms between in the given
range.  Then generate random numbers between zero and the number of
real rooms you found.  Then obj_from_char the first object in the
char's invnetory, then obj_to_room(obj, world[base_room +
random_number]).  Should do what you want with an even distribution
between the rooms.  Maybe add an echo to the room (something dropping
from the sky, perhaps) unless you want it done quietly.

--
James Turner                turnerjh@xtn.net             UIN: 1102038
                            http://www.vuse.vanderbilt.edu/~turnerjh/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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