Hi! The state parameter is a boolean — it controls whether encounters are enabled or disabled in that region.
true→ encounters onfalse→ encounters off
So for example, if you want to disable encounters in region 5 of map 3: $gamePlayer.setDataEncounter(3, 5, false);
And to re-enable them later: $gamePlayer.setDataEncounter(3, 5, true);
Hope that helps!