I'm not quite sure what you're attempting to ask, but you just set a flag then in the zone table you put a '1' in the flag_needed column to require the zone flag to enter it. I hope I answered your question. You can also check the flags in a script by using this:
Code:
sub EVENT_ENTERZONE {
if (quest::has_zone_flag($zoneid))) {
$client->Message(315, "You're flagged!")
} else {
$client->Message(315, "You're not flagged, be gone!");
quest::zone("nexus");
}
}