Skip to content

Latest commit

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Kits

Create kits with custom items, cooldown, price, experience and vehicle.

Features

  • Works with Uconomy plugin to charge players for kits.
  • Supports rich text formatting and custom message icon.
  • Cooldowns are saved in database and are not lost after server restart.
  • Kits can be created in-game using command.
  • Global cooldown prevents players from using kits too often.
  • Limited claims (MaxClaims) — restrict a kit to N lifetime claims per player. Combine with Cooldown to space out the claims.
  • Kits are saved in XML file and can be easily edited. Remember to reload the configuration after editing the file.

Note: Admins bypass cooldowns and can use kits without any restrictions. Do not give kits.admin permission to normal players.

Commands

  • /kit <name> - Use the kit.
  • /kit <name> <player> - Give the kit to another player. Requires givekit permission.
  • /kits - List all available kits.
  • /ckit <name> <cooldown> [price] [experience] [vehicle] - Create a new kit with items in your inventory. price, experience, vehicle are optional and if you want to skip them, use 0.
  • /dkit <name> - Delete a kit.
  • /resetkit <player|steamId|all> [kitName] - Reset claim history for limited kits. With all, wipes claims across every player; with a kit name, narrows the reset to that kit.
  • /rocket reload Kits - Reload the configuration.

Permissions

To grant access to the kit, add the permission kit.<name> to the player. For example, to give access to the kit named Soldier, add the permission kit.soldier.

<!-- Permissions that all players should have -->
<PermissionCooldown="0">kit</Permission>
<PermissionCooldown="0">kits</Permission>
<!-- Example if you want to give access to the kit named Soldier -->
<PermissionCooldown="0">kit.soldier</Permission>
<!-- Optional givekit permission. I don't recommend giving it to players -->
<PermissionCooldown="0">givekit</Permission>
<!-- Allows use of /resetkit. kits.admin also grants it. -->
<PermissionCooldown="0">kits.reset</Permission>
<!-- Admin permission that grants access to all commands, kits and bypasses cooldowns & claim limits. DO NOT GIVE IT TO NORMAL PLAYERS! -->
<PermissionCooldown="0">kits.admin</Permission>

Configuration

<?xml version="1.0" encoding="utf-8"?>
<KitsConfigurationxmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MessageColor>yellow</MessageColor>
<MessageIconUrl>https://i.imgur.com/ceyPI5h.png</MessageIconUrl>
<GlobalCooldown>30</GlobalCooldown>
</KitsConfiguration>

Kits.xml

<?xml version="1.0" encoding="utf-8"?>
<KitsDatabasexmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Kits>
<KitName="Soldier"Cooldown="300"Price="100"Experience="100"VehicleId="93"VehicleName="Huey_Forest">
<Items>
<ItemId="253"Name="Alicepack" />
<ItemId="310"Name="Forest Military Vest" />
<ItemId="116"Name="PDW"Metadata="dgAAAAAAdQAGAB4CAWRkZGRk" />
<ItemId="363"Name="Maplestrike"Metadata="kgAAAAAAAAAGAB4CAWRkZGRk" />
<ItemId="394"Name="Dressing"Amount="5" />
<ItemId="81"Name="MRE"Amount="2" />
<ItemId="95"Name="Bandage"Amount="3" />
<ItemId="469"Name="Canned Ham"Amount="3" />
<ItemId="6"Name="Military Magazine"Amount="3" />
</Items>
</Kit>
<!-- One-time starter kit: each player can claim exactly once, ever. -->
<KitName="Starter"MaxClaims="1">
<Items>
<ItemId="81"Name="MRE"Amount="3" />
<ItemId="14"Name="Water Bottle"Amount="2" />
<ItemId="95"Name="Bandage"Amount="3" />
</Items>
</Kit>
<!-- Limited VIP kit: up to 3 claims per player, with 5 minutes between each. -->
<KitName="VipDaily"MaxClaims="3"Cooldown="300">
<Items>
<ItemId="253"Name="Alicepack" />
<ItemId="81"Name="MRE"Amount="5" />
</Items>
</Kit>
</Kits>
</KitsDatabase>

Kit attributes

  • Name – Kit identifier. Used in /kit <name> and in the kit.<name> permission.
  • Cooldown – Seconds a player must wait between claims. Set 0 for no cooldown.
  • Price – Uconomy cost to claim. Requires Uconomy plugin.
  • Experience – Unturned experience granted on claim.
  • VehicleId / VehicleName – Spawn a vehicle on claim.
  • MaxClaims – Lifetime claim limit per player. 0 (default) means unlimited. Claims are stored permanently in KitClaims.xml.

MaxClaims + Cooldown

The two attributes work independently and can be combined:

  • MaxClaims="1" → claim once, ever.
  • MaxClaims="3" → claim up to 3 times ever, no wait between claims.
  • MaxClaims="3" Cooldown="300" → claim up to 3 times ever, 5-minute cooldown between each claim.
  • Cooldown="300" (no MaxClaims) → unlimited claims, 5-minute cooldown between each.

