There's a lot more to it than that, but it's a nice start, except for the mixture of QBASIC and C that you have in there, hehe. Check the archives, there's a couple in there. Rick -----Original Message----- From: Invincibill <bill@longboys.net> To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca> Date: Sunday, February 14, 1999 10:04 AM Subject: Re: [CODE][NEWBIE]A command for setting names. >this is right off the top of my head..so it will need checked > >in do_set, add your name info to the array..we'll say its the 51st >element >also define a char new_name[MAX_NAME_LENGTH] variable.. >case '50' : > if (_parse_name(val_arg, new_name) || !valid_name(new_name) || > reserved_word(new_name) || fill_word(new_name) || > strlen(new_name) < 2 || strlen(new_name) > MAX_NAME_LENGTH-1) { > send_to_charf(ch, "Sorry, %s is not a valid name. Try again.\n\r", >new_name); > break; > } > > for(value = 1 to top_of_p_table) { > if(!str_cmp(player_table[value].name, GET_NAME(vict)) { > send_to_charf(ch, "Okay, %s has been renamed to %s.\n\r", > GET_NAME(vict), new_name); > strcpy(player_table[value].name, new_name); > strcpy(GET_NAME(vict), new_name); > break; > } > } > //dont think we'll EVER get here, but just in case. > send_to_charf(ch, "UH OH. Couldn't find %s in the player table. >Contact the coding team.\n\r", > GET_NAME(vict)); > break; > >anthony benjamin wrote: >> >> I was wondering if anyone could help me write..or maybe has already >> written a command similar to .. >> >> set (player) name blahblah >> set file (player) name blahblah >> >> something along those lines to set player's names...and if it is >> possible....thanks. +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST