Suggested Name: Christmas Gift Fun! What I want: Whenever a person does /christmas gift, they get a random item(s) defined in the config, they can use it (configurable in the config )once a day. With a configurable message in the config. (They only receive one of the items) OPTIONAL! When a person does /christmas gift, it says (Also configurable in the config) '&aAh! The &c&lGrinch&r &ahas stolen your gift!' Default config: Version 0.0.1 By: **** (You!) #How long after every /christmas gift after they can use it (In hours) christmas gift time: 24 #Christmas gifts (-# how many) Christmas gifts: - diamond-10 - diamond_sword-1 #Grinch Message Grinch: '&aAh! The &c&lGrinch&r &ahas stolen your gift!' #The ratio of how times the grinch will steal presents (has to be out of 20) grinch-ratio: 1/20 When I would like this by: Pls either before or at Christmas day, sorry if this is too much :\ I hope someone can do something like this!
I can do this (; /christimas gift - gives random item (given on config), and with a little chance, will steal one random item from player inventory? @EDIT: steal the gift, not a random slot..
rfsantos1996 - I already did this for him with Skript took about 10 mins lubby123 - Here you go This can be done with Skript Code: options: cool-down: 86400 # Cooldown in seconds before players can use this command msg-cooldown: 24 hours # This can be anything, but should be equivilent to the cool-down option (86400 = 24 hours) reward-item: "10 diamond" # Reward for using this command steal-chance: 5% # Chance for the Grinch to steal your reward (5% = 1/20) stolen-msg: &aAh! The &c&lGrinch&r &ahas stolen your gift! # message to send to player if the Grinch steals their reward variables: {Skript.%player%.cooldown} = 0 command /christmas: description: Obtain the Standard PvP Kit usage: /christmas executable by: players aliases: /xmas trigger: if {Skript.%player%.cooldown} is less than or equal to 0: set {Skript.%player%.cooldown} to {@cool-down} give {@reward-item} to player else: message "&cYou may only use this command every &e{@msg-cooldown}" chance of {@steal-chance}: remove {@reward-item} from player's inventory message "{@stolen-msg}" else: message "&cYou may only use this command every {@msg-cooldown}" every 5 second: loop all players: remove 5 from {Skript.%loop-player%.cooldown}
If you need a plugin (case you won't use Skript, I'm still working on it - no, i dont have anything else to do), tell me (; Very nice never saw Skript... seems like an easier way to do a lot of things...
I'm testing the plugin.. And its a way to program things on a server... Its a script, he tells what the server should do.
So install the plugin... and add the script. What is there to test? The script is done. I already made it... Code: options: cool-down: 86400 # Cooldown in seconds before players can use this command msg-cooldown: 24 hours # This can be anything, but should be equivilent to the cool-down option (86400 = 24 hours) reward-item: "10 diamond" # Reward for using this command steal-chance: 5% # Chance for the Grinch to steal your reward (5% = 1/20) stolen-msg: &aAh! The &c&lGrinch&r &ahas stolen your gift! # message to send to player if the Grinch steals their reward variables: {Skript.%player%.cooldown} = 0 command /christmas: description: Obtain the Standard PvP Kit usage: /christmas executable by: players aliases: /xmas trigger: if {Skript.%player%.cooldown} is less than or equal to 0: set {Skript.%player%.cooldown} to {@cool-down} give {@reward-item} to player else: message "&cYou may only use this command every &e{@msg-cooldown}" chance of {@steal-chance}: remove {@reward-item} from player's inventory message "{@stolen-msg}" else: message "&cYou may only use this command every {@msg-cooldown}" every 5 second: loop all players: remove 5 from {Skript.%loop-player%.cooldown}
Dont needed, its done. - Source: GitHub - Download: Dropbox - Permissions: christmas.get - allows you to receive the gift - Commands: /christmas to get the gift, /christmas (anything) to get the remaining itens (if your inventory is full) - Observations: added a chance of getting a item, if you need to change "chances", the whole thing should be 1.0, like: 0.2 diamond_sword 3 0.3 apple 2 0.5 diamond 5 ------------ total of 1.0 And the itens must be writed like this (not case sensitive) In case he didnt want to use the Skript, I was already making it, so I finished... Why not...
Sorry, I'm brazilian and in portuguese, items = itens :/ I made a lang, so you can customize every player message I changed all "itens" on plugin, you can get the .jar on GitHub @EDIT: fixed a important bug: you can get items freely after the first cooldown. Download the new version here and it will be fixed (I tested the fix)