Admins (kits.admin) bypass both limits and do not count against claim history.

Translations

<?xml version="1.0" encoding="utf-8"?>
<Translationsxmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TranslationId="KitCommandSyntax"Value="You must specify kit name. Use [[b]]/kits[[/b]] to see the list of available kits." />
<TranslationId="KitCommandConsoleSyntax"Value="You must specify kit name and player you want to receive the kit." />
<TranslationId="KitNotFound"Value="Kit [[b]]{0}[[/b]] not found." />
<TranslationId="KitGlobalCooldown"Value="You have to wait [[b]]{0}[[/b]] before using any kit again." />
<TranslationId="KitCooldown"Value="You have to wait [[b]]{0}[[/b]] before using kit [[b]]{1}[[/b]] again." />
<TranslationId="KitNotEnoughMoney"Value="You can't afford to buy this kit for [[b]]${0}[[/b]] credits." />
<TranslationId="KitReceived"Value="You received kit [[b]]{0}[[/b]]." />
<TranslationId="KitReceivedFromSomeone"Value="You received kit [[b]]{0}[[/b]] from [[b]]{1}[[/b]]." />
<TranslationId="KitGiven"Value="You have given kit [[b]]{0}[[/b]] to [[b]]{1}[[/b]]." />
<TranslationId="KitAlreadyExists"Value="Kit [[b]]{0}[[/b]] already exists." />
<TranslationId="CreateKitCommandSyntax"Value="Usage: /ckit [[name]] [[cooldown]] [price] [experience] [vehicle]" />
<TranslationId="CreateKitNameInvalid"Value="Name must contain no special characters. [[b]]{0}[[/b]] is invalid." />
<TranslationId="CreateKitCooldownNotNumber"Value="Cooldown must be a number. [[b]]{0}[[/b]] is invalid." />
<TranslationId="CreateKitPriceNotNumber"Value="Price must be a number. [[b]]{0}[[/b]] is invalid." />
<TranslationId="CreateKitUconomyNotInstalled"Value="You must install Uconomy plugin to create kits with prices." />
<TranslationId="CreateKitExperienceNotNumber"Value="Experience must be a number. [[b]]{0}[[/b]] is invalid." />
<TranslationId="CreateKitVehicleNotFound"Value="Vehicle [[b]]{0}[[/b]] not found." />
<TranslationId="KitCreated"Value="Created kit [[b]]{0}[[/b]] with [[b]]{1}[[/b]] cooldown and [[b]]{2}[[/b]] items." />
<TranslationId="NoKitsAvailable"Value="You don't have access to any kits." />
<TranslationId="KitNameFormat"Value="[[b]]{0}[[/b]]" />
<TranslationId="KitPriceFormat"Value="[${0}]" />
<TranslationId="KitCooldownFormat"Value="({0})" />
<TranslationId="KitsAvailable"Value="Your kits: {0}" />
<TranslationId="DeleteKitCommandSyntax"Value="You must specify kit name." />
<TranslationId="KitDeleted"Value="Deleted kit [[b]]{0}[[/b]]." />
<TranslationId="KitNoPermission"Value="You don't have permission to use kit [[b]]{0}[[/b]]." />
<TranslationId="KitOtherNoPermission"Value="You don't have permission to give kit to other players." />
<TranslationId="PlayerNotFound"Value="Player {0} not found." />
<TranslationId="Day"Value="1 day" />
<TranslationId="Days"Value="{0} days" />
<TranslationId="Hour"Value="1 hour" />
<TranslationId="Hours"Value="{0} hours" />
<TranslationId="Minute"Value="1 minute" />
<TranslationId="Minutes"Value="{0} minutes" />
<TranslationId="Second"Value="1 second" />
<TranslationId="Seconds"Value="{0} seconds" />
<TranslationId="Zero"Value="a moment" />
<TranslationId="DayShort"Value="{0}d" />
<TranslationId="HourShort"Value="{0}h" />
<TranslationId="MinuteShort"Value="{0}m" />
<TranslationId="SecondShort"Value="{0}s" />
<TranslationId="KitAdminBypassPermission"Value="You have bypassed kit cooldown, because you are admin or have kits.admin permission." />
<TranslationId="KitAlreadyClaimed"Value="You have already claimed kit [[b]]{0}[[/b]] the maximum number of times ([[b]]{1}[[/b]])." />
<TranslationId="KitClaimsFormat"Value="({0}/{1})" />
<TranslationId="ResetKitCommandSyntax"Value="Usage: /resetkit &lt;player|steamId|all&gt; [kitName]" />
<TranslationId="ResetKitNoClaims"Value="No claims found to reset for [[b]]{0}[[/b]]." />
<TranslationId="ResetKitPlayer"Value="Reset [[b]]{0}[[/b]] claim(s) for player [[b]]{1}[[/b]]." />
<TranslationId="ResetKitAll"Value="Reset [[b]]{0}[[/b]] claim(s) across all players." />
</Translations>

About

Create kits with custom items, cooldown, price, experience and vehicle.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages