if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level))
return FALSE;
if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level)
|| (get_curr_stat(ch, STAT_INT) < get_curr_stat(victim, STAT_INT)))
return FALSE;
$ make
gcc -Wall -O -ggdb -DNOCRYPT -DQMFIXES -c -o obj/handler.o handler.c
handler.c: In function `can_see':
handler.c:2650: warning: suggest parentheses around && within ||
rm -f rom
if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level
|| (get_curr_stat(ch, STAT_INT) < get_curr_stat(victim, STAT_INT))))
return FALSE;
if(IS_AFFECTED(victim,AFF_INVISIBLE)
&& (!IS_AFFECTED(ch,AFF_DETECT_INVIS)
|| (IS_AFFECTED(ch,AFF_DETECT_INVIS)
&& ch->level < victim->level
|| get_curr_stat(ch, STAT_INT) < get_curr_stat(victim, STAT_INT))))
return FALSE;
if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level
|| (get_curr_stat(ch, STAT_INT) < get_curr_stat(victim, STAT_INT))))
return FALSE;
if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level
|| (((get_curr_stat(victim, STAT_INT) - get_curr_stat(ch, STAT_INT)) * 10) < number_percent())))
return FALSE;
if (IS_AFFECTED (victim, AFF_INVISIBLE)
&& (!IS_AFFECTED (ch, AFF_DETECT_INVIS)
|| ch->level < victim->level
|| (((get_curr_stat(victim, STAT_INT) - get_curr_stat(ch, STAT_INT)) * 10) > number_percent())))
return FALSE;
1) "ch" is the player trying to see people?
2) "victim" player that isn't able to be seen?
3) how do I make this last section compare levels and if the players level is too low, they can't see through the invis (even with detect_invis?
– am I even close with this–>