Re: [code][idea][newbie]Special Guards

From: Acido (acido@dvmud.net)
Date: 02/22/99


At 12:31 AM 2/22/99 -0800, you wrote:
>I need help writing and assigning a special proc to some city
>guards...what I would like to do is run a check on any character that
>enters the same room as these guards...and then if the characters have
>weapons wielded..the guards make them unwield them and the guards take
>them and put them in a chest or thier inventory until the character gets
>out...I have absoulutely no idea how to write this...except somehow I
>need to look at GET_EQ(ch,ITEM_WIELDED) and check if the character even
>has a weapon...after I do get this written...with your guys' help. I
>will also need assistance assigning it..I have the basic idea, but
>sometimes I get some pretty strange errors...
>
>any assistance...as always..is appreciated..
>
>anthony - newbie coder that never sleeps

if (GET_EQ(ch, WEAR_WIELD)) {
  obj = GET_EQ(ch, WEAR_WIELD);
  obj_to_char(unequip_char(ch, WEAR_WIELD)), ch);
  obj_from_char(obj);
  obj_to_char(obj, mob);
  obj_to_obj(obj, box);
  send_to_char("Your weapon flies from your hands to the guard.", ch);
}

You will of course need to initialize obj, mob and box!


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



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