The setZoneState native AI script function is used to set the active state flag of a zone.
()setZoneState(zoneName: s, zoneState: f) // setZoneState_sf_
- zoneName (string): The name ID of the zone to set the state.
- zoneState (float): The value of the state to set. The interpretation of this value depends on whether the zone is a PvP or non-PvP zone.
- For non-PvP zones, the value is interpreted as a boolean (0 for inactive and 1 for active).
- For PvP zones, the value is interpreted as:
- 0: Inactive
- 1: Active with faction point rewards
- 2: Active without faction point rewards
()setZoneState("toto", 1.0);
This example code sets the state of the zone named "toto" to active.