Re: [CODE][NEWBIE]The set name command for the last time

From: Julian Buckley (
Date: 02/15/99

> case 50:
>    if (GET_LEVEL(ch) < GET_LEVEL(vict)) {
>     send_to_char("That isn't such a good idea.",ch);
>     return 0;
>    }
>      vict-> = str_dup(val_arg);
>   strcpy(vict->, val_arg);
>   sprintf(buf, "Your name has been changed to %s by %s.\r\n",
> GET_NAME(vict),GET_NAME(ch));
>      send_to_char(buf, vict);
>   sprintf(buf, "Name changed to %s.\r\n",GET_NAME(vict));
>   send_to_char(buf, ch);
>   save_char(vict, NOWHERE);
>   build_player_index();
>   break;

My code looks like the following, and I also have the
"can-log-in-as-old-name" thing, but after I reboot it fixes it :)  If
anyone knows of the function that updates the binary playerfile so it's
taken the new name, it'd be appreciated.

case 54:
  sprintf(buf, "%s just changed your name from %s to %s!\r\n",
    GET_NAME(ch), GET_NAME(vict), val_arg);
  send_to_char(buf, vict);
  set_name(vict, val_arg);
  save_char(vict, NOWHERE);

 Julian Buckley, 3rd Year Computer Systems Engineering
 Dept. Computer Science and Electrical Engineering, Univ. of Qld
 Web Page:

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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