Orange
Item kits, autokits, kit cooldowns, and more

Supported Games

Kits plugin, with only command chat support

Features

  • Choose a limit of usage for kits
  • Choose a cooldown for kits
  • Create kits for admins
  • Create kits for moderators
  • Create kits for VIPs
  • Choose 1 Autokit on your server -- or use Custom AutoKits (see below).
  • Supports GUI
  • Supports NPC
  • Supports Skins
  • Supports Pasting Buildings (CopyPaste version 3.0.8 )
  • Enable Kit Logging
  • Create kits not accessible by players but accessible via the** Give **plugin
  • No more json, too hard for a lot of admins, all kits are configuration from ingame

Permissions

  • kits.admin -- Allows player to use admin functions
  • kits.consolegive -- Allows kits to be given via console
  • Permissions registered by individual Kits, see Custom Permissions

Player Commands

  • /kit -- see the full list of available kits for you
  • /kit <name> -- choose a kit

Admin Commands

  • /kit list -- see the full list of kits
  • /kit add <name> -- add a new kit
  • /kit remove <name> -- remove a kit from the database
  • /kit edit <name> -- edit a kit
  • /kit resetkits -- delete all kits and player data
  • /kit resetdata -- reset player data
  • /kit <option1> <value1> [option2] [value2] [option..] [value..] -- set the options for a kit you are currently editing

How to create kits

  1. Empty your inventory
  2. Add in your inventory the kit that you want players to have (blueprints, weapons in the belt, armors in the clothing, etc)
  3. use /kit add <name>
  4. set the options via: /kit <option1> <value1> [option2] [value2] [option..] [value..]
    ex:/kit items max 10 cooldown 3600 description "Every hour kit, max usage: 10"

NEW DEMO - By Absolut

"Shows all functionality including UI changes and Custom AutoKits"
https://www.youtube.com/watch?v=NkLZMRVaH3g

OLD DEMO - By Reneb

https://www.youtube.com/watch?v=HzzY1y2HuBc

