Kits for Rust

Kits

Total Downloads: 54,778 - First Release: Oct 21, 2014 - Last Update: Jul 21, 2017

4.9593/5, 172 likes
  1. Kappasaurus
    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

    Players Commands:
    - /kit => see the full list of available kits for you
    - /kit KITNAME => choose a kit

    Admin Commands:
    - /kit list => see the full list of kits
    - /kit add "KITNAME" => add a new kit
    - /kit remove "KITNAME" => remove a kit from the database
    - /kit edit "KITNAME" => edit a kit
    - /kit resetkits => delete all kits and player data
    - /kit resetdata => reset player data
    - /kit option1 value1 option2 value2 option3 value3 => 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 "kitname"
    4) set the options via: /kit option1 value1 option2 value2 etc
    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"


    OLD DEMO - By Reneb


    Options:
    max XXX/false => set the max usage of a kit (false will deactivate it)
    cooldown XXXX/false => set the cooldown in seconds of a kit (false will deactivate it)
    building XX => sets a building to paste
    authlevel X => level needed to redeem the kit
    npconly true/false => only avaible via an NPC
    permission CUSTOMPERMISSION/false => only players with the custom permission oxide permission will be able to redeem those (doesn't work on autokits). See under.
    description "XXXX XXX"/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 XXX => 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 PERMISSIONNAME
    the permissionname can be a new permission or an existing permission.

    Custom permissions are oxide permissions:
    Code (Text):
    oxide.grant user "PLAYERNAME" PERMISSIONNAME
    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 '/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:
    Code (C#):
    "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:

    Code (C#):
    "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:
    Code (Text):
    "NPC - GUI Kits": {
    "1235439": {
          "description": "Welcome on this server, Here is a list of free kits that you can get <color=red>only once each</color>\n\n                      <color=green>Enjoy your stay</color>",
          "kits": [
            "kit1",
            "kit2"
          ]
        },
        "8753201223": {
          "description": "<color=red>VIPs Kits</color>",
          "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:
    Code (Text):
    {
      "NPC - GUI Kits": {
        "0": {
          "description": "<color=green>Chat Kits</color>",
          "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.

    GUI - Custom 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)

    Code (Text):
      "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 <SteamID> Kit name <Date & time>

    Default Example Configs in:
    oxide/config/Kits.json
    Code (Text):

    {
      "NPC - GUI Kits": {
        "1235439": {
          "description": "Welcome on this server, Here is a list of free kits that you can get <color=red>only once each</color>\n\n                      <color=green>Enjoy your stay</color>",
          "kits": [
            "kit1",
            "kit2"
          ]
        },
        "8753201223": {
          "description": "<color=red>VIPs Kits</color>",
          "kits": [
            "kit1",
            "kit3"
          ]
        }
    }
     
    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:
    Code (Text):
    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:
    Code (Text):
    object theanswer = Interface.CallHook("isKit", KITNAME);

    Images

    1. CustomBackground.PNG
    2. logEntries.PNG
    3. logging.PNG
    4. Cooldown and Max Changes.PNG
    5. AutoCenter Less then 10.PNG
    6. InGameAddKits.PNG
    7. ShowAllKits Mode.PNG
    tcdanny, Madmax72, sektor224 and 42 others like this.