Arainrr
Creates PvP zones on certain actions/events/monuments

Supported Games

Bring a little PVP action to your PVE server! See the configuration file for event details.

NOTE

The plugin will automatically add the latest monuments to the configuration file

Because someone uses TruePVE or NextGenPVE. So in order to be more compatible with them, you need to do the following

For those using NextGenPVE, You need to add a new line at the top of the .cs file --> //Requires: NextGenPVE

For those using TruePVE, You need to add a new line at the top of the .cs file --> //Requires: TruePVE

like:

//Requires: TruePVE
//Requires: ZoneManager
using System;

Event Types

Custom events need to be changed in the data file. Please edit the data file after unloading the plugin

Monument events are static PVP events...

Bradley,//Timed event
Helicopter,//Timed event
SupplyDrop,//Timed event
SupplySignal,//Timed event
HackableCrate,//Timed event, Enable events when HackableCrate drops or unlock
ExcavatorIgnition,//Timed event, Start event after ignition of the excavator, stop event after the flameout 
CargoShip.//Timed event. Start event when spawn, stop event when killed

Permissions

  • dynamicpvp.admin -- Allows player to use dynpvp commands

Commands

Custom events are divided into automatic and timed events. They are in the data file...

  • dynpvp list -- Display all custom events
  • dynpvp add <eventName> [timed] -- Add event data. If added 'timed', it will be a timed event
  • dynpvp remove <eventName> -- Remove event data
  • dynpvp start <eventName> -- Start event
  • dynpvp stop <eventName> -- Stop event
  • dynpvp edit <eventName> <true/false> -- Change auto start state of auto event
  • dynpvp edit <eventName> <move> -- Move auto event to your current location
  • dynpvp edit <eventName> <time(seconds)> -- Changes the duration of a timed event
  • dynpvp <help | h> -- View help

Configuration

Dome can only be used in sphere zones, box zones have no domes

If you don't know what the "BotSpawn Profile Name" is. You can type "/botspawn add Bradley" in chat. Then you can see it in the BotSpawn data file "default-Customprofiles.json". "Bradley" is the profile name for BotSpawn.

What is PVPDelay: PVP Delay enables players to take and deal damage after leaving a PVP zone for a specified amount of time. The PVP Delay is specific to each zone. Players that exit a PVP zone can still take damage from anyone inside the zone. However, they can also deal damage back to anyone still inside the zone, or anyone that enters the zone. Players on a PVP Delay can also damage anyone else on a PVP Delay outside of the zone as well.

PVP Delay Flags:

  1. ZonePlayersCanDamageDelayedPlayers : Players in PVP zone can damage players in PVP delay
  2. DelayedPlayersCanDamageDelayedPlayers : Players in PVP delay can damage players in PVP zone
  3. DelayedPlayersCanDamageZonePlayers : Players in PVP delay can damage players in PVP delay

Fixed Rotation: For monument events, if it is true, when the direction of the monument changes, the direction of the zone does not change.

{
  "Global Settings": {
    "Enable Debug Mode": true,
    "Log Debug To File": false,
    "Compare Radius (Used to determine if it is a SupplySignal)": 50.0,//It's used to distinguish the supply drop from SupplySignal or TimedSupply
    "If the entity has an owner, don't create a PVP zone": true,
    "PVP Delay Flags": "ZonePlayersCanDamageDelayedPlayers, DelayedPlayersCanDamageZonePlayers, DelayedPlayersCanDamageDelayedPlayers"
  },
  "Chat Settings": {
    "Command": "dynpvp",
    "Chat Prefix": "[DynamicPVP]: ",
    "Chat Prefix Color": "#00FFFF",
    "Chat SteamID Icon": 0
  },
  "General Event Settings": {
    "Bradley event settings": {
      "Event Duration": 600.0,
      "Enable Bots (Need BotSpawn Plugin)": false,
      "BotSpawn Profile Name": "Bradley",
      "Enable Event": true,
      "Enable PVP Delay": true,//When a player leaves the area for a period of time, he can still be hurt by other players
      "PVP Delay Time": 10.0,
      "Enable Domes": true,//It is not valid for cube zones
      "Domes Darkness": 8,
      "Delay In Starting Event": 0.0,
      "Delay In Stopping Event": 0.0,
      "TruePVE Mapping": "exclude",//You can create new mapping in TruePVE/NextGenPVE to prevent players from damaging buildings
      "Transform Position": {//Transform the position of the zone
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      },
      "Use Blacklist Commands (If false, a whitelist is used)": true,
      "Command List (If there is a '/' at the front, it is a chat command)": [
        "kill",
        "/god"
      ],
      "Dynamic pvp zone settings": {
        "Zone Radius": 100.0,//If this not greater than 0, it will become the cube zone.
        "Zone Size": {//Cube zone size
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "Zone Rotation": 0.0,//Cube zone rotation
        "Fixed Rotation": false,//Used to cube zone
        "Zone Comfort": 0.0,
        "Zone Radiation": 0.0,
        "Zone Temperature": 0.0,
        "Zone Radius": "100",
        "Enter Message": "Entering a PVP area!",
        "Leave Message": "Leaving a PVP area.",
        "Eject Spawns": "",
        "Permission Required To Enter Zone": "",
        "Extra Zone Flags": [
          "notp",
          "undestr"
        ]
      }
    },
  "Monument Event Settings": {
    "Large Fishing Village": {
      "Enable Event": true,
      "Enable PVP Delay": true,
      "PVP Delay Time": 10.0,
      "Enable Domes": true,
      "Domes Darkness": 8,
      "Delay In Starting Event": 0.0,
      "TruePVE Mapping": "exclude",
      "Use Blacklist Commands (If false, a whitelist is used)": true,
      "Command List (If there is a '/' at the front, it is a chat command)": [],
      "Dynamic PVP Zone Settings": {
        "Zone Radius": 100.0,
        "Zone Size": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "Zone Rotation": 0.0,
        "Fixed Rotation": false,//if it is true, when the direction of the monument changes, the direction of the zone does not change.
        "Zone Comfort": 0.0,
        "Zone Radiation": 0.0,
        "Zone Temperature": 0.0,
        "Enter Message": "Entering a PVP area!",
        "Leave Message": "Leaving a PVP area.",
        "Eject Spawns": "",
        "Permission Required To Enter Zone": "",
        "Extra Zone Flags": []
      },
      "Zone ID": "", //Fixed zone ID
      "Transform Position": {
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      }
    },
  }

Hooks

private object OnCreateDynamicPVP(string eventName, BaseEntity entity) 

API

private void string[] AllDynamicPVPZones()
private bool IsDynamicPVPZone(string zoneID)
private bool IsPlayerInPVPDelay(ulong playerID)
...

Credits

  • CatMeat, the original author of this plugin

MIT License


Copyright (c) 2019 Arainrr


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.