Re: [newbie][code]disarm from John Evans at "Jan 14, 98 02:41:20 pm"

From: AxL (axl@MINDWARP.PLYMOUTH.EDU)
Date: 01/14/98


> >
> > i`m writing the disarm skill, but i have a problem in that i cant get the
> > weapon from the victim without going through perform_remove and
> > perform_drop :--(
>
> Try,
>
> if (successful_disarm_attempt) {
>   obj_to_char(unequip_char(victim, WEAR_WIELD), victim);

        Hmm...wouldn't a disarmed weapon tend to fall out of the wielder's
grasp? :)   obj_to_room would be a better idea, perhaps...

>   act("You have disarmed $N!", TRUE, ch, 0, victim, TO_CHAR);
>   act("$n disarmed $N!", TRUE, ch, 0, victim, TO_NOTVICT);
>   act("$n disarms you!", TRUE, ch, 0, victim, TO_VICT);
> }
> else {
>   send_to_char("You failed.\r\n", ch);
> }

--
-AxL, axl@wpcr.plymouth.edu - SysOp, RPM Director, WPCR Plymouth, 91.7 FM
 "Discriminate against the next fashion sucker you meet....it's a raver!"


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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