add this to your help files: -1 MARRY MARRIAGE SPOUSE SPOUSETALK DIVORCE~ Ah, the beautiful ceremony that occurs when someone loves another so much that they wish to spend the rest of their lives together. Unfortuneately, it turns sour sometimes. Whether you're wanting to marry, or be divorced, it must be performed by an Immortal. With marriage, comes the ability to communicate exclusively to your spouse via your own private talkline. Marriage code written by Ryouga (ryouga@jessi.indstate.edu). ~ in merc.h: in struct_pcdata add: char spouse; in the PLR flags, add: PLR_CONSENT (##) ## is any available integer. in interp.h: DECLARE_DO_FUN(do_marry ); DECLARE_DO_FUN(do_divorce ); DECLARE_DO_FUN(do_spousetalk ); DECLARE_DO_FUN(do_consent ); in interp.c, among the function definitions: /* * Marriage Functions. */ ( "marry", do_marry, POS_DEAD, IM, LOG_ALWAYS, 1), ( "divorce", do_divorce, POS_DEAD, IM, LOG_ALWAYS, 1), ( "spousetalk", do_spousetalk, POS_SLEEPING 1, LOG_NEVER, 1), ( "consent", do_consent, POS_RESTING, 1, LOG_NORMAL, 1), in save.c: Add under fwrite_char: if(ch->pcdata->spouse > 0) fprintf( "Spou %s~\n", ch->pcdata->spouse); Add under fread_char, under case 'S' KEY( "Spou", ch->pcdata->spouse, fread_string( fp ) ); Cut off everything before the credits, here, and add marry.o to the Makefile. /*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. * * * * Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * * * In order to use any part of this Merc Diku Mud, you must comply with * * both the original Diku license in 'license.doc' as well the Merc * * license in 'license.txt'. In particular, you may not remove either of * * these copyright notices. * * * * Much time and thought has gone into this software and you are * * benefitting. We hope that you share your changes too. What goes * * around, comes around. * ***************************************************************************/ /*************************************************************************** * ROM 2.4 is copyright 1993-1996 Russ Taylor * * ROM has been brought to you by the ROM consortium * * Russ Taylor (rtaylor@efn.org) * * Gabrielle Taylor * * Brian Moore (zump@rom.org) * * By using this code, you have agreed to follow the terms of the * * ROM license, in the file Rom24/doc/rom.license * ***************************************************************************/ /*************************************************************************** * MARRY.C written by Ryouga for Vilaross Mud (baby.indstate.edu 4000)* * Please leave this and all other credit include in this package. * * Email questions/comments to ryouga@jessi.indstate.edu * ***************************************************************************/ #if defined(macintosh) #include #else #include #endif #include #include #include #include "merc.h" void do_marry( CHAR_DATA *ch, char *argument) { char arg1[MAX_INPUT_LENGTH],arg2[MAX_INPUT_LENGTH]; CHAR_DATA *victim; CHAR_DATA *victim2; char buf[MAX_STRING_LENGTH]; argument = one_argument( argument, arg1 ); argument = one_argument( argument, arg2 ); if ((ch->level >= LEVEL_IMMORTAL)) { if ( arg1[0] == '\0' || arg2[0] == '\0' ) { send_to_char( "Syntax: marry \n\r",ch); return; } if ( ( victim = get_char_world( ch, arg1 ) ) == NULL ) { send_to_char( "The first person mentioned isn't playing.\n\r", ch ); return; } if ( ( victim2 = get_char_world( ch, arg2 ) ) == NULL ) { send_to_char( "The second person mentioned isn't playing.\n\r", ch); return; } if ( IS_NPC(victim) || IS_NPC(victim2)) { send_to_char("I don't think they want to be Married to the Mob.\n\r", ch); return; } if (!IS_SET(victim->act, PLR_CONSENT) || !IS_SET(victim2->act, PLR_CONSENT)) { send_to_char( "They do not give consent.\n\r", ch); return; } if (victim->pcdata->spouse > 0 || victim2->pcdata->spouse > 0) { send_to_char( "They are already married! \n\r", ch); return; } if (victim->level < 12 || victim2->level < 12) { send_to_char( "They are not of the proper level to marry.\n\r", ch); return; } send_to_char( "You pronounce them man and wife!\n\r", ch); send_to_char( "You say the big 'I do.'\n\r", victim); send_to_char( "You say the big 'I do.'\n\r", victim2); victim->pcdata->spouse = victim2->name; victim2->pcdata->spouse = victim->name; return; } else { send_to_char( "You do not have marrying power.\n\r", ch); return; } } void do_divorce( CHAR_DATA *ch, char *argument) { char arg1[MAX_INPUT_LENGTH],arg2[MAX_INPUT_LENGTH]; CHAR_DATA *victim; CHAR_DATA *victim2; char buf[MAX_STRING_LENGTH]; argument = one_argument( argument, arg1 ); argument = one_argument( argument, arg2 ); if (ch->level >= LEVEL_IMMORTAL) { if ( arg1[0] == '\0' || arg2[0] == '\0' ) { send_to_char( "Syntax: divorce \n\r",ch); return; } if ( ( victim = get_char_world( ch, arg1 ) ) == NULL ) { send_to_char( "The first person mentioned isn't playing.\n\r", ch ); return; } if ( ( victim2 = get_char_world( ch, arg2 ) ) == NULL ) { send_to_char( "The second person mentioned isn't playing.\n\r", ch); return; } if ( IS_NPC(victim) || IS_NPC(victim2)) { send_to_char("I don't think they're Married to the Mob...\n\r", ch); return; } if (!IS_SET(victim->act, PLR_CONSENT) || !IS_SET(victim2->act, PLR_CONSENT)) { send_to_char( "They do not give consent.\n\r", ch); return; } if (victim->pcdata->spouse != victim2->name) { send_to_char( "They aren't even married!!\n\r",ch); return; } send_to_char( "You hand them their papers.\n\r", ch); send_to_char( "Your divorce is final.\n\r", victim); send_to_char( "Your divorce is final.\n\r", victim2); victim->pcdata->spouse = NULL; victim2->pcdata->spouse = NULL; return; } else { send_to_char( "You do not have divorcing power.\n\r", ch); return; } } void do_consent( CHAR_DATA *ch ) { if (IS_NPC(ch)) return; if ( IS_SET(ch->act, PLR_CONSENT) ) { send_to_char( "You no longer give consent.\n\r", ch); REMOVE_BIT(ch->act, PLR_CONSENT); return; } send_to_char( "You now give consent to Married!\n\r", ch); SET_BIT(ch->act, PLR_CONSENT); return; } void do_spousetalk( CHAR_DATA *ch, char *argument ) { char buf[MAX_STRING_LENGTH]; DESCRIPTOR_DATA *d; if (argument[0] == '\0' ) { send_to_char("What do you wish to tell your other half?\n\r", ch); return; } else /* message sent */ { sprintf( buf, "You say to %s, '%s'\n\r", ch->pcdata->spouse, argument ); send_to_char( buf, ch ); for ( d = descriptor_list; d != NULL; d = d->next ) { CHAR_DATA *victim; victim = d->original ? d->original : d->character; if ( d->connected == CON_PLAYING && d->character != ch && d->character->name == ch->pcdata->spouse) { act_new( "$n says to you, '$t'", ch, argument, d->character, TO_VICT, POS_SLEEPING ); } else { send_to_char("Your spouse is not here.\n\r", ch); return; } } } }