From: DJ Pure (pure@ozramp.net.au)
Date: 10/14/96

Me again from Down Under.

This time I'm trying to implement a menu for character dice rolls when a
new character is started.
I've looked in interpreter.c at the switch statement for NANNY(). I have
two questions about why this is nnot working properly.
(i) In Between COMMENT APPLE and COMMENT BOB (just comments i've added to
act as tags) the game somehow requires you to throw in an input into arg
[a string] .. whrere and why?.
(ii) With my additions, the chars rolls are set ALL to 25 .. not the
random numbers. Where and Why?

Lets have a look at what i've done.
P.S.  Races work perfectly, so that shouldn't be the problem .....

				*** I T ' S   A   T A D   L O N G ***

 >8 --------------------  <snip> ----------------------- 8<
// This is a test to check the Race and the Set the Race for the New
// Jussy wuzzy - 3/10/96
	load_result = parse_race(*arg);
	if (load_result == RACE_UNDEFINED)
		SEND_TO_Q("\nThat is an Invalid Race ... *sigh*\n", d);
		SEND_TO_Q("Ok .. Now lets try that again ...\n",d);
		GET_RACE(d->character) = load_result;

	// Now lets roll the players abilities.
	// Jus - 12/10/96

case CON_ROLLS :
// This is case statement for controlling the players ability to choose
thier characters ability rolls.
// Remember the external function calls have to be added at the top of the
// Jus - 12/10/96

	printf ("Argument is %d or %s\n", arg, arg);
	//Ok. Lets create a new character.

	// This send the CLASS menu to the PC.
 	 SEND_TO_Q(class_menu, d);
    	SEND_TO_Q("\r\nWhich Class: ", d);

  case CON_QCLASS:
    load_result = parse_class(*arg);
    if (load_result == CLASS_UNDEFINED) {
      SEND_TO_Q("\r\nThat's not a class.\r\nClass: ", d);
    } else {
      GET_CLASS(d->character) = load_result;
	  // Now do the rest of the players info shit ...

	// I think this bit below is creating a new character file.
    if (GET_PFILEPOS(d->character) < 0)
      GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));
    save_char(d->character, NOWHERE);

	// Prints to MOTD.

	etc ... (the rest is the same from the downloaded win95 version of
cirlcemud... untill)

in   case CON_MENU:		/* get selection from main menu  */
      if (!GET_LEVEL(d->character)) {
	//do_start(d->character);	     // <- This was where it originally rolled
the abilities, etc.
	send_to_char(START_MESSG, d->character);

...   is the same to the end of the file.

Now do_start is now cut into two things ... do_start_I  and do_start_II
define at the top of interpreter.c as :-
void do_start(struct char_data *ch);
void do_start_I(struct char_data *ch);
void do_start_II(struct char_data *ch);

But what is do_start I and II .. it is do_start [in class.c] which has
been cut into two :-

/* Some initializations for characters, including initial skills */
void do_start_I(struct char_data * ch)
// This is the first stage of the players character initilisation.
// Jussy - 12/10/96

  GET_LEVEL(ch) = 1;
  GET_EXP(ch) = 1;

  set_title(ch, NULL);		// Titles are now defunct [Jussy changed them]
  roll_real_abils(ch);		// Roll the Die!!!
  ch->points.max_hit = 10;

void do_start_II(struct char_data *ch)
// This is the second stage of the players character initilisation.
// Jussy - 12/10/96
  void advance_level(struct char_data * ch); // This enables the use of
											 // advanace_level function.
  switch (GET_CLASS(ch)) {
  case CLASS_CAVALIER: break;
  case CLASS_FIGHTER: break;

	Etc .. (the code is the same (basically) as the donwloaded one ..)

Phew! That was long .. and clues anyone ???

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

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