Attribute Command [by Nashak]
Snippet Posted Wednesday, August 12th @ 11:23:53 PM, by George Greer in the Commands dept.
Added Dec 3, 1996. Click the link below to read it or download it.

From: Brian Williams <bmw@efn.org>
Subject: Attributes Command

ACMD(do_attributes)
{
  sprintf(buf, "                 Character attributes for %s\r\n", GET_NAME(ch)
);
  sprintf(buf, "%s\r\nLevel: %d   Race: %s   Class: %s\r\n", buf, GET_LEVEL(ch)
,
               RACE_ABBR(ch), CLASS_ABBR(ch));
  sprintf(buf, "%sAge: %d yrs / %d mths  Height: %d inches  Weight: %d lbs\r\n"
, buf,
               age(ch).year, age(ch).month, GET_HEIGHT(ch), GET_WEIGHT(ch));
  if ((GET_CLASS(ch) == CLASS_WARRIOR || GET_CLASS(ch) == CLASS_RANGER || GET_C
LASS(ch) == CLASS_BERSERKER) && GET_STR(ch) == 18)
    sprintf(buf, "%sStr: %d/%3d   Int: %d       Wis: %d\r\nDex: %d       Con: %
d       Cha: %d\r\n", buf,
                 GET_STR(ch), GET_ADD(ch), GET_INT(ch), GET_WIS(ch),
                 GET_DEX(ch), GET_CON(ch), GET_CHA(ch));
  else
    sprintf(buf, "%sStr: %d       Int: %d       Wis: %d\r\nDex: %d       Con: %
d       Cha: %d\r\n", buf,
                 GET_STR(ch), GET_INT(ch), GET_WIS(ch), GET_DEX(ch),
                 GET_CON(ch), GET_CHA(ch));
  sprintf(buf, "%sArmor Class: %d\r\n", buf, GET_AC(ch));
  sprintf(buf, "%sHitroll: %d   Damroll: %d\r\n", buf, (ch)->points.hitroll,
               (ch)->points.damroll);
  sprintf(buf, "%sAlignment: %d\r\n", buf, GET_ALIGNMENT(ch));
  sprintf(buf, "%sSaving Throws: PAR[%d]  ROD[%d]  PET[%d]  BRE[%d] SPE[%d]\r\n
", buf,
               GET_SAVE(ch, 0), GET_SAVE(ch, 1), GET_SAVE(ch, 2), GET_SAVE(ch,
3),
               GET_SAVE(ch, 4));
  send_to_char(buf, ch);
}


<< Argument Splitter [by James Turner] | Reply | View as text | Threaded | Assassin mobs [by Doppleganger Software] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.