changed if syntax and made it work with items, quests