Re: weapon limitation

From: Derek L. Karnes (dkarnes@mystech.com)
Date: 10/18/96


bubba@mail.lgcy.com wrote:
> 
> Does anyone know of a way to limit weapons to a certain defined
> level?  So, make a weapon a lv 15 and up and lv14 and below levels
> can not wield it or use it.
> 
> Is there anyone willing to share information on how to set it up?
> 
> Thanx for anyone who helps,
> 

I would make a new apply type (called APPLY_RESTRICT or the name of your
choice) to go on the weapon.. just like you can make a weapon APPLY_HIT
(in structs.h) you could add APPLY_RESTRICT (or even use APPLY_LEVEL,
its not used for anything).

Then in handler.c you could add your new apply type to affect_modify()
(where all the other APPLY_xxx things are) and have your case simply
remove the object from their grasp and send them a message (like
ANTI_EVIL gear does in equip_char() in handler.c) if the level of the
char is less than the parameter "mod" sent to affect_modify().

Actually, it would be better programmin gpractice to put the removal
code in equip_char().. look at the parameters sent to affect_modify()
in equip_char() to figure out whether the eq needs to be removed.


-Derek Karnes

--
                                    \ | /
                        \  /---------------------\  /
                       --    dkarnes@mystech.com    --
                   --    Serapis, Imp of Dark Pawns    --
                       --    knight.ufp.org 4000    --    
                      --    Open for Beta testing    --    
                        /  \---------------------/  \
                                    / | \
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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