New Spell: Awareness I was working on a new class, Priest, so i had to add some new neat features. I thought that it would be nice to see if someone is doing a "consider you" so you can kill him before he kills you :P. It is a spell, but can easily be changed into a skill (if you want your thief class to be able to use it). Do not forget to change _AWARENESS, CLASS_PRIEST, 30); into _AWARENESS, CLASS_CLERIC, 30); if you wan to use the spell with your.....cleric ;) Anyway, here goes: /* text */ = Tip on where to add the code, do not paste into your mud -----------------------------[ Step One ]----------------------------- /* add this in act.informative.c, do_score */ /* under strcat(buf, "You are protected by Sanctuary.\r\n"); */ if (AFF_FLAGGED(ch, AFF_AWARENESS)) strcat(buf, "You have a high level of awareness.\r\n"); -----------------------------[ Step Two ]----------------------------- /* add this in act.informative.c, do_consider */ /* under send_to_char("Easy! Very easy indeed!\r\n", ch); */ /* return; */ /* } */ if (AFF_FLAGGED(victim, AFF_AWARENESS)) { sprintf(buf, "$n is considering to kill you."); act(buf, FALSE, ch, 0, victim, TO_VICT | TO_SLEEP); } -----------------------------[ Step Two ]----------------------------- */ add this in class.c, in the class spell_level list */ spell_level(SPELL_AWARENESS, CLASS_PRIEST, 30); ----------------------------[ Step Three ]---------------------------- */ add this in constants.c, in AFF_x under charm */ "AWARENESS", ----------------------------[ Step Four ]----------------------------- */ add this in magic.c, in CASE_SPELL */ */ under to_vict = "You feel webbing between your toes."; */ break* */ case SPELL_AWARENESS: af[0].duration = (GET_LEVEL(ch) / 3) + 2; af[0].bitvector = AFF_AWARENESS; accum_duration = TRUE; to_vict = "Your level of awareness rises!"; break; ----------------------------[ Step Five ]----------------------------- */ add this in spell_parser.c, to the spello list */ */ under spello(SPELL_WORD_OF_RECALL, "word of recall", 20, 10, 2, POS_FIGHTING, */ */ TAR_CHAR_ROOM, FALSE, MAG_MANUAL); */ spello(SPELL_AWARENESS, "awareness", 25, 10, 1, POS_STANDING, TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); ----------------------------[ Step Six ]------------------------------ */ add this in structs.h under in Affect bits, the aff define list */ */ under #define AFF_CHARM (1 << 21) */ #define AFF_AWARENESS (1 << 22) ---------------------------------------------------------------------- Do whatever you want with this piece of code. Enjoy it, hate it, smash it, remake it...... If you decide to use it, please send me a mail, including the address to your mud. A line in your credit file is of course also appreciated / Hugor (hugor@freebox.com)