LootCrate | Server Crate Plugin icon

LootCrate | Server Crate Plugin -----

A plugin to reward your players for voting, donating, and more!



Getting Started
To begin using your LootCrate plugin, you must first have an idea of what you want your crate to be. Some important things to consider are:

  • Crate Name
  • Crate Rewards
  • Crate Key Type
Your crate name should be something that describes what your crate is for. If you want to reward your players for voting, you could call your crate "VoteCrate".

IMPORTANT: All crate names must have no spaces

Now that you have a name for your crate, think about what rewards you want to give your player. Some examples of this could be access to gadgets, money, items, and more.

Finally, you want to come up with a key that can be used to unlock your crate. Most people go with a default Tripwire Hook as it looks the most similar to a real life key.

Crate Setup
Now that you have your idea, lets create this LootCrate!

Begin by issuing the command /lootcrate create <CrateName> - Example: /lootcrate create VoteCrate. This will create the LootCrate object so you can begin editing it.

When this command is issued, you will receive a message via chat that will give you the Crate's autogenerated ID. REMEMBER this key as this is how you will reference your crate from here on out. [​IMG]

Now that we have our LootCrate created, we can actually set it down somewhere. Currently, our LootCrate exists, but players can't access it. To change that, make your player look directly at the block you want to turn into a LootCrate.

TIP: This does not have to be a chest, but most players do use a chest

Issue the command /lootcrate set <CrateID> - Example: /lootcrate set 219 to assign the LootCrate to this block. If you have HolographicDisplays enabled, you will see holograms appear. You can edit these later.

[​IMG]

Now our crate is actually assigned to a block.

TIP: You can assign the same crate to multiple blocks

If you don't like the location of where your LootCrate is, you can always remove it by looking at the LootCrate and issuing the command /lootcrate set none and it will remove that LootCrate from that location.

Finally, we need to add a key to our LootCrate. Hold the key you want to attach to the LootCrate in your hand. You can use the /meta command to edit the key to however you like. Once it is ready to be added, issue the command /lootcrate key <CrateID> <true/false> - Example: /lootcrate key 219 true. The reason for the true/false can be found on the Commands & Permissions Page

TIP: Most players use a Tripwire Hook as a key

Adding Rewards
Now that we have our LootCrate all set up with a location and a key, lets add our rewards.

To add a reward to the LootCrate, we must hold the reward item in our hand and issue the command /lootcrate add <CrateID> <Min> <Max> <Chance> <true/false> - Example: /lootcrate add 219 1 64 50 false Like /lootcrate create, a Reference # will be sent back to us. Save this as it will be used later

Lets break this down:

  • <CrateID> is the Reference # of the LootCrate we want to add our item to
  • <Min> & <Max> are the minimum amount and the maximum amount of the item the player can receive. A random number is chosen between the two and the player will receive that amount of the item
TIP: You can set the MIN and the MAX to the same number to always receive the same amount. For example, if you set the MIN and MAX to 16, then the player will always receive x16 of the item.

  • <Chance> is the % chance a player will receive the item over the other items.
TIP: If you have two rewards, each with a chance of 50, then the player will have a 50% chance of getting either item.

  • <true/false> is if the item should be given AND the command should run, or ONLY the commands should run. If you want the player to receive the item, and commands, set to FALSE. If you want the player to just have the item's commands run (like for $), set to TRUE
If we want to reward the player with an item, always set the <true/false> to false.

For something like a money reward, we don't want the player to receive an item, we only want them to receive the money. This is a situation when we would set the true/false to true

Adding Commands to Our Rewards
Lets go back to that money example. If we want the player to receive money when they receive the money reward, we need to attach a command to the reward. We do this by issuing the command /lootcrate command <CrateID> <ItemID> <Command> - Example /lootcrate command 219 11220 pay {player} 50

TIP: You can use {player} as a placeholder for the player's name

We can add infinite commands to rewards. Remember that all commands will be "issued" by the Console.

Now when the player receives the money reward, they just get $50, but they won't know that because there is no message telling them this. Lets add another command to our item to tell the player they received some money! /lootcrate command 219 11220 message {player} &eYou received &a$50!
Resource Information
Author:
----------
Total Downloads: 32,132
First Release: Dec 24, 2020
Last Update: Today at 4:18 PM
Category: ---------------
All-Time Rating:
77 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings