Re: loading items

Date: 05/28/95

On Sun, 28 May 1995, FourSpace wrote:

> Can someone please tell me how to load an item onto a char at startup?
> I think it should be done in do_start, but i can't figure out the exact
> syntax. thanks!
> Fireball

	I don't remember Circle's little twists and turns, but
	I believe.... :

		int eq[] = {object, vnums, here, end with, -1};
		int x;
 		struct obj_data *obj;

		for(x=0; eq[x] == -1; x++) {
		  obj = real_object(eq[x]);
		  load_object(obj, REAL);
		  obj_to_char(obj, ch);    }

		command_interpreter(ch, "wear all", 0, 0);
		/* just add more calls to command_interpreter()
		 * to make somewhere WEAR ALL, WIELD DAGGER,
		 * QUA YELLOW, whatever you want... in that
		 * method, you can also make them do what I
		 * did...  Earlier ask them if they want color
	 	 * and use a arg to tell it to use the ANSI
		 * opening screen.  Then later on, in do_start,
		 * you can also check it, and force the person
		 * to do a COLOR COMPLETE, haven't really put
		 * much thought into, though.		  */

	That should be it, append this to wherever you initialize
	a new character.  But, isn't do_start also used when you
	set a new character down levels (which is a poor choice in
	my eyes).  Maybe, if you modify do_start to accept a line
	param of sh_int level;, and then use that to pass what level
	you are changing the person to (possably junk all their eq
	if being advanced to level 1).

	(a cross-breed)

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