This code was made by Bojack and Cade. A rewritten code from the original patch submitted by Chris Bunting. We've done a whole rewrite to the code and made it possible for ROM based Muds. -all the plus signs are what you need to add:- act_info.c " ", " ", " ", " ", /* ADD THIS */ }; ***in act_obj.c*** search for sendch ("Your hands are tied up with your weapon!\n\r", ch); return; } + if (get_eq_char (ch, WEAR_SECONDARY) != NULL) + { + sendch ("You cannot use a shield while using 2 weapons.\n\r", ch); + return; + } act( "$n wears $p as a shield.", ch, obj, NULL, TO_ROOM ); act( "You wear $p as a shield.", ch, obj, NULL, TO_CHAR ); search for: { if ( !remove_obj( ch, WEAR_HOLD, fReplace ) ) return; + + if (get_eq_char (ch, WEAR_SECONDARY) != NULL) + { + sendch ("You cannot hold an item while using 2 weapons.\n\r", ch); + return; + } + act ("$n holds $p in $s hand.", ch, obj, NULL, TO_ROOM); act ("You hold $p in your hand.", ch, obj, NULL, TO_CHAR); equip_char( ch, obj, WEAR_HOLD ); at the very bottom after this: act( buf, keeper, obj, ch, TO_VICT ); ch->reply = keeper; return; } add all this: void do_second (CHAR_DATA *ch, char *argument) /* wear object as a secondary weapon */ { OBJ_DATA *obj; // char buf[MAX_STRING_LENGTH]; /* overkill, but what the heck */ if (argument[0] == '\0') /* empty */ { sendch ("Wear which weapon in your off-hand?\n\r", ch); return; } obj = get_obj_carry (ch, argument, ch); /* find the obj withing ch's inventory */ if (obj == NULL) { sendch ("You have no such thing in your bag.\n\r", ch); return; } /* check if the char is using a shield or a held weapon */ if ( (get_eq_char (ch,WEAR_SHIELD) != NULL) || (get_eq_char (ch,WEAR_HOLD) != NULL) ) { sendch ("You cannot use a secondary weapon while using a shield or holding and item\n\r", ch); return; } /* check that the character is using a first weapon at all */ if (get_eq_char (ch, WEAR_WIELD) == NULL) /* oops - != here was a bit wrong ;) */ { sendch ("You need to wield a primary weapon, before using a secondary one!\n\r", ch); return; } /* check for str - secondary weapons have to be lighter */ /* if ( get_obj_weight( obj ) > (str_app[get_curr_stat(ch, STAT_STR)].wield / 2) ) { sendch( "This weapon is too heavy to be used as a secondary weapon by you.\n\r", ch); return; } */ /* check if the secondary weapon is at least half as light as the primary weapon */ if ( (get_obj_weight (obj)*2) > get_obj_weight(get_eq_char(ch, WEAR_WIELD)) ) { sendch ("Your secondary weapon has to be considerably lighter than the primary one.\n\r", ch); return; } /* at last - the char uses the weapon */ if (!remove_obj(ch, WEAR_SECONDARY, TRUE)) /* remove the current weapon if any */ return; /* remove obj tells about any no_remove */ /* char CAN use the item! that didn't take long at all */ act ("$n wields $p in $s off-hand.", ch, obj, NULL, TO_ROOM); act ("You wield $p in your off-hand.", ch, obj, NULL, TO_CHAR); equip_char ( ch, obj, WEAR_SECONDARY); return; } ***in fight.c*** replace any names that look like one_hit and make it mob_hit then follow below: replace this void mob_hit args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dt ) ); with this: void mob_hit args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dt, bool secondary ) ); In void mob_hit, just make sure the /* */ is there cause otherwise it messes up and also add bool secondary at the end like shown: Void mob_hit (CHAR_DATA * ch, CHAR_DATA * victim, int dt, bool secondary) { /* if (IS_SET (ch->off_flags, OFF_AREA_ATTACK)) { for (vch = ch->in_room->people; vch != NULL; vch = vch_next) { vch_next = vch->next; if ((vch != victim && vch->fighting == ch)) mob_hit( ch, victim, dt, FALSE ); if (get_eq_char (ch, WEAR_SECONDARY)) { mob_hit( ch, victim, dt, TRUE ); if ( ch->fighting != victim ) return; } } } */ in void do_attack: scroll down until you come across this and take out all of the code after it: // Can't beat a dead char! // Guard against weird room-leavings. if (victim->position == POS_DEAD || victim->position == POS_UNCONSCIOUS || $ return; after code extraction place after return; and add all below : /* // Figure out the type of damage message. wield = get_eq_char (ch, WEAR_WIELD); if (wield == NULL) { nLowDam = 1; nHighDam = 6; } else { nLowDam = wield->value[1]; nHighDam = wield->value[2]; } dt = TYPE_HIT; if (wield != NULL && wield->item_type == ITEM_WEAPON) dt += wield->value[3]; else dt += ch->dam_type; if (dt < TYPE_HIT) if (wield != NULL) dam_type = attack_table[wield->value[3]].damage; else dam_type = attack_table[ch->dam_type].damage; else dam_type = attack_table[dt - TYPE_HIT].damage; if (dam_type == -1) dam_type = DAM_BASH; */ // Get needed skills sn = get_weapon_sn (ch); skill = get_skill(ch, sn); // Results of the attack: ki_loss(ch, skill_table[sn].ki_mod + ki_mod); wait (ch, skill_table[sn].wait * wait_mod); check_killer (ch, victim); ImproveSkill (ch, sn, TRUE, learn_mod, victim->nDifficulty); ImproveStat (ch, STAT_STR, TRUE, learn_mod, victim->nDifficulty); // Get the victim's defensive skill vi_sn = get_defend_skill(victim, DEF_DODGE|DEF_PARRY|DEF_SHIELD); // Check for additional attacks. // 5% (hth), 2% (weapons) chance for each skill level to have a second attack. // Third attacks start at skill 30, (60 for weapons). // Fourth at 60, (90 for weapons) /* nNumAttacks = 1; if (number_range(1,100) < (skill - (sn == gsn_hand_to_hand ? 50 : 100)) * (sn == gsn_hand_to_hand ? 3 : 1)) ++nNumAttacks; if (number_range(1,100) < (skill - (sn == gsn_hand_to_hand ? 100 : 200)) * (sn == gsn_hand_to_hand ? 3 : 1)) ++nNumAttacks; if (number_range(1,100) < (skill - (sn == gsn_hand_to_hand ? 150 : 300)) * (sn == gsn_hand_to_hand ? 3 : 1)) ++nNumAttacks; */ nNumAttacks = URANGE(1, skill / 50, 4); for (i = 0; i < nNumAttacks; ++i) { if (get_eq_char(ch, WEAR_WIELD)||!get_eq_char(ch,WEAR_SECONDARY)){ // Figure out the type of damage message. wield = get_eq_char (ch, WEAR_WIELD); if (wield == NULL) { nLowDam = 1; nHighDam = 6; } else { nLowDam = wield->value[1]; nHighDam = wield->value[2]; } dt = TYPE_HIT; if (wield != NULL && wield->item_type == ITEM_WEAPON) dt += wield->value[3]; else dt += ch->dam_type; if (dt < TYPE_HIT) if (wield != NULL) dam_type = attack_table[wield->value[3]].damage; else dam_type = attack_table[ch->dam_type].damage; else dam_type = attack_table[dt - TYPE_HIT].damage; if (dam_type == -1) dam_type = DAM_BASH; // Check for a hit if (!check_hit(ch, victim, sn, vi_sn, 1, i == 0 ? TRUE : FALSE)) { // Miss. damage (ch, victim, 0, dt, dam_type, TRUE); if (number_range(1,2) == 1) set_balance(ch, -1, TRUE); continue; } // Hit. // Calculate damage: dam = Damroll(ch, nLowDam, nHighDam, sn, TRUE) - Absorb(victim, gsn_defend, dt, TRUE); dam *= dam_mod; damage (ch, victim, dam, dt, dam_type, TRUE); if (number_range(1,2) == 1) set_balance(victim, -1, TRUE); } //Do it all again if they are using a second weapon: if (get_eq_char(ch, WEAR_SECONDARY)) { // Figure out the type of damage message. wield = get_eq_char (ch, WEAR_SECONDARY); if (wield == NULL) { nLowDam = 1; nHighDam = 6; } else { nLowDam = wield->value[1]; nHighDam = wield->value[2]; } dt = TYPE_HIT; if (wield != NULL && wield->item_type == ITEM_WEAPON) dt += wield->value[3]; else dt += ch->dam_type; if (dt < TYPE_HIT) if (wield != NULL) dam_type = attack_table[wield->value[3]].damage; else dam_type = attack_table[ch->dam_type].damage; else dam_type = attack_table[dt - TYPE_HIT].damage; if (dam_type == -1) dam_type = DAM_BASH; if (!check_hit(ch, victim, sn, vi_sn, 1, i == 0 ? TRUE : FALSE)) { // Miss. damage (ch, victim, 0, dt, dam_type, TRUE); if (number_range(1,2) == 1) set_balance(ch, -1, TRUE); continue; } // Hit. // Calculate damage: dam = Damroll(ch, nLowDam, nHighDam, sn, TRUE) - Absorb(victim, gsn_defend, dt, TRUE$ dam *= dam_mod; damage (ch, victim, dam, dt, dam_type, TRUE); if (number_range(1,2) == 1) set_balance(victim, -1, TRUE); } } return; } in void violence_update (void) where it shows this: mob_hit (ch, victim, TYPE_UNDEFINED); replace it with this: mob_hit (ch, victim, TYPE_UNDEFINED, FALSE); ***in interp.c*** after { "sell", do_sell, POS_RESTING, 0, LOG_NORMAL, 1 }, add this: {"second", do_second, POS_RESTING, 0, LOG_NORMAL, 1 }, ***in interp.h*** after DECLARE_DO_FUN( do_scroll ): add this: DECLARE_DO_FUN( do_second ); ***in merc.h*** for the following, the minus sign is what you need to take out and add at the bottom of all these and change the number and the plus sign is what you need to add: -#define MAX_WEAR 19 +#define WEAR_SECONDARY 19 +#define MAX_WEAR 20