Runs various events (useful when using a night skip plugin)

Supported Games
GameServerKingsGameServerKings

This is a plugin that allows you to run various events on timers to counteract them not being run when using a skip night plugin.

The plugin only spawns event entities, not controls them, so any issues unrelated to spawn are irrelevant to the plugin

Supports AlphaChristmas, FancyDrop, PlaneCrash, RustTanic, HeliRefuel, PilotEject.

EventType

            Bradley,
            CargoPlane,
            CargoShip,
            Chinook,
            Helicopter,
            SantaSleigh,
            Christmas,
            Easter,
            Halloween

Permissions

  • automatedevents.allowed - Allows the player to use the runevent command
  • automatedevents.next - Allows the player to use the nextevent command

Commands

  • runevent <event type> -- Run an event
  • killevent <event type> -- Kill an event
  • nextevent <event type> -- Shows when the event will next run
  • nextevent * -- Shows when all events will next run

Event type can be:

  • brad or bradley
  • heli or helicopter or copter
  • plane or cargoplane
  • ship or cargo or cargoship
  • ch47 or chinook
  • xmas or chris or christmas or yule
  • santa or nick or wodan
  • easter or egghunt or bunny
  • halloween or candy or halloweenhunt or spooky or samhain

e.g. runevent plane - That will summon a plane event.

Please note some events are seasonal. Running Egg Hunt after Halloween has happened will not result in an Egg Hunt due to FacePunch reusing code (very disappointing). Some Events like Santa's Sleigh are only available when Christmas is running. This mean to support events where possible, but it is not always possible.

Because the Easter event and Halloween event will conflict, so there can only be one event at a time

Configuration

"Restart Timer On Entity Kill": Reset event timer when event entity is killed. This is to mainly address people concerned about entities spawning too quickly after death.

Event Weight: The greater the relative weight, the more likely this event is to occur.e.g. Normal is 60, FancyDrop is 30, PlaneCrash is 10. Then the Normal has a 60% probability of occurring.

"Event Weights": [
{
  "Weight": 60,
  "Name": null, // If it is null, it means the weight of normal event
  "Argument Type (Command or CallHook)": null,
  "Arguments": null
},
{
  "Weight": 20,
  "Name": "PlaneCrash",
  "Argument Type (Command or CallHook)": "Command", // If the argument type is command, the argmuent will be run
  "Arguments": [
	"callcrash" // console command
  ]
},
{
  "Weight": 20,
  "Name": "FancyDrop",
  "Argument Type (Command or CallHook)": "CallHook", // If the argument type is CallHook, a function of the plugin will be called
  "Arguments": [ 
	"FancyDrop", // plugin name
	"createCargoPlane" // function name
  ]
}
]
{
  "Settings": {
    "Announce On Plugin Loaded": false,//Will announce the next time events will occur on plugin loaded.
    "Use GUIAnnouncements Plugin": false
  },
  "Chat Settings": {
    "Next Event Command": "nextevent",
    "Run Event Command": "runevent",
    "Kill Event Command": "killevent",
    "Chat Prefix": "[AutomatedEvents]: ",
    "Chat Prefix Color": "#00FFFF",
    "Chat SteamID Icon": 0
  },
  "Event Settings": {
    "Bradley Event": {
      "Enabled": false,
      "Display Name": "Bradley",
      "Disable Vanilla Event": false,//This option is valid whether or not the event is enabled
      "Minimum Time Between (Minutes)": 30.0,//Is the minimum range used to generate the next random time. 
      "Maximum Time Between (Minutes)": 45.0,//Is the maximum range used to generate the next random time.   
      "Minimum Online Players Required (0 = Disabled)": 0,//If the online players is less than this, the event will not run
      "Maximum Online Players Required (0 = Disabled)": 0,//If the online players is more than this, the event will not run
      "Announce Next Run Time": false,  //if true will let players know when the next event will occur.    
      "Restart Timer On Entity Kill": true//Reset timer when event entity is killed
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,//Maximum number of events on the server
      "Exclude Player's Entity": true,//Exclude player entities when checking or deleting events
      "Event Weights": []
    },
    "Cargo Plane Event": {
      "Enabled": false,
      "Display Name": "Cargo Plane",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 45.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": [
        {
          "Weight": 60,
          "Name": null,
          "Argument Type (Command or CallHook)": null,
          "Arguments": null
        },
        {
          "Weight": 20,
          "Name": "FancyDrop",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "ad.random"
          ]
        },
        {
          "Weight": 20,
          "Name": "PlaneCrash",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "callcrash"
          ]
        }
      ]
    },
    "Cargo Ship Event": {
      "Enabled": false,
      "Display Name": "Cargo Ship",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 45.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": [
        {
          "Weight": 80,
          "Name": null,
          "Argument Type (Command or CallHook)": null,
          "Arguments": null
        },
        {
          "Weight": 20,
          "Name": "RustTanic",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "calltitanic"
          ]
        }
      ]
    },
    "Chinook (CH47) Event": {
      "Enabled": false,
      "Display Name": "Chinook",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 45.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": []
    },
    "Helicopter Event": {
      "Enabled": false,
      "Display Name": "Helicopter",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 45.0,
      "Maximum Time Between (Minutes)": 60.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": [
        {
          "Weight": 60,
          "Name": null,
          "Argument Type (Command or CallHook)": null,
          "Arguments": null
        },
        {
          "Weight": 20,
          "Name": "HeliRefuel",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "pe call"
          ]
        },
        {
          "Weight": 20,
          "Name": "PilotEject",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "hr call"
          ]
        }
      ]
    },
    "Santa Sleigh Event": {
      "Enabled": false,
      "Display Name": "Santa Sleigh",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 60.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": []
    },
    "Christmas Event": {
      "Enabled": false,
      "Display Name": "Christmas",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 60.0,
      "Maximum Time Between (Minutes)": 120.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false,
      "Maximum Number On Server": 1,
      "Exclude Player's Entity": true,
      "Event Weights": [
        {
          "Weight": 80,
          "Name": null,
          "Argument Type (Command or CallHook)": null,
          "Arguments": null
        },
        {
          "Weight": 20,
          "Name": "AlphaChristmas",
          "Argument Type (Command or CallHook)": "Command",
          "Arguments": [
            "alphachristmas.refill"
          ]
        }
      ]
    },
    "Easter Event": {
      "Enabled": false,
      "Display Name": "Easter",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 60.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false
    },
    "Halloween Event": {
      "Enabled": false,
      "Display Name": "Halloween",
      "Disable Vanilla Event": false,
      "Event Start Offset (Minutes)": 0.0,
      "Minimum Time Between (Minutes)": 30.0,
      "Maximum Time Between (Minutes)": 60.0,
      "Minimum Online Players Required (0 = Disabled)": 0,
      "Maximum Online Players Required (0 = Disabled)": 0,
      "Announce Next Run Time": false,
      "Restart Timer On Entity Kill": true,
      "Kill Existing Event On Plugin Loaded": false
    }
  }
}

Hooks

private void OnAutoEventTriggered(string eventTypeStr, BaseEntity eventEntity, bool once) 

Credits

  • K1lly0u, the original author of this plugin
  • MalS, for helping maintain the plugin
  • **Arainrr **: Previous maintainer

MIT License


Copyright (c) 2020 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.