Code for Rom2.4b4 or b6: skill do_sharpen v1.0 by Kracus Thanks to the people below for the making muds possible! :) Based on ROM Version 2.4 beta (c)1993-96 Russ Taylor Based on Merc 2.1 code by Hatchet, Furey, and Kahn Original DikiMud by: Hans Staerfeldt, Katja Nyboe, Tom Madsen, Micheal Seifert, Sebastian Hammer Remember if you are using Rom24b4 you need to declare void do_sharpen up in the local functions If you are using Rom24b6 then you dont need to... ***Add in a WEAPON_SHARP to merc.h #define WEAPON_VAMPIRIC (C) #define WEAPON_SHARP (D) ***Also, remember to put in checks for the gsn in db.c and merc.h for gsn_sharpen or if you have a gsn file put it in there... ***Add sharpen into interp.c and interp.h ***Add into Merc.h NOTE: raise max skill and group by 1 in merc.h #define OBJ_VNUM_WETSTONE 28 ***Add into Const.c { "sharpen", { 52, 52, 52, 52 }, { 0, 0, 0, 0,}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_sharpen, SLOT( 0), "", "!Sharpen!", "$p's edge loses its sharpness." }, ***Add into Limbo.are (area directory) #28 wetstone~ a wetstone~ A wetstone used for sharpening blades is lying here on the ground.~ stone~ treasure 0 AO 0 0 0 0 0 1 20 1000 P E wetstone~ The wetstone looks dark and composed of a rough type of granite. ~ ***Add into Fight.c // Sharpen Code by Kracus '94 updated '97 void do_sharpen(CHAR_DATA *ch, char *argument) { char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; OBJ_DATA *weapon, *wetstone; AFFECT_DATA af; int percent, skill; argument = one_argument(argument, arg1); argument = one_argument(argument, arg2); if (arg1[0] == '\0') { send_to_char("Sharpen what weapon?\n\r",ch); return; } if (arg2[0] == '\0') { send_to_char("Sharpen the weapon with what?\n\r",ch); return; } weapon = get_obj_list(ch,arg1,ch->carrying); if ((weapon = get_obj_carry(ch, arg1, ch)) == NULL) { send_to_char("You do not have that weapon in your inventory.\n\r", ch ); return; } if ((skill = get_skill(ch, gsn_sharpen)) < 1) { send_to_char("You don't have enough skill to enhance the edge of your weapon.\n\r",ch); return; } wetstone = get_obj_list(ch,arg2,ch->carrying); if (((wetstone = get_obj_carry(ch, arg2, ch)) == NULL) || (wetstone->pIndexData->vnum != OBJ_VNUM_WETSTONE)) { send_to_char("You are not carrying a wetstone to sharpen your weapon?\n\r",ch); return; } if (weapon->item_type == ITEM_WEAPON) { if(IS_WEAPON_STAT(weapon,WEAPON_SHARP)) { act("$p has already been sharpened.",ch,weapon,NULL,TO_CHAR); return; } percent = number_percent(); if(percent < skill) { WAIT_STATE(ch,PULSE_VIOLENCE); af.where = TO_WEAPON; af.type = gsn_sharpen; af.level = ch->level/2; af.duration = 8; af.location = 0; af.modifier = 0; af.bitvector = WEAPON_SHARP; affect_to_obj(weapon,&af); act("$n silently sharpens the edge of $p.",ch,weapon,NULL,TO_ROOM); act("you sharpen the edge of $p.",ch,weapon,NULL,TO_CHAR); check_improve(ch,gsn_sharpen,TRUE,3); if (wetstone != NULL && (wetstone->pIndexData->vnum == OBJ_VNUM_WETSTONE)) { act("You finish sharpening your weapon with $p.",ch,wetstone,NULL,TO_CHAR); act("The wetstone no longer has the rough texture, so you throw it away.",ch,wetstone,NULL,TO_CHAR); extract_obj(wetstone); } } else { WAIT_STATE(ch,2 * PULSE_VIOLENCE); send_to_char("Your attempt to sharpen your weapon fails.\n\r",ch); check_improve(ch,gsn_sharpen,FALSE,2); if (wetstone != NULL && (wetstone->pIndexData->vnum == OBJ_VNUM_WETSTONE)) { act("You look at $p, it is not textured rough enough so you throw it away.",ch,wetstone,NULL,TO_CHAR); extract_obj(wetstone); } } } else { send_to_char("You can only sharpen edged weapons.\n\r",ch); return; } }