I just did this in my mud.  It's too bad I don't
release any of my code to the public.  What you'll
have to do is create a new affect_modify and have
equip_char and unequip_char point to that instead of
the old affect_modify.  Don't point anything else to
it, just equip and unequip.  If you do, you'll have
tons of problems with spells giving you permanent
affects.  So copy and paste affect_modify, add in a
argument for OBJ_DATA of the object you're
equipping/removing.  Example: void affect_modify(
blah, blah, OBJ_DATA *obj, blah )... etc.  Then in the
switch for paf->where make another switch for
paf->bitvector and start making checks for each
AFF_flag.
Example:
case AFF_SANCTUARY:
   < code copied from magic.c for sanctuary >
case AFF_BLIND:
   < code copied from magic.c for blindness >
(Be sure to change any "level" pointers to
"obj->level", and the duration to -1, and any "victim"
to "ch" as they are all undeclared here)

Then in the !fAdd part just do the opposite:
case AFF_SANCTUARY:
   affect_strip( ch, skill_lookup( "sanctuary" ) );

Sorry if this is sloppy or complete rambling... I
don't do much posting :P
-Matt Foltz

--- thash jarnei <[EMAIL PROTECTED]> wrote:
> Anyone know if a snippet (not to recreate the wheel)
> that will lets say you have a helmet of santuary,
> when worn it will put a sanctuary (spell) around you
> perm until you take it off?
> 
> TJ
> 
> 
>
_____________________________________________________________
> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS
> for $19.95/year.
>
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
> 
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Reply via email to