Jump to content

Easily customizable Random Item script


Underachievers

Recommended Posts

options:
	#these items will not be selected, ever
	blacklistblocks: bedrock, dragon egg, and end portal frame
	#change this to true if you'd like everyone online to get the same item
	#**only accepts true and false**
	sameitem: false
	#change this to the number of seconds you'd like it to wait to give out an item
	timeinseconds: 30

every {@timeinseconds} seconds:
	set {_item} to random item out of all items
	if {@sameitem} = false:
		loop all players:
			while {@blacklistblocks} contains {_item}:
				set {_item} to random item out of all items
			add 1 of {_item} to inventory of loop-player
	else if {@sameitem} = true:
		while {@blacklistblocks} contains {_item}:
			set {_item} to random item out of all items
		add 1 of {_item} to inventory of all players

Pretty self explanatory, reply here or DM me on discord at @DanielK#0605 for further info.

Suggestion for items to blacklist: debug sticks, ender gateways, structure void, void air, jigsaw blocks, bedrock, barriers, spawners, chain command blocks, repeating command blocks, and command blocks.

Edit: Potted items, banners, and certain signs seem to be bugged and will not give anything, to prevent this you could put them in your blacklist.

Edited by Underachievers
Blacklist Suggestions
  • Confused 1
Link to comment
Share on other sites

  • 1 year later...
21 hours ago, helpmewiththisserv said:

@DanielK#0605 i cant dm you and where do i put the skript???!

Install a plugin named Script, go to the file manager /plugins/Skript/scripts create a file , name it whatever you want than put .sk after the name that you chosen, open the file and paste the script from this page.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...