Re: setting spells on players

From: Mike Stilson (
Date: 03/18/03

On Mon, 2003-03-17 at 20:43, Brian Jenkins wrote:
> I recently added a plague spell to my mud. the basic idea is that if
> you drink the potion then you get infected with the spell(there is no
> way to cast the spell) you have side effects including no hp/mp/mv
> gain and you see a message every now and then saying your sick. If you
> are in a room with an infected person then you have the possibility to
> catch it. this is where the problem comes in right now it all works
> fine but when i use SET_BIT(ch, AFF_PLAGUE) it will never wear off.
> so the question is: is there a way to set a spell on someone instead
> of just the AFF_ flag? or another known way to fix this?

--mailer code--
struct affected_types aff;
af.duration = (number of ticks you want the plague to last)
af.bitvector = AFF_PLAGUE;
affect_join(vict, aff, FALSE, FALSE, FALSE, FALSE);

or this one would just set aff_plague until you remove it later

affect_modify(vict, APPLY_NONE, 0, AFF_PLAGUE, FALSE);

> And while i'm at it one more related question. It seems that only
> people who drink the potion get the side effects or infect others.
> I'm using the AFF_FLAGGED(ch, AFF_PLAGUE) expression but both the
> originally infected people and the people who catch the plague go
> through the same function? doesn't make sense to me. I will not
> include and snippets for this problem(just wasting space)
> becouse i believe it might fix itself with the above problem.

Dunno on that one, if the above doesn't work for you, you'll hafta post


   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/26/03 PDT