>/**
> * All this does is check if the weapon in question is equipped, and
> * if the person using it is fighting, then it grabs value 0 (which
> * is unused in weapons) as a spell number and casts it on whoever
> * is fighting the person using the "magical" weapon.
> **/
>SPECIAL(magic_weapon)
>{
> struct obj_data *weapon = me;
>
> if (!weapon->worn_by || GET_POS(weapon->worn_by != POS_FIGHTING)
> return 0;
> else
> cast_spell(weapon->worn_by, FIGHTING(weapon->worn_by, NULL, GET_OBJ_VAL(weapon, 0), NULL);
> return 1;
>}
--snip--
Don't forget to type cast the me, or it won't work. I made the same
mistake...
struct obj_data *weapon = (struct obj_data *) me;
Steve
This archive was generated by hypermail 2b30 : 12/07/00 PST