I am working on actually cleaning up hide, trying to get
it to work properly, but I am having a problem getting
the IS_AFFECTED to check and see of the AFF_HIDE flag is set
on chars. This works fine when set on mobs with olc.
All of the other equivalents of IS_AFFECTED work just fine
with the Q bit. I have an AFF_BURY (for vampires) does the same thing, and
works fine. it is an IS_AFFECTED2 bit.
I pasted the skills and the code that strips them. For some
reason bury is perfect .. but hide will not work on chars.
and insight would be wonderful. Thanks. Snippets below
---------in skills.c
void do_hide(CHAR_DATA * ch, char *argument)
{
AFFECT_DATA af;
send_to_char("You attempt to hide.\n\r", ch);
affect_strip(ch, gsn_hide);
if (number_percent() < get_skill(ch, gsn_hide))
{
af.where = TO_AFFECTS;
af.type = gsn_hide;
af.level = ch->level;
af.duration = ch->level;
af.location = 0;
af.modifier = 0;
af.bitvector = AFF_HIDING;
affect_to_char(ch, &af);
check_improve(ch, gsn_hide, TRUE, 3);
}
else
{
check_improve(ch, gsn_hide, FALSE, 3);
}
return;
}
void do_bury(CHAR_DATA * ch, char *argument)
{
AFFECT_DATA af;
if (!IS_VAMPIRE(ch))
{
send_to_char("You are to claustrophobic to bury yourself.\n\r",
ch);
return;
}
if (IS_SET(ch->in_room->room_flags, ROOM_INDOORS) ||
(ch->in_room->sector_type==SECT_INSIDE) || (ch->in_room->sector_type ==
SECT_WATER_SHALLOW) || (ch->in_room->sector_type == SECT_WATER_DEEP)
|| (ch->in_room->sector_type == SECT_AIR) || (ch->in_room->sector_type
== SECT_WATER_DEEP_SURFACE))
{
send_to_char("You cannot cover yourself here.\n\r", ch);
return;
}
affect_strip(ch, gsn_bury);
send_to_char("You attempt to bury yourself.\n\r", ch);
act_new("$n tries to bury $mself.", ch, NULL, NULL, TO_ROOM,
POS_RESTING, TRUE, C_DEFAULT);
if (number_percent() < get_skill(ch, gsn_bury))
{
af.where = TO_AFFECTS2;
af.type = gsn_bury;
af.level = ch->level;
af.duration = ch->level;
af.location = 0;
af.modifier = 0;
af.bitvector = AFF_BURY;
affect_to_char(ch, &af);
send_to_char("It is very dark, and you feel claustrophobic.\n\r",
ch);
check_improve(ch, gsn_bury, TRUE, 3);
}
else
{
check_improve(ch, gsn_bury, FALSE, 3);
}
return;
}
----- in act_move.c
if (IS_AFFECTED(ch, AFF_HIDING))
{
affect_strip(ch, gsn_hide);
send_to_char("You slip out of hiding.\n\r", ch);
}
if (IS_AFFECTED2(ch, AFF_BURY))
{
affect_strip(ch, gsn_bury);
send_to_char("You exume yourself.\n\r", ch);
}