A weapon creation spell for smaug 1.4a Hi, I hope this helps you. It is nothing big merely a copy of create food spell with a little added. If I can help at all let me know. vladaar@intelos.net * note this spell can cause a inbalance in power in your mud if not carefully created. I made the object for the spell have a loyal and nodrop flag as well. Vladaar magic.c add /* put in whatever name you want the spell in place of spell_weapon */ ch_ret spell_weapon( int sn, int level, CHAR_DATA *ch, void *vo ) { /* put in what the weapon is called in place of *item */ OBJ_DATA *item; char buf[MAX_STRING_LENGTH]; AFFECT_DATA *paf; item = create_object( get_obj_index( OBJ_VNUM_ITEM ), 2); /* I set item damage with value2 to 1+ players level */ item->value[2] = 1 + level; item->level = ch->level; sprintf(buf, "%s's Weapon", ch->name); STRFREE(item->short_descr); item->short_descr = STRALLOC(buf); /* lets give the weapon greater power at higher levels */ CREATE( paf, AFFECT_DATA, 1 ); paf->type = -1; paf->duration = -1; paf->location = APPLY_MANA; /* can use diff applies hit, move, hitroll, damroll */ paf->modifier = level / 3+5; /* can be whatever you like */ xCLEAR_BITS(paf->bitvector); LINK( paf, item->first_affect, item->last_affect, next, prev ); CREATE( paf, AFFECT_DATA, 1 ); paf->type = -1; paf->duration = -1; paf->location = APPLY_DAMROLL; paf->modifier = 1 + 1*(level/10); /* can be whatever you like */ xCLEAR_BITS(paf->bitvector); LINK( paf, item->first_affect, item->last_affect, next, prev ); item->timer = 15; /* object duration */ act( AT_MAGIC, "A weapon materilizes into $n's hands.", ch, NULL, NULL,TO_ROOM ); act( AT_MAGIC, "Your weapon materializes into your hands.", ch, NULL, NULL, TO_CHAR ); /* Hey lets put the weapon in the caster's inventory */ item = obj_to_char( item, ch ); return rNONE; } mud.h around line 1641 add /* place vnum of object you created here */ #define OBJ_VNUM_ITEM VNUM around line 4220 add DECLARE_SPELL_FUN( spell_weapon ); tables.c around line 83 add if ( !str_cmp( name, "spell_weapon" )) return spell_weapon; around line 755 add if ( spell == spell_weapon ) return "spell_weapon"; make clean. * remember to create the object in your mud. sset weapon create sset weapon type spell sset weapon acttype create sset weapon powertype minor sset weapon flag object sset weapon value /* vnum you assigned to your object */ sset weapon target ignore sset weapon minpos 11 sset weapon code spell_weapon sset weapon beats 10 /* use whatever you want */ sset weapon mana 40 /* use whatever you want */ Good Luck, Vladaar