Cancels or reduces base damage when offline

Supported Games
works with

Anti Offline Raid is a structure-related plugin that reduces the amount of damage to player structures by a percentage. The percentage decreases as time passes.

There is a default cooldown of 10 minutes before damage reductions will apply. Meaning players may not necessarily prevent a raid by going offline. This value is configurable.

Going afk for more than 5 minutes is the same as going offline.

Anti Offline Raid determines who owns a structure based on who built it, who locked it, or who authorized to use it.

There is NO REFUND for wasted explosives.

AOR will not know how long a player has been offline unless they go offline while this plugin is running. There is no method to determine how long a player was offline before this plugin is installed, AOR will not protect bases for players that went offline before this plugin is installed.

When unloading or updating AOR, it is recommended to save the server with server.save.

Chat Commands

  • /ao "PlayerName" -- Check the Anti Offline Raid status of any active or sleeping player

Permissions

  • antiofflineraid.protect -- Enables offline anti-raid protection
  • antiofflineraid.check -- Allows access to /ao chat command

Configuration

  • afkMinutes (default 5)

    The number of minutes without moving before a player is considered "offline." Minimum is 5.

  • cooldownMinutes (default 10)

    The number of minutes after going offline that damage remains default. After cooldown has expired, damage is completely canceled (interimDamage) up until the 60 minutes (after which damageScale is used)

  • damageScale

    The scale of damage done to structures depending on how many hours since the owner was last online

    The default damageScale configuration is intended to work as follows.

  • First 10 minutes offline - 100% damage
  • Between 10 and 60 minutes offline - 0% damage
  • Between 1 and 3 hours offline - 20% damage
  • Between 3 and 6 hours offline - 35% damage
  • Between 6 and 12 hours offline - 50% damage
  • Between 12 and 48 hours offline - 80% damage
  • After 48 hours offline - 100% damage
  • absoluteTimeScale

    The scale of damage done to structures depending on the current hour of the (real) day

    Note that with the default configuration, all buildings are protected 90% (or receive 10% damage) between 3AM and 3:59AM.

    The absolute time damage scale will completely override the normal damage scale. To disable absolute time damage scale, just set it to the following value:

    "absoluteTimeScale": {}
    

    If the absolute time damage scale appears to use the wrong scale, ensure that your server's system time is correctly configured.

  • interimDamage (default 0%)

    The scale of damage between the cooldown and the first hour

  • clanShare (default false)

    Checks number of clan-mates online before mitigating damage

  • minMembers (default 1)

    The number of clan mates that must be online for the entire clan to be considered online

  • clanFirstOffline(default false)

    Changes whether damage is mitigated by the clan-mate who was offline the longest or the shortest

  • showMessage (default true)

    Whether or not to display gui message when a base is protected

  • protectionMessage

    The message to show players when they hit a protected building

  • playSound (default false)

    Play a sound when damage is blocked

  • sound (default mod attachment)

    Asset path of sound to play

  • activity

    The type of activities which constitute active play. Disabling activities will make online checking less accurate while providing a performance benefit.

    At least one activity is required:

     {
         "input",
         "loot",
         "respawn",
         "chat",
         "wakeup"
     }
    

Cleaning House Option

With damageScale, this plugin may also increase the damage beyond 100% after a certain amount of offline time, therein making it less expensive to raid. For example, after 168 hours (1 week), raiders could do twice the damage to the structure.

This may be useful on servers without decay to help clear out old bases.

"damageScale": {
    "1": 0.2,
    "3": 0.35,
    "6": 0.5,
    "12": 0.8,
    "48": 1,
    "168": 2
  }

MIT License


Copyright (c) 2019 Calytic


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.



29.9K downloads
352 watchers

protectionrestrictions
Collaborators
  • shady14u
    Developer