A simple scratch off plugin. Create scratch off tickets and give rewards to the winners. To win you have to find 5 winning items in a row or a column.
Command: /scratchwin give playername scratchname
Code (YAML):
scratch:
scratch1:
guiname: "#11A700Win 50$!" mainitem: PAPER
mainname: "#1BFF0050$ ScratchWin Ticket" mainlore: "#8BFF94Right click to play the scratch win game" secretitem: DIRT
secretitemname: "#FF18FBClick to see whats underneath" loseitem: COAL
loseitemname: "#8686860$" winitem: DIAMOND
winitemname: "#00E7FF50$" ##this is the chance of a single spot. winning chance can be calculated with 1 - (1 - X^5)^10 formula. x=winitemchance winitemchance: 0.8
enditem: BEDROCK
enditemname: "#00FF23Congratulations!" fillglass: GRAY_STAINED_GLASS_PANE
wincommand: "eco give %player% 50" scratch2:
guiname: "#FFC100Win 100$!" mainitem: PAPER
mainname: "#FFC100100$ ScratchWin Ticket" mainlore: "#FFF293Right click to play the scratch win game" secretitem: DIRT
secretitemname: "#FF585CClick to scratch" loseitem: COAL
loseitemname: "#8D8D8D0$" winitem: GOLD_INGOT
winitemname: "#FFDF00100$" winitemchance: 0.6
enditem: BARRIER
enditemname: "#FFA200Congratulations!" fillglass: YELLOW_STAINED_GLASS_PANE
wincommand: "eco give %player% 100" othersettings:
scratchmenu: "#9800FFScratch Win &8- %guiname%" menuclose: ##if true scratchwin menu will automatically close after the game has ended willclose: true
##how many seconds will pass for menu to close after the game has ended inseconds: 5
plprefix: "#00FF9DScratchWin &8| " permissions:
give: scratchwin.give
reload: scratchwin.reload
use: scratchwin.use
messages:
reloaded: "#00FF04Scratchwin configuration has been reloaded." notonline: "#FF0000This player is not online." noscratch: "#FF0000There is no such scratchwin." invalidargs: "#FF0000Please provide valid arguments." nopermforreload: "#FF0000You don't have permission to use this command." nopermtouse: "#FF0000You don't have permission to use scratchwins." oldticket: "#FFDF00This is an old scratchwin ticket and cannot be used right now." scratchgiven: "#00FF04You succesfully gave a scratchwin ticket to #2AFF00%player%" scratchreceived: "#00FF04You received a scratchwin ticket." fullinventory: "#FFDF00Dropped scratchwin ticket on the ground because the inventory is full."