Shrink Code by Kracus v1.1 Please leave my credits above the do_shrink if you choose to use or modify my code for your mud. Do not forget to add do_shrink to interp.c and interp.h This code uses the severed heads created from the death_cry function found in stockrom... ADD into merc.h #define OBJ_VNUM_SHRUNKEN_HEAD 65 ADD into limbo.are #65 head~ the shrunken head~ The shrunken head lies here.~ bone~ armor Ta AO 0 0 0 0 0 6 0 1000 P Have fun, Kracus the Shrunken Head Coder // Shrink Severed Head Code by Kracus // Shrink Command used to make severed heads from the death_cry // function in fight.c into shrunken heads. // You need to have the severed head in your inventory // in order to make a shrunken head from it... // Syntax: shrink head void do_shrink( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; OBJ_DATA *obj; OBJ_DATA *shrunken_head; one_argument(argument, arg); if (arg[0] == '\0') { send_to_char( "Shrink what severed head?\n\r", ch ); return; } obj = get_obj_list(ch, arg, ch->carrying); if ((obj = get_obj_carry(ch, arg, ch)) == NULL || (obj->pIndexData->vnum != OBJ_VNUM_SEVERED_HEAD)) { send_to_char( "You are not carrying a severed head to shrink...\n\r", ch ); return; } // Kracus- its important to keep this next part in the right order // to make sure the act msgs and str_dup have an obj if (obj != NULL && obj->pIndexData->vnum == OBJ_VNUM_SEVERED_HEAD) { act( "{rYou shrink $p, using the forbidden, dark arts.{x", ch, obj, 0, TO_CHAR ); act( "{r$n shrinks $p, using the forbidden, dark arts.{x", ch, obj, NULL, TO_ROOM ); wiznet( "{r$N shrinks $p using the forbidden, dark arts.{x", ch, obj, WIZ_SACCING, 0, 0 ); // Kracus- lets now make the shrunken head from a new object shrunken_head = create_object(get_obj_index( OBJ_VNUM_SHRUNKEN_HEAD),0); // Kracus- str_dup the obj to shrunken sprintf( buf, "%s's {rshrunken trophy{x, %s, lies here.", ch->name, obj->short_descr ); free_string(shrunken_head->description); shrunken_head->description = str_dup(buf); sprintf( buf, "%s's {rshrunken trophy{x, %s", ch->name, obj->short_descr ); free_string(shrunken_head->short_descr); shrunken_head->short_descr = str_dup(buf); // Kracus- place the new shrunken_head into the char's room obj_to_char(shrunken_head, ch); // Kracus- lets now get rid of the severed head cause now we got // a shrunken_head with nice descriptions! extract_obj(obj); return; } else { send_to_char( "You can only shrink severed heads.\n\r", ch ); return; } }