Re: magical traps

From: Daniel A. Koepke (
Date: 04/11/02

On Wed, 10 Apr 2002, Edward J Glamkowski wrote:

> So, I made a little trap struct that I attach to objects and a
> corresponding find/disarm trap skill.  But then I thought, wouldn't it
> be cool if mages could cast magical traps on objects?  But in order
> for a spell to be cast when the trap goes off, mag_damage needs a
> reference to the caster.

How about never extracting the casting character to begin with?  Keep
track of all the spell webs he owns.  If, when he leaves, he owns any,
move the now linkdead character to the void until he either logs back in
or all of the spells he owns die out (either because they were triggered,
expired, or the object they were attached to was destroyed).  This works
for mobiles and characters, alike, as long as you don't want traps that
persist over reboots.  (It's things like this that make proper garbage
collection for muds so attractive.)

If, however, you have your eye on more persistent traps, then the pfilepos
thing will work.  For a decent amount of reassurance that it works, note
that 'set file' does precisely what you're wanting to do.


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

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