[CODE] re:spec_proc invis_item

From: Mike Carpenter (abram@DELTANET.COM)
Date: 11/13/97


I posted a special proc earliar called invis_item, below is my final
renditions to it...if you have any suggestions to making it better please
post changes.
/* in spec_procs.c */
/* add at top of fle this to list of extern functions */
void perform_remove(struct char_data * ch, int pos);

SPECIAL(invis_item)
{
 int i;
 char arg1[MAX_INPUT_LENGTH];

 for (i=0; i< NUM_WEARS; i++)
 if(GET_EQ(ch, i) && GET_OBJ_VNUM(GET_EQ(ch, i)) == 35){ /* make sure you
have object vnum 35 */
    if(CMD_IS("disappear")) {
      send_to_char("You slowly fade out of view.\r\n", ch);
      act("$n slowly fades out of view.\r\n", FALSE, ch, 0, 0,TO_ROOM);

      SET_BIT(AFF_FLAGS(ch), AFF_INVISIBLE);
      return (TRUE);
      }

    if (CMD_IS("appear")) {
      REMOVE_BIT(AFF_FLAGS(ch), AFF_INVISIBLE);
      send_to_char("You slowly fade into view.\r\n", ch);
      act("$n slowly fades into view.\r\n", FALSE, ch, 0, 0,TO_ROOM);
      return(TRUE);
      }
/* added this so that players cannot remove and give to another player
without becoming visible */
    one_argument(argument, arg1);
    if (is_abbrev(arg1, "magical")) {
      perform_remove(ch, i);
        if (IS_SET(AFF_FLAGS(ch), AFF_INVISIBLE)) {
          REMOVE_BIT(AFF_FLAGS(ch), AFF_INVISIBLE);
          send_to_char("You slowly fade into view.\r\n", ch);

          act("$n slowly fades into view.\r\n", FALSE, ch, 0, 0, TO_ROOM);
          return (TRUE);
          }
          else
         return (TRUE);
    }
  return (FALSE);
  }
return (FALSE);
}

have fun
Abram
abram@deltanet.com


     +------------------------------------------------------------+
     | 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/08/00 PST