NEWBIE CODE: * Rolling Stats *

From: Corey Hoitsma (choitsma@netcom.com)
Date: 05/20/96


	HI all:)

	First off, I just wanna say thanks to everyone that has helped me
	on my past problems:) THANKS!

	Now I have another:

	I have this function in interpreter.c:

  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);
      return;
    } else
      GET_CLASS(d->character) = load_result;
{
STATE(d) = CON_QROLL;
}
// *
  case CON_QROLL:
                switch (*arg) {
                case 'y':
                case 'Y':
                break;
                default:
roll_real_abils(d->character);
sprintf(buf, "Dice Rolls: STR: [%d] INT: [%d] WIS: [%d] DEX: [%d] CON: [%d] CHA
        GET_STR(d->character),
        GET_INT(d->character),
        GET_WIS(d->character),
        GET_DEX(d->character),
        GET_CON(d->character),
        GET_CHA(d->character));
send_to_char(buf, d->character);
send_to_char("Are these stats good enough for you [Y/N]? ", d->character);
        return;
        break; }
 // *
 
    if (GET_PFILEPOS(d->character) < 0)
      GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));


I'm looking at the code inbetween the // *'s.. 
Anyways, this rolls a new characters stats after they have selected
their class. But, after someone selectes the stats they want with a y,
it changes them.. somehow it rerolls them..

I also found a line in class.c that rolls a newplayers stats
in do_start. But when I remove it, it makes the persons stats all 25.

Any idea what the easyest/most profecient way to fix this is?


Thanks!

Corey Hoitsma                   AKA -= Myrddin =-
             choitsma@netcom.com
Tazmania			tazmania.ah.net 7000



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