[newbie][code]disarm

From: Bowes, Chris (cjb@ADDLESHAW-BOOTH.CO.UK)
Date: 01/14/98


Hi all,

i`m writing the disarm skill, but i have a problem in that i cant get th=
e  =20
weapon from the victim without going through perform_remove and  =20
perform_drop :--(
at the moment i have this code :

if (percent <=3D prob) {
  weapon =3D GET_EQ(vict,WEAR_WIELD);
  ch->equipment[WEAR_WIELD] =3D NULL;
  weapon->worn_by =3D NULL;
  obj_to_room(weapon,vict->in_room);
  damage(ch,vict,1, SKILL_DISARM);
  WAIT_STATE(ch,PULSE_VIOLENCE);
} else {
  damage(ch,vict,0, SKILL_DISARM);
}

but this plants the weapon on the floor but still leaves the victim  =20=

wielding what seems to be a copy of the object :--(  bit stuck here so  =
=20
any help would be appreciated...thanks
 -CJ =20


     +------------------------------------------------------------+
     | 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