LuckyDrink
LuckyDrink
NOTE: This plugin requires Java 8.

This plugin allow a player to purchase a lucky drink using his/her ingame $, Tokens (from TokenEnchant), Exp, ExpLevel or even items. Once the drink is purchased, a player can drink it to see whether s/he was lucky! If s/he were lucky, you will get rewards! Server owners can set various type s of rewards in the form of command execution (rewarding more $, Tokens, exp, or even items).

This plugin provides a command do issue a lucky drink. You may need to use other plugins like DeluxeMenus, ChestCommand to create your own GUI shop so that players can purchase your lucky drinks through a nice GUI.

Video demo:
Coming soon....

Commands: (alias: /ld)
  • /luckydrink help : displays the help menu
  • /luckydrink reload : reloads config.yml
  • /luckydrink give <player> <n:drinkname> <c:cost> <a:amount> <ch:winchance> <l:gainlore> <cmd:command>" : gives <player> a lucky drink whose name is "drinkname", and cost is "cost", amount is "amount", the chance of getting lucky is "winchance", the lore on the drink is "gainlore", and the command being executed upon being lucky is "command".

    For instance:

    >/ld give vk2gpz n:Gamble<s>Tokens! c:60Token a:1 ch:60 l:Let's<s>see! cmd:te<s>give<s>vk2gpz<s>1500

    Will give the player "vk2gpz" 1 drink with the 60% chance of being lucky and it will cost 60 Tokens. If vk2gpz is lucky when he drinks this, the command "te give vk2gpz 1500" will be executed.

  • <c:cost> section supports:
    • $ -> c:50$
    • Token -> c:60Token
    • Exp -> c:15exp
    • ExpLevel -> c:2explvl
    • Item -> c:3DIAMOND_BLOCK (meaning it will cost 3 diamond blocks.)
      Or c: 4GOLDEN_APPLE1 (meaning it will cost 4 enchanted gapples.)
Permissions:
  • luckydrink.reload : allows you to use /ld reload command
  • luckydrink.admin : allows you to use /ld give command

NOTE: in order to place "space" in lucky drink's command, you can use "<s>", which will be replaced with " ".


Sample config using DeluxeMenus:
Code (Text):
menu_title: '&fLucky Dring &aGUI menu'
open_command: ldgui
size: 9
items:
'1':
material: POTION
data: 8193
slot: 0
display_name: '&aGamble away your $$$'
lore:
- '&aYou can purchase the lucky drink'
- '&aYou might get lucky!'
- '&aPrice: &e$50'
left_click_commands:
- '[console] eco give %player_name% 50'
- "[console] ld give %player_name% n:Gamble<s>$$$! c:50$ a:1 ch:40 l:Let's<\
s>see! cmd:eco<s>give<s>%player_name%<s>3000"
- '[close]'
right_click_commands:
- '[console] eco give %player_name% 50'
- "[console] ld give %player_name% n:Gamble<s>$$$! c:50$ a:1 ch:40 l:Let's<\
s>see! cmd:eco<s>give<s>%player_name%<s>3000"
- '[close]'
'2':
material: POTION
data: 8227
slot: 1
display_name: '&aGamble away your Token!'
lore:
- '&aYou can purchase the lucky drink'
- '&aYou might get lucky!'
- '&aPrice: &e60 tokens'
left_click_commands:
- '[console] te add %player_name% 60'
- "[console] ld give %player_name% n:Gamble<s>Tokens! c:60Token a:1 ch:60 l\
:Let's<s>see! cmd:te<s>give<s>%player_name%<s>1500"
- '[close]'
right_click_commands:
- '[console] te add %player_name% 60'
- "[console] ld give %player_name% n:Gamble<s>Tokens! c:60Token a:1 ch:60 l\
:Let's<s>see! cmd:te<s>give<s>%player_name%<s>1500"
- '[close]'
'3':
material: POTION
slot: 2
display_name: '&aGamble away your Exp!'
lore:
- '&aYou can purchase the lucky drink'
- '&aYou might get lucky!'
- '&aPrice: &e3 exp'
left_click_commands:
- '[console] exp give %player_name% 1000'
- "[console] ld give %player_name% n:Gamble<s>Exp! c:3exp a:1 ch:60 l:Let's\
<s>see! cmd:exp<s>give<s>%player_name%<s>3000"
- '[close]'
right_click_commands:
- '[console] exp give %player_name% 1000'
- "[console] ld give %player_name% n:Gamble<s>Exp! c:3exp a:1 ch:60 l:Let's\
<s>see! cmd:exp<s>give<s>%player_name%<s>3000"
- '[close]'
'4':
material: POTION
slot: 3
display_name: '&aGamble away your Item!'
lore:
- '&aYou can purchase the lucky drink'
- '&aYou might get lucky!'
- '&aPrice: &e3 Diamond block'
left_click_commands:
- '[console] give %player_name% DIAMOND_BLOCK 4'
- "[console] ld give %player_name% n:Gamble<s>Items! c:3DIAMOND_BLOCK a:1 c\
h:60 l:Let's<s>see! cmd:give<s>%player_name%<s>DIAMOND_BLOCK<s>10"
- '[close]'
right_click_commands:
- '[console] give %player_name% DIAMOND_BLOCK 4'
- "[console] ld give %player_name% n:Gamble<s>Items! c:3DIAMOND_BLOCK a:1 c\
h:60 l:Let's<s>see! cmd:give<s>%player_name%<s>DIAMOND_BLOCK<s>10"
- '[close]'
Installation:
Just install LuckyDrink.jar in the plugin folder. Then you can either "restart the server" or "reload the plugin.

Configuration:

Latest reviews

Pretty good plugin for my server! Thanks for this <3
BlackSpigot General Chat
Rules Help Users
    D @ devicedeals: how do i post threads in the rss forum
    Top