Don't you love the thrill when scratching scratch cards free? I personally think that these addictive little lottery-style cards are way too awesome to forget about them in Minecraft. As a result, I've created these neat, highly addictive and never-seen-before scratchies for your server and your players!
Why using this plugin? This plugin has got lots of options for your perfect experience:
- A map will be your scratch card!
- Control the coin on the map with your mouse (It works like an ingame gyrosensor)!
- Items and commands which will be triggered as prizes!
- Change the design of the scratch card!
- Change the scratch card item!
- Now with multiple scratch cards support!
- Extremely easy to use for players (without confusing commands)
- Option to hook into Vault to buy scratch cards (With a definable price)
- Highly customizable prize list: define the items which can be won by scratching and also their chance (A diamond is more rare than dirt, huh? )
- Define the blank chance: What's the probability to lose and don't win anything?
- Most of the messages are also customizable: Translate them in any language you want!
- Titles! When a scratch card is completely scratched, a customizable title appears (of course two different ones: One title when winning, the other one when losing)
- Planned: Change the design of the scratch card
Here are all commands and permissions listed.
- /scratch <playername>: Give yourself or an online player a scratch card
Permission: "scratch.command" - /scratch help: Display help ingame - this command displays everything with a little explanation
Permission: "scratch.command"
- /scratchconfig: Display the blank chance and every item with its chance. These are also clickable chat messages to edit the winning title message and the chance for each prize!
Permission: "scratch.config" - /scratchconfig blank <number between 0 and 1>: Sets the chance to lose, in percent. 0 means 0% chance to lose, 1 means 100%. As you guessed, 0.5 means 50% and so on
Permission: "scratch.config" - /scratchconfig price <money>: Sets the amount of money the scratch card costs.
Permission: "scratch.config" - /scratchconfig add <chance>: Add the item in your hand to the prize list with a given chance (number). The chance to draw the item is <chance of this item>/<complete chance of every item>. As a result, items with a higher chance will be drawn more frequently.
Permission: "scratch.config" - /scratchconfig addcommand <name> <command> <chance>: Add a command to the prize list. This is completely identical to the item, just with the difference that you don't get an item, but a command will be triggered. Use "<player>" as a tag for the player's name. Example: "/scratchconfig addcommand &6Free_XP! /xp 1 <player> 3" would be a prize with the chance of three, a display name (for the title) called "Free XP!" with a golden color and would give the player one experience.
[new]: If you use the same name again, all the commands registered on the prize will be executed! This means you can execute unlimited commands at once
Permission: "scratch.config" - /scratchconfig winningaction <action>:
- /scratchconfig losingaction <action>:
Winning and losing can now trigger an action - open the spoiler for a list of actions:
Permission: "scratch.config" - /scratchconfig setitem: Changes the scratch card item to the item in your hand (By default the piece of paper). This also takes the name and lore of the item - you can change these with the commands/itemrename name <name> and /itemrename lore <lore>, which will change the item in your hand.
Permission: "scratch.config" - /scratchconfig resetitem: Reset the scratch card item to the paper.
Permission: "scratch.config" - [seasonal] /scratchconfig snow true|false: Let it snow inside the scratch card
Permission: "scratch.config" - /buyscratch: If you have Vault installed, you can also buy scratch cards with a price defined in the config. It is similar to the /scratch command, but it costs money.
Permission: "scratch.buy"
Because lots of people won't need this, the old commands will stay the same and the additional ones will be listed here. So if you don't need this feature, simply skip these commands below. You can design every card individual, just go to the plugin's folder ("ScratchCards"), then to "images" and finally to the folder which is named after the scratch card. Here are all images - change them and you'll see the change ingame after a reload!
- /scratchconfig create <name>: Create a completely new scratch card with the specific name (the default scratch card will still exist with the name "default"). This is the first command you have to execute when using multiple scratch cards.
Permission: "scratch.config" - <any command from the plugin> <name>: Run any command for the specific scratch card. For example if you created a scratch card named "food" and you want to see the prize list, type "/scratchconfig food" and you'll see the list for the specific scratch card. This works also for "/scratch <name>" or "/scratch <playername> <name>", where name is the name of the card.
Permission: depending on the command
Here a quick configuration and setup guide. Some basic information before: There are two factors to customize your prize list - the items inside with their chance and the chance to draw a blank. In the following steps I will explain how to configure both factors:
(1) When you've installed the plugin, you'll need some prizes first of all. To add items which your players can win, type the command "/scratchconfig add <number>". This will add the item in your hand to the prize list with the number as chance.
If you've used "1" as a number, the chance to draw this first item is 1/1 -> 100%.
Now you can add as many items as you want, just keep in mind that the chance to draw the item will shrink! If you add a second item with the command "/scratchconfig add <number>", but this time you use "4" as a number, the chance to draw the first item will be 1/5 (Chance of this item divided by the sum of the chance of every item). This may look a bit complicated, but it is by far the easiest way to have weighted chances.
If you want equal chances for each item, just add them all with the command "/scratchconfig add 1".
Of course you can also add commands, a little explanation is above at the command "/scratchconfig addcommand <command> <chance>".
(2) Now you are happy with the items in your prize list - but you think that your players shouldn't be that lucky with the prizes? Set the chance to draw a blank and to lose! You can do this with the command "/scratchconfig blank <number between 0 and 1>". If you set the blank chance to 0 (-> 0%), every scratch card will be a win. If you set it to 0.5 (->50%), there's a 50% chance to draw a blank.
(3) Do you want to change the design of the scratch card? Maybe your server logo on it? No problem! When loading the plugin for the first time, a folder named "images" will appear in the "ScratchCards" folder in your "plugins" folder (Yes, many folders ). Inside you can find every image which will be used by the plugin, for example the background, the gray scratching area, the present image and the bomb image. You can modify them as you want, just keep in mind that the resolution and the name is still the same. Also you can't change the position of the scratching area, it is fixed. But now customize it how you want, for every theme and every purpose . This is a resource by me which contains customization packs here in Spigot:www.spigotmc.org/resources/13049/
(4) Now you are ready! But what if you want to change the chance of an item or if you want to delete a prize? Write "/scratchconfig" to display your blank chance and your prize list in the chat. In front of the item names are buttons, which can delete, edit or place the item in your inventory.
NEW! With this command, you can also change the winning title message of every prize individually! Simply click on the yellow "[..]" button after executing the command "/scratchconfig" and write the new message in the chat; color codes are supported, too (&1,&2,&3, etc).
(5) Do you want to have a real gambling empire? Maybe you want to add multiple scratch cards, a small tutorial can be found above at the commands section.
Unfortunately, Minecraft has got a bug with rendering maps when switching worlds - as a result the map stops updating and you won't see that your coin moves (https://bugs.mojang.com/browse/MC-46345). But of course I've added a way to warn players about this :
It is not the best solution, but as long as Minecraft won't fix this bug, you'll have to relog that you see the scratch card updating again.
But except this Minecraft bug, the plugin should work flawlessly. Still finding a bug? Please report it, I'll look forward to fix it!
Here are community made videos of the plugin, thanks for these videos :
Any questions left? Post it in the discussion thread, I am looking forward to awnser your questions!
Finally, here are some screenshots
Here you can see how the scratch card works. Sneak and move your head to scratch the area free.
This would be a customized scratch card, which suits a bit better for RPG-themed servers
This is the design by @ASTRACRAFT, which looks really awesome
When losing. The title is customizable.
When winning. This title has also got a placeholder for the item name.
4 presents, this means I won
This one looks more like a blank.
This is the message which will be displayed when entering the command "/scratch help".
Here I'm about to add the Gravity Gun item to the prize list with a chance of 1. The X (red color) in front of every item is the button to delete it, the pencil (orange color) is for changing the chance of the item, and the arrow (green color) is for placing the item in your inventory. You may realize that there is now also a yellow "button" ([..]); by clicking this one you can change the winning title message.
This screenshot has been recorded directly after I executed the command from the picture above.
When typing "/scratchconfig" now, you can see that the Gravity Gun is a part of the prize list. If you hover over the percent number with your mouse, you can see the exact chance (1/21).