hasquest & isquestcompleted = we can turn it in
!hasquest & isquestcompleted = we already did it in the past and turned it in
!hasquest & !isquestcompleted , i use that for quests that are started by items that drop of mobs, if we dont have the quest and we havent done it in the past, grind till the item is there and accept quest