Options

  • max: <usages>/false -- set the max usage of a kit (false will deactivate it)
  • cooldown: <cooldown>/false -- set the cooldown in seconds of a kit (false will deactivate it)
  • building: <name> -- sets a building to paste
  • authlevel: <authlevel> -- authlevel needed to redeem the kit
  • npconly: true/false -- only avaible via an NPC
  • permission: <permission>/false -- only players with the custom permission oxide permission will be able to redeem those (doesn't work on autokits). See under.
  • description: <description>/false -- set a description for a kit
  • image: <URL> => set an image for a kit in the GUI.
  • hide: true/false -- hide a kit from the list: /kit (won't hide from the admin command /kit list)
  • xp: <xp> -- give this much of xp when redeeming the kit
  • items -- no values here, this will copy the items in your inventory to set it in the kit.

Custom Permissions

when you created a kit or edited a kit do:
/kit permission <permission>the permissionname can be a new permission or an existing permission.

Custom permissions are oxide permissions:
oxide.grant user <player> <permission>

Autokit

  1. /kit add "autokit"
  2. /kit authlevel 2 hide true -- this will set the kit only manually redeemable for admins, and hide will hide it from the list in /kit.
  3. /kit items -- this will copy the items in your inventory to set it as the new kit. you don't need to do it seperatly you can do it in the previous line: /kit authlevel 2 items hide true

Custom AutoKits

Will only work if autokit isn't configured--> If you have an autokit, delete it with /kit remove autokit

The nice benefit to using Custom AutoKits over the traditional autokit is a few things...

  1. Priority Kit Giving ... so kits configured in the Config File (kits.json in config folder) are given a "number index".

    Example Code:

    "Custom AutoKits": {
       "0": "VipSpawn",
       "1": "VeteranSpawn",
       "2": "BasicSpawn"
    },
    

    This index means Custom AutoKits will be attempted to be given in the order of 0 - on. So 0 is highest priority for trying. In the example above on player respawn an attempt will be made to give the player VipSpawn, if not then VeteranSpawn, and finally BasicSpawn.. again to reiterate; if you have an "autokit" in your kits.json in the data folder none of this will happen as the "autokit" will be given and that will be it.

  2. I added checks for permissions, uses, and cooldown. So this means, if a player has permission Kits.VipSpawn and Kits.VeteranSpawn and Kits.BasicSpawn he or she will be eligible for all (3) Custom AutoKits. So if the player respawns and gets the VipSpawn and it has a 5 minute cooldown, then if that same player dies within 5 minutes he or she will instead be given the VeteranSpawn... this same logic works with uses..
    So taking the same example if VipSpawn has a 3 use max, after the 3rd respawn the player will then be given the VeteranSpawn instead because there are no "uses" left for the VipSpawn.

This should really add some customization to the "Respawn Kit" feel people are looking for.

How to make and configure a Custom AutoKits - 'kit'

For this example we will say the Kit is going to be named VipSpawn.

Start by filling your inventory with the items you want in the kit.
Type /kit add VipSpawn
Type /kit permission VipSpawn
Type /kit hide true
Type /kit authlevel 2
If you want Max Uses type /kit max amount --> example /kit max amount 3
Type /kit items

Now you have made a Custom AutoKit but you must configure it to work!

So open the config file (Kits.json) in the Config Folder and navigate to the Custom AutoKits Section.. and go ahead and input this new Kit name... This should look like this when done:

"Custom AutoKits": {
   "0": "VipSpawn"
},

Save this file and reload Kits.

Now, any player that is given the Kits.VipSpawn permission will receive this kit on respawn.

If you do not know how to use Oxide permissions see this article...
Using Oxide's permission system | Oxide

As an example you would type:
--> grant user STEAMID Kits.VipSpawn <---

See the article for information on using Oxide Groups...

NPC GUI

When you create a NPC Kit, you can (or not) use -npconly
When you created your npc, do /npc_list to get the NPC ID.
Then in the config you can add what this npc has:

"NPC - GUI Kits": {  
"1235439": {  
      "description": "Welcome on this server, Here is a list of free kits that you can get only once each\n\n                      Enjoy your stay",  
      "kits": [  
        "kit1",  
        "kit2"  
      ]  
    },  
    "8753201223": {  
      "description": "VIPs Kits",  
      "kits": [  
        "kit1",  
        "kit3"  
      ]  
    }  
}  

Chat GUI

By default there are no chat gui.
But you may replace the default /kit chat command by a gui.
in the NPC - GUI Kits, instead of putting an NPC id, put: "0".

ex:

{  
  "NPC - GUI Kits": {  
    "0": {  
      "description": "Chat Kits",  
      "kits": [  
        "lotwood",  
        "wood",  
    "autokit"  
      ]  
    }  
  }  
}  

Adding Kits to GUI Menus

You can add kits to each NPC GUI Menu or the Chat GUI Menu by editing the Kits List in the config or by clicking the "Add Kits" button in the GUI. This button and functionality is only available to Auth Level 2 or players with the permission ---> Kits.admin

GUI Key Binding

If you choose to use the chat "0" Menu this config will set a keybinding in addition to the /kit --> command. Symbols don't work so don't ask. Use letters or f-keys. Make sure the F in say F6 is lower case: f6. Pressing the button will "Toggle" the menu.. meaning open and close it.

Custom GUI Background Image

If you choose to use the chat "0" Menu this url will provide a custom background for the UI. Simply make or find a picture and paste the URL into this field. Reload the plugin and you are done.

CopyPaste Support

Create a building with CopyPaste then copy it.
Create a new kit and put /kit building BUILDINGNAME as a kit parameter
And voila, when people request the kit they will paste the building.
In the configs you may change the parameters of copy paste buildings (only 1 parameter for all the buildings, so you can't set them seperatly)

"CopyPaste - Parameters": [
    "autoheight",
    "true",
    "blockcollision",
    "3",
    "deployables",
    "true",
    "inventories",
    "true"
]

Kit Logging

If you enable this option it will create a log file in oxide/logs named "KITS-KitLogging {todays date}. Each redeemed kit will be written in here with PlayerName Kitname

Settings authLevel

is the level needed to use the admin commands
note that a level 1 can't remove a kit from a level 2.

For Plugin Devs

To refuse a kit to be given (arena, specific player moderation, etc)
you may do this:

function PLUGIN:canRedeemKit(player)
    if(ArenaPlayers[player]) then
        return "You are currently in an Arena, you may not redeem any kit"
    end
    -- don't return anything if you want to let the kit to be redeemed
end

By returning ANYTHING it will refuse the kit to be given, return a text to specify the reason.

Check if the kit exists:

object theanswer = Interface.CallHook("isKit", KITNAME);

    MIT License


    Copyright (c) 2019 Orange


    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.


    Download
    Donate
    30.6K downloads
    683 watchers

    importeditemsrewards