/* Alright, this is a little command I wrote up in about 5 minutes which allows players to shape their weapons to whatever type they want. its not very good for rp value but hell, the players on my mud love it... this is compatible for Rom obviously, but I'm submitting it to RoT because thats what my MUD is and the kyndig RoT snippet sections is pretty dismal:p I think this might be better off as a skill/spell for RP based muds...it might fit in nicely, but do whatever you want with it... This is such a small piece of code no credit is required, just don't call it your own and we're all happy :D -Orlis */ //Add this anywhere you want, I put it at the very bottom of act_obj.c personally void do_shape( CHAR_DATA *ch, char *argument ) { char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; OBJ_DATA *obj; char buf[MAX_STRING_LENGTH]; argument = one_argument( argument, arg1 ); argument = one_argument( argument, arg2 ); if ( arg1[0] == '\0' ) { for ( obj = ch->in_room->contents; obj; obj = obj->next_content ) { if ( obj->item_type == ITEM_WEAPON ) break; } if ( obj == NULL ) { send_to_char( "Shape what?\n\r", ch ); return; } } else { if ( ( obj = get_obj_here( ch, arg1 ) ) == NULL ) { send_to_char( "You can't find it.\n\r", ch ); return; } } switch ( obj->item_type ) { default: send_to_char( "Only weapons can be shaped.\n\r", ch ); return; case ITEM_WEAPON: if ( !str_cmp( arg2, "d" ) || !str_cmp( arg2, "dagger" ) ) { obj->value[0] = WEAPON_DAGGER; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mdagger{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "m" ) || !str_cmp( arg2, "mace" ) ) { obj->value[0] = WEAPON_MACE; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mmace{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "s" ) || !str_cmp( arg2, "sword" ) ) { obj->value[0] = WEAPON_SWORD; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Msword{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "sp" ) || !str_cmp( arg2, "spear" ) ) { obj->value[0] = WEAPON_SPEAR; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mspear{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "a" ) || !str_cmp( arg2, "axe" ) ) { obj->value[0] = WEAPON_AXE; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Maxe{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "f" ) || !str_cmp( arg2, "flail" ) ) { obj->value[0] = WEAPON_FLAIL; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mflail{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "w" ) || !str_cmp( arg2, "whip" ) ) { obj->value[0] = WEAPON_WHIP; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mwhip{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } else if ( !str_cmp( arg2, "p" ) || !str_cmp( arg2, "polearm" ) ) { obj->value[0] = WEAPON_MACE; sprintf(buf,"{wYour {x%s{w glows {Wbright white{w then morphs into a {Mpolearm{w.{x\n\r",obj->short_descr); send_to_char(buf,ch); break; } sprintf(buf,"{wYour {x%s{w glows {Wbright white{w........{x\n\r",obj->short_descr); send_to_char(buf,ch); sprintf(buf,"{wthen fizzles exposing no change.\n\r",obj->short_descr); send_to_char(buf,ch); send_to_char("{#[{3An object can be either sword, dagger, polearm, flail, axe, whip, spear or mace{#]{x\n\r",ch); break; } } //add to interp.h appropriately... DECLARE_DO_FUN( do_shape ); //add to interp.c appropriately... { "shape", do_shape, POS_STANDING, 0, 1, LOG_NORMAL, 0 },