Re: magical traps

From: Daniel A. Koepke (dkoepke@circlemud.org)
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.


-dak

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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