From Mod Wiki
vector position -- Position to find the territory at. object team -- Team which the territory must belong to. boolean requireTeam -- Whether the team must match the territory's team or not. boolean requireActive -- Whether the territory must be marked active or not.
- If team is not a team, it will be treated as if null was passed.
Returns a territory entity at the given position that matches the specified requirements. If no territories are found, the result is null.