Sudo commands with a random conditional!
This plugin provides you 2 commands to make other users (or the console) to execute commands with a random conditional.
Let's say you have the Votifier installed in your server and you want to give a 10% of probability to give a special reward, like 1000 coins! You can use this plugin and run the following command:
- /executeRandomly @ 0.1 coins give PLAYER 1000
You want to run another command if the user is unlucky and give him 50 coins if he doesn't receive the 1000 coins? You can use this:
- /executeRandomly @ 0.1 coins give PLAYER 1000 @ELSE coins give PLAYER 50
The parameter @ELSE is totatlly optional, but what about if you want to run commands in chain? We have a second command, more advanced to write your logic in JSON, we recommend you to
visit the wiki for more information, but here you go a sample of what you can do with this command:
- /executeRandomlyJSON {probability:0.15,commandIfSuccess:[{executeAs:"@",command:"money give PLAYER 10"},{executeAs:"PLAYER",command:"say I WON THE LOTTERY!"}],commandIfUnsuccess:[{executeAs:"@",command:"money take PLAYER 1"}]}
This command will execute
/money give PLAYER 10 and
/say I WON THE LOTTERY! with a 15% of probability. If the user is unlucky and the probability is unsuccess, will run instead
/money take PLAYER 1
Permissions
This plugin doesn't give permissions by default, and you can check the permissions of every command
visiting the wiki here.
Donators
I would like to appreciate _Bumble_ for his donation, who made possible this plugin!