Newbie: Allowing players to reroll stats. <How?>

From: Homer Simpson (
Date: 09/11/96

Hiya all,
         I know this has been covered before but I didn't take any notice
of it then, DOH, and now I cant find the lerrers in my archives. Could
someone give me a quick rundown on how I'd go about adding a new CON_Q to
allow the player to reroll his/her stats until they are happy? :)

I like it to display something like.

Strength:     {how good}     Intelligence:  {how good}
Dexterity:    {how good}     Wisdome:       {how good}
Constitution: {how good}     Charisma:      {how good}

Reroll [y/n"] :

where how good would be "good" "fair" or "poor" depending on what the stat

This would be determined by a function something like this.

char *check_stat (int stat)
  int percent;

  percent = (100 * stat) / 18;

  if (percent > 70)
    return ("good");
  else if (percent > 30)
    return ("fair");
    return ("poor");

thanks in advance


aka Fionn Colvin :)
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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