A mud I used to play frequently (before my university put up a firewall) had an interesting custom prompt system which I decided to implement. Warning: Saving the prompt will break the pfile! (Unless you write a utility to convert it or use an ascii pfile...) Since my mud (which isn't up yet) is fairly heavily modified, in all probability this code will require some minor changes... I also apologise for the general disorganisation, it's been a long day :) /*----------------------------------------*/ /* In comm.c, replace char *make_prompt(struct descriptor_data *d) with * the following: */ char *make_prompt(struct descriptor_data *d) { static char prompt[MAX_PROMPT_LENGTH + 1]; char *prompt_template; /* Note, prompt is truncated at MAX_PROMPT_LENGTH chars (structs.h )*/ if (d->str) strcpy(prompt, "] "); else if (d->showstr_count) { sprintf(prompt, "\r[ Return to continue, (q)uit, (r)efresh, (b)ack, or page number (%d/%d) ]", d->showstr_page, d->showstr_count); } else if (STATE(d) == CON_PLAYING && !IS_NPC(d->character)) { int count = 0, j = 0; prompt_template = GET_PROMPT(d->character); *prompt = '\0'; if (GET_INVIS_LEV(d->character)) count += sprintf(prompt + count, "i%d ", GET_INVIS_LEV(d->character)); while (prompt_template[j] != '\0') { if (prompt_template[j] == '$') { j++; switch (prompt_template[j]) { case 'h': count += sprintf(prompt + count, "%d", GET_HIT(d->character)); break; case 'H': count += sprintf(prompt + count, "%d", GET_MAX_HIT(d->character)); break; case 'm': count += sprintf(prompt + count, "%d", GET_MANA(d->character)); break; case 'M': count += sprintf(prompt + count, "%d", GET_MAX_MANA(d->character)); break; case 'v': count += sprintf(prompt + count, "%d", GET_MOVE(d->character)); break; case 'V': count += sprintf(prompt + count, "%d", GET_MAX_MOVE(d->character)); break; case 'g': count += sprintf(prompt + count, "%d", GET_GOLD(d->character)); break; case 'e': count += sprintf(prompt + count, "%d", GET_EXP(d->character)); break; case 'r': if (GET_REAL_LEVEL(d->character)character))); } break; case '$': count += sprintf(prompt + count, "$"); break; default: count += sprintf(prompt + count, "$%c", prompt_template[j]); break; } } else count += sprintf(prompt + count, "%c", prompt_template[j]); j++; } strcat(prompt, " "); /* if you want colour, put something like the next line in: */ /* proc_colour(prompt, clr(d->character, C_NRM)); */ } else if (STATE(d) == CON_PLAYING && IS_NPC(d->character)) sprintf(prompt, "%s> ", GET_NAME(d->character)); else *prompt = '\0'; return (prompt); } /* The following should go in act.other.c */ ACMD(do_prompt) /* at the top, in "Local functions" */ ACMD(do_prompt) { if (!argument) { strcpy(GET_PROMPT(ch), ">"); return; } strcpy(GET_PROMPT(ch), delete_doubledollar(argument)); } /* Add to the bottom of player_special_data_saved in structs.h: */ char prompt_string[MAX_PROMPT_LENGTH];/* Custom prompt... */ /* In utils.h */ #define GET_PROMPT(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.prompt_string)) /* And you need to change the interpreter.c */ ACMD(do_prompt) /* in the External commands */ { "prompt" , POS_DEAD , do_prompt , 0, 0 }, /* instead of th old one */ /*----------------------------------------*/ I may have forgotten something, so please mail me if you find errors or omissions. I am also intending to add colours to the hp, mana, and move displays - green for above 50%, yellow for 25%-50% and red for below 25% Hope this is useful to someone! Please give credit to Jeremy Thurgood aka Firxen Shadowblade -Jeremy thurgood@is.und.ac.za