## Advanced NPC Duel Script
**Challenge nearby NPCs to intense, cinematic duels!**
This script allows players to initiate one-on-one or multi-opponent duels against nearby non-player characters (peds) in your RedM server. Bring dynamic encounters and challenging combat scenarios to your players with this versatile duel system.
**Features:**
* **Flexible Duel Initiation:** Use the simple `/duel` command to start a fight.
* **Multiple Opponents:** Challenge up to 3 NPCs simultaneously (configurable). Simply use `/duel [number_of_opponents]`.
* **Slow Motion Mode:** Add dramatic flair by triggering a slow-motion effect during the combat phase using `/duel [number] slow`.
* **Cinematic Sequence:** Features pre-duel music, dynamic local weather changes (requires `weathersync`), and a sequence of character emotes (bows, taunts) before the fight begins.
* **Randomized Encounters:** Opponents are given random weapons from a configurable list for varied combat.
* **Smart Opponent Selection:** The script searches for valid, non-critical NPCs in front of the player, ensuring fair and engaging fights.
* **Robust Monitoring:** The duel automatically cleans up (restores weather, stops music, resets time scale) if the player dies, leaves, or all opponents are defeated.
**Usage Examples:**
* `/duel`: Challenge the closest valid NPC to a standard duel.
* `/duel 2`: Challenge the two closest valid NPCs.
* `/duel 1 slow`: Challenge the closest NPC with slow motion enabled.
* `/duel 3 slow`: Challenge the three closest NPCs with slow motion enabled.
**Configuration:**
Easily customize the experience by modifying lists at the top of `client/client.lua`:
* `weapon`: Define the pool of weapons opponents can use.
* `duelWeatherTypes`: Set the possible weather types during duels.
* `duelOpponentEmotes`: Choose the emotes opponents can perform.
**Dependencies:**
* **`weathersync` (Optional but Recommended):** Required for the dynamic weather change feature during duels. The script will function without it, but weather changes will be skipped.
**Get this script today to add exciting, player-driven duels to your RedM server! Free and Open Source!**
Video link below:
https://imgur.com/a/NC1c23u