/*************************************************************************** * 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 * ***************************************************************************/ /*************************************************************************** * This file is for clan related commands. Included here is: * * The JOIN command. * * The immortal CLEADER command. * * The clan leader ACCEPT command. * * The clan leader LONER command. * * Clans can be found in the clan table in tables.c * * -Blizzard (blizzard_imp@hotmail.com) * ***************************************************************************/ #if defined(macintosh) #include #include #else #include #include #endif #include #include #include #include "merc.h" #include "recycle.h" #include "lookup.h" #include "tables.h" void do_cleader( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; CHAR_DATA *victim; one_argument( argument, arg ); if ( arg[0] == '\0' ) { send_to_char( "Syntax: CLEADER ", ch ); return; } if ( ( victim = get_char_world( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( get_trust( victim ) >= get_trust( ch ) ) { send_to_char( "You failed.\n\r", ch ); return; } if ( IS_SET(victim->act, PLR_LEADER) ) { REMOVE_BIT(victim->act, PLR_LEADER); send_to_char( "The gods have revoked your leadership priviliges.\n\r", victim ); send_to_char( "Leadership removed.\n\r", ch ); sprintf(buf,"$N takes leadership away from %s",victim->name); } else { SET_BIT(victim->act, PLR_LEADER); send_to_char( "The gods have made you a clan leader.\n\r", victim ); send_to_char( "Leadership set.\n\r", ch ); sprintf(buf,"$N make %s a clan leader.",victim->name); } return; } void do_join( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; int clan; one_argument( argument, arg ); one_argument( argument, arg1 ); one_argument( argument, arg2 ); if ( arg[0] == '\0' ) { send_to_char( "What clan do you wish to join?\n\r", ch ); return; } if ( !str_cmp( arg1, "none" ) ) { send_to_char("You do not wish to join a clan.\n\r", ch); ch->petition = 0; return; } if ((clan = clan_lookup(arg2)) == 0) { send_to_char("There is no clan by that name.\n\r", ch); return; } send_to_char("Ok.", ch); ch->petition = clan; return; } void do_accept( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; one_argument( argument, arg ); if ( arg[0] == '\0' ) { send_to_char( "Accept who?\n\r", ch ); return; } if (!IS_SET(ch->act, PLR_LEADER)) { send_to_char("You are not a clan leader.\n\r", ch); return; } else if ((victim = get_char_world(ch, arg)) == NULL) { send_to_char("They are not playing.\n\r", ch); return; } if (victim->petition != ch->clan) { send_to_char("They do not wish to join your clan.\n\r", ch); return; } victim->clan = ch->clan; victim->petition = 0; send_to_char("You have accepted them into your clan.\n\r", ch); send_to_char("Your clan application was successfull.\n\r", victim); return; } void do_loner( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; one_argument( argument, arg ); if ( arg[0] == '\0' ) { send_to_char( "Loner who?\n\r", ch ); return; } else if (!IS_SET(ch->act, PLR_LEADER)) { send_to_char("You are not a clan leader.\n\r", ch); return; } if ((victim = get_char_world(ch, arg)) == NULL) { send_to_char("They are not playing.\n\r", ch); return; } if (victim->clan == 0) { send_to_char("They're not in a clan in the first place.\n\r", ch); return; } if (victim->clan != ch->clan) { send_to_char("They're not in your clan.\n\r", ch); return; } victim->clan = 1; victim->petition = 0; send_to_char("You have removed them from your clan.\n\r", ch); send_to_char("You have been removed from your clan.\n\r", victim); return; }