alarm spell

From: Marcelo Valle Moreira (pira@dcc.unicamp.br)
Date: 05/07/96


Well, I'm working on an alarm spell and I got stucked due to my terrific C codeng ability =o)
The alarm spell sets AFF_ALARM on the mage who casts it.
if you CAN_BE_ALARMED(ch) it means you are ((GET_POS(ch)  == POS_SLEEPING) && IS_AFFECTED(ch, AFF_ALARM))

IF something/someone  enters/arrives/appears in the room the mage's sleeping the spell sends "\007" to the mage.

My players want the mage to be warned if someone enters, so they can wake the group. I don't like it too much, but they want, so I'm doing it.

Okay okay my problem is:

The spell is ready, the flag is ready, but I think I'm wrong with CAN_BE_ALARMED stuff and I can't find a good way to check it.
where can I check if someone entered the alarmed mage's room?
I don't want to make a check for every player in room when act.movement.c makes an act(has arrived/leaves) It would freeze my mud.

I'm stucked and need yer help.
If a mage casts alarm and goes to sleep, they'll be warned of someone entering the room.
the spell has a duration, so I need the CAN_BE_ALARMED stuff. I think that (ch) is wrong...
any ideas???

WidowMaker



This archive was generated by hypermail 2b30 : 12/18/00 PST