
Kits (A)
Kits plugin, with only command Chat support
Permissions
This plugin uses Oxide’s permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>
. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>
.
kits.admin
— Allows player to use admin functionskits.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
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.
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
How to create kits
- Empty your inventory
- Add in your inventory the kit that you want players to have (blueprints, weapons in the belt, armors in the clothing, etc)
- use
/kit add <name>
- 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
Custom Permissions
when you created a kit or edited a kit do:/kit permission <permission>
the permission name can be a new permission or an existing permission.
Custom permissions are oxide permissions:oxide.grant user <player> <permission>
Autokit
/kit add "autokit"
/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./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…
- 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. - 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.
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
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.