## Core Functionality
- Capture Zone: The system looks for a WorldGuard region named "kotharea".
- Winning Condition: A player must stay inside the capture zone for a continuous period of 5 minutes.
- Contesting/Resetting: If the current capper leaves the area or logs out of the server, the timer resets back to 5 minutes, and the zone becomes available for someone else.
- Rewards: Upon winning, the server broadcasts the winner's name and automatically grants them a "KOTH" crate key via a console command.
## Automated Schedule
The script manages itself without needing an admin to start it every time:- Frequency: It tracks the time since the last KOTH ended. Once it hits the defined frequency (e.g., every 3 hours), a new event starts automatically.
- Persistent Tracking: It uses a high-frequency check (every tick) to ensure the timer is accurate and that the capper hasn't left the zone.
## Administrative Commands
The script includes a /koth command (requires server.koth permission) with the following sub-commands:| Command | Description |
| /koth forcestart | Manually triggers a KOTH event immediately. |
| /koth forceend | Ends the current event without a winner. |
| /koth setfrequency <time> | Sets how often the KOTH should start (e.g., /koth setfrequency 2h). |
| /koth help | Displays the list of available commands. |
## Technical Highlights
- Anti-Cheat Measures: It includes a listener that forces players to respawn immediately upon death, likely to prevent "ghosting" or staying in the cap zone while dead.
- Cleanup on Load: Every time the script or server reloads, it resets the current session to prevent "glitched" timers.
- Options System: Uses a prefix system making it easy to change the branding of the messages globally.
