we on lord use vaporize which sets a person to have the delete flah on and disconnects them, (and revaping removes that flag), and if later they recreate they can, otherwise the mud will remove them from the pfile at some time (automaintenced) ***** Mailer Code ******** ACMD(do_vaporize) { struct char_data *vict, *cbuf; struct descriptor_data *pt; struct char_file_u tmp_store; char name[MAX_INPUT_LENGTH]; char arg1[MAX_STRING_LENGTH], arg2[MAX_STRING_LENGTH]; int player_i; two_arguments(argument, arg1, arg2); if (!*arg1 || !*arg2) { sprintf(buf, "&ySyntax: vaporize <player> yes&n\r\n"); sprintf(buf + strlen(buf), "&yVaporizes a player completely, and removes him/her from pfile.&n\r\n"); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); return; } if (strcmp(arg2, "yes")) { sprintf(buf, "&yYou must confirm your vaporization with a yes.&n\r\n"); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); return; } strcpy(name, arg1); /* Check if character is on-line now */ if ((vict = get_player_vis(ch, name, 0))) { if (PLR_FLAGGED(vict, PLR_DELETED)) { sprintf(buf,"&mMythran&M begins to utter a magical &cincantation&n.\r\n&gJay&G sits in the corner and eats a &ytaco&n.\r\n&BNovalee&C sighs and mutters something about &Dspam&n.\r\n&RDust &rstands up and &DA&RN&rN&RH&rI&RL&rA&RT&rE&DS &rthe &Wsoul&r of &m%s&n. &GGoodbye&n.\r\n", GET_NAME(vict)); proc_color(buf, C_CMP, NULL); for (pt = descriptor_list; pt; pt = pt->next) if (STATE(pt) == CON_PLAYING && pt->character) { send_to_char(buf, pt->character); } sprintf(buf, "(GC) %s has vaporized %s.", GET_NAME(ch), GET_NAME(vict)); mudlog(buf, BRF, GET_LEVEL(ch) + 1, TRUE); sprintf(buf, "&y$n has vaporized you!&n\r\n"); proc_color(buf, C_CMP, NULL); act(buf, FALSE, ch, 0, vict, TO_VICT); } else { sprintf(buf, "&y$n has un-vaporized you!&n\r\n"); proc_color(buf, C_CMP, NULL); act(buf, FALSE, ch, 0, vict, TO_VICT); } if (vict->desc) { STATE(vict->desc) = CON_CLOSE; vict->desc->character = NULL; vict->desc = NULL; } extract_char(vict); } /* Check if character is in player_file */ CREATE(cbuf, struct char_data, 1); clear_char(cbuf); if ((player_i = load_char(name, &tmp_store)) > -1) { store_to_char(&tmp_store, cbuf); if (GET_LEVEL(cbuf) >= GET_LEVEL(ch)) { free_char(cbuf); sprintf(buf, "&yAre you crazy?&n\r\n"); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); return; } vict = cbuf; } else { free(cbuf); sprintf(buf, "&yThere is no such player.&n\r\n"); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); return; } if (!PLR_FLAGGED(vict, PLR_DELETED)) { SET_BIT(PLR_FLAGS(vict), PLR_DELETED); sprintf(buf, "&y%s has been vaporized.\r\n", GET_NAME(vict)); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); sprintf(buf,"&mMythran&M begins to utter a magical &cincantation&n.\r\n&gJay&G sits in the corner and eats a &ytaco&n.\r\n&BNovalee&C sighs and mutters something about &Dspam&n.\r\n&RDust &rstands up and &DA&RN&rN&RH&rI&RL&rA&RT&rE&DS &rthe &Wsoul&r of &m%s&n. &GGoodbye&n.\r\n", GET_NAME(vict)); for (pt = descriptor_list; pt; pt = pt->next) if (STATE(pt) == CON_PLAYING && pt->character) { send_to_char(buf, pt->character); } sprintf(buf, "(GC) %s has vaporized %s.", GET_NAME(ch), GET_NAME(vict)); mudlog(buf, BRF, GET_LEVEL(ch) + 1, TRUE); } else { REMOVE_BIT(PLR_FLAGS(vict), PLR_DELETED); sprintf(buf, "&y%s has been un-vaporized.&n\r\n", GET_NAME(vict)); proc_color(buf, C_CMP, NULL); send_to_char(buf, ch); } char_to_store(vict, &tmp_store); fseek(player_fl, (player_i) * sizeof(struct char_file_u), SEEK_SET); fwrite(&tmp_store, sizeof(struct char_file_u), 1, player_fl); free_char(cbuf); } *** End Code*** Um, just fix it up to suit you, copy/paste kinda killed the code a bit, its simple though of course.. -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/03/01 PST