You put the number 1 in the flag_needed column in the zones table if you want a zone to require a flag.
Then for assigning the flag you put this on your quest npc, how you want to handle giving the flag is up to you.
Code:
quest::set_zone_flag(86);
The number in parenthesis being the zoneid number.