noname
Limits the number of raids on buildings

Supported Games

It works by storing the owners of the buildings and the owner of the objects connected to the building.

Features

  • Limit the number of times players can raid in a day
  • Available again hours after raiding
  • Raid block players who do not fill the certain play time
  • Limit the number of raids a team can do in a day
  • Supports the "antinoobraid.noob" permission of Anti Noob Raid -- When using explosives as a home-protection users, Prevents the counter from decreasing.

Playtime Dependency

This plug-in has built-in playtime tracking. Therefore, it is optional to put in a playtime tracker.If a playtime tracker exists, this plug-in will use a playtime tracker.

Permissions

  • raidlimit.admin -- Allows player to use the rl.reset command
  • raidlimit.bypass -- Ignore plug-in effects

Chat Commands

  • /raidui -- Toggle GUI (Operates only when UI is enabled on the config)
  • /rlcheck -- Check the remaining number that can be raid OR Check time remaining before raid is possible

Chat/Console Commands

  • rl.reset -- Initialize the "number of possible to raid" of the players (requires authlevel2 or raidlimit.admin)
  • rl.addvalue [playername or id] [amount] -- Increase or decrease the raid limit for a target player(Decrease when you insert a negative value.) (requires authlevel2 or raidlimit.admin)

Configuration

{
  "1.RaidLimitOperationType": {
    //Determines the operating mechanism of the raid limit (0=ObjectOwnerIdentification, 1=ToolCupboardIdentification)
    "1.1.OperationType": 0, 
    //By default, this option saves the owner of the building to determine the reduction of the raid counter (records all the people who contributed to the building.)
    "1.2.ObjectOwnerIdentification": {
      //Depth of recursively searching for objects (Higher numbers result in higher computations and higher accuracy)(-1 is 100% accurate)(The lower this number, the more likely the raid limit counter is to malfunction)
      "1.2.1.ObjectSearchDepth": -1,
      //Scope of searching between linked objects
      "1.2.2.ObjectSearchRange": 5
    },
    //This option determines the reduction of the raid limit counter based on the cupboard that is connected to the building
    "1.3.ToolCupboardIdentification": {
      //Depth of recursively searching for objects (Higher numbers result in higher computations and higher accuracy)(-1 is 100% accurate)(The lower this number, the more likely the raid limit counter is to malfunction)
      "1.3.1.ObjectSearchDepth": -1,
      //Scope of searching between linked objects
      "1.3.2.ObjectSearchRange": 5,
      //Determines whether to check the instance ID of the toolcupboard (This option allows basic restrictions to work in the "ToolCupboardIdentification" mechanism)
      "1.3.3.CheckToolCupboardInstanceID": true,
      //Check the people who are authorized on the cupboard (If you turn this option on, you can also raid the homes of all the people who are authorized on the cupboard with one counter reduction.)
      "1.3.4.CheckAuthorizedPeoples": true
    }
  },
  "2.RaidLimitSettings": {
    //Maximum number of possible times that can raid
    "2.1.OneTimeMaximumRaidableHomeCount": 2,
    //a time when the first-time user cannot be raid.
    "2.2.NoobCantRaidSecond": 10800,
    //Whether to reset all raid counts at 0 o'clock
    "2.3.InitializeCounterOnMidnightTime": true,
    //Frequency of timer sensing zero hour (high values give high accuracy)
    "2.4.MidnightTimeDetectionTimerInterval": 10,
    //Time taken to charge the counter (If the value is -1, the counter will not be recharged)
    "2.5.CounterChargeDelay": 18000,
    //The standard for measuring the time it takes to recharge.(0 = realtime, 1 = playtime)
    "2.6.CounterChargeDelayType": 0,
    //Charging method (0 = Fill up all the times when consumed all, 1 == Charge one at a time when the value is not maximum)
    "2.7.CounterChargeType": 0
  },
  "3.UISettings": {
    //Whether to use UI
    "3.1.UIEnable": true,
    //Update frequency of UI timer
    "3.2.UIUpdateInterval": 3
    //Position of the GUI showing the number of possible raid
    "3.3.UIPosition": {
      "3.3.1.AnchorMin": "0.28 0.025",
      "3.3.2.AnchorMax": "0.3392 0.06"
    }
  },
  "4.TeamSyncSettings": {
    //Synchronize raid limit counter with team members (Per-team limit is possible)
    "4.1.TeamCounterSync": true,
    //Prevent team members from bypassing counter reduction ( even if the player briefly disbandes the team to bypass the counter synchronization between team members, the counter is synchronized even if the person who was a team minutes ago Raid because the plug-in remembers the team in the state a few minutes ago.)
    "4.2.PreventTempDisband": true,
    //Interval to remember previous state of teaming
    "4.3.OldTeamSaveInterval": 600
  }
}

Stored Data

The plugin player RaidData are stored in data/RaidLimitPlayerData.json. Deleting this file would wipe all the number of times players raided a house.The plugin player UIData are stored in data/RaidLimitPlayerUIData.json. Deleting this file would wipe all players UI toggle dataThe plugin player OldTeamData are stored in data/RaidLimitPlayerTeamData.json. Deleting this file will delete the teaming information a few minutes ago.

Localization

{
  "No Permission": "You do not have permission to use the '{0}' command.",
  "Date Changed": "The day has changed. The raid limit has been initialized.",
  "You Can Raid": "You have enough play time to raid.",
  "Add RaidList": "The owner of this building has been added to the raid list. you can raid {0} more time.",
  "Raid Blocked": "You can't raid any more today.",
  "Raid Blocked Time": "You have to play the game for more than {0}seconds before you can raid it. Your play time is {1}seconds",
  "Raid List Reset": "The raid limit has been initialized.",
  "Left Raid Count": "You can raid {0} more time.",
  //The items below have been added since version 1.1.0
  "bypass GUI Msg": "<color=#FFE400>bypass</color>",
  //The items below have been added since version 1.3.0
  "Team Member Raiding": "Team member \"{0}\" is raiding. Raid limit counter reduced. The owner of the house where the team is raiding has been added to the raid list."
  //The items below have been added since version 2.0.0
  "Add RaidList TC": "The building has been added to the raid list. you can raid {0} more time.",
  //The items below have been added since version 2.1.0
  "Raid Blocked NoRefill": "You can't raid any more.",
  "Raid Blocked RNextTime": "You can't raid right now. After {0} seconds in realtime, Raid count will be recharged.",
  "Raid Blocked PNextTime": "You can't raid right now. After {0} seconds in playtime, Raid count will be recharged.",
  "Raid Reset Specific Slayer": "Your raid limit has been refilled."
  //The items below have been added since version 2.2.0
  "SteamID Not Found": "Could not find this SteamID: {0}.",
  "Player Not Found": "Could not find this player: {0}.",
  "Multiple Players Found": "Found multiple players!\n\n{0}",
  "NotEnoughArgument": "to run this command you need {0} arguments.",
  "Invalid Parameter": "'{0}' is an invalid parameter.",
  "Count IncreasedC": "{0}'s raidlimit has increased by '{1}'.",
  "Count DecreasedC": "{0}'s raidlimit has decreased by '{1}'.",
  "Count IncreasedP": "raidlimit has increased by '{0}'.",
  "Count DecreasedP": "raidlimit has decreased by '{0}'."
}

Developer API

void ShowUI(BasePlayer player)

void HideUI(BasePlayer player)
MIT License

Copyright (c) 2021 noname

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.