Jump to content
  • 0

I Need A Random Item Every 10 Seconds Skript With Blacklisted Items, Messages And it has to be a activated by default


tehthrtreh

Question

6 answers to this question

Recommended Posts

  • 0
Just now, TheCodingDuck_ said:

No need to create another thread 

He just really badly needs it tho 🙂

 

 

1 hour ago, tehthrtreh said:

I Need A Random Item Every 10 Seconds Skript With Blacklisted Items, Messages And it has to be a activated by default

Try this. Untested, but it parsed with no errors via parser.skunity.com
 

options:
	Prefix: &2&l[&a&lRI&2&l]
	BlacklistPerm: Blacklist.Use

command /BlacklistItem [<text>]:
	permission: {@BlacklistPerm}
	permission message: {@Prefix} &cYou don't have permission to execute this command!
	trigger:
		if arg-1 is not set:
			send "&aHow to use%nL%&eHold any item in your hand, then type ""/BlacklistItem Confirm""%nL%&6If an item isn't added in the blacklist, it will add the type of block.%nL%&eOtherwise it will remove the type of block from the blacklist."
		else if arg-1 is "confirm":
			if {RIBlacklist::*} does not contain type of player's held item:
				add type of player's held item to {RIBlacklist::*}
				send "{@Prefix} &aAdded item to blacklist!"
			else:
				remove type of player's held item from {RIBlacklist::*}
				send "{@Prefix} &aRemoved item from blacklist!"
		else:
			send "{@Prefix} &cYou must type ""/BlacklistItem Confirm"" to confirm!"

every 10 seconds:
	loop all players:
		loop 100 times:
			set {_item} to random element out of all items
			if {RIBlacklist::*} does not contain {_item}:
				give loop-player {_item}
				exit loop

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

  • 0

@AgentGamerPro

This Is Great But I Need To Make The Random Items Togglable

expample:

command /toggle:
  trigger:
    if {%player%.random} = true:
      set {%player%.random} to false
      message "&6&l[ &e&lDupeBee&6&l ]&f » &7 You have disabled random items" to player
    else:
      set {%player%.random} to true
      message "&6&l[ &e&lDupeBee&6&l ]&f » &7 You have enabled random items" to player

---------------------------------------------------------------------------

But I also want to have blacklisted items @AgentGamerPro

 

Link to comment
Share on other sites

  • 0
1 hour ago, tehthrtreh said:

@AgentGamerPro

This Is Great But I Need To Make The Random Items Togglable

expample:

command /toggle:
  trigger:
    if {%player%.random} = true:
      set {%player%.random} to false
      message "&6&l[ &e&lDupeBee&6&l ]&f » &7 You have disabled random items" to player
    else:
      set {%player%.random} to true
      message "&6&l[ &e&lDupeBee&6&l ]&f » &7 You have enabled random items" to player

---------------------------------------------------------------------------

But I also want to have blacklisted items @AgentGamerPro

 

literally half the skript is a command where you can blacklist items but ok.

Use this new one

 

options:
	Prefix: &2&l[&a&lRI&2&l]
	BlacklistPerm: Blacklist.Use

command /BlacklistItem [<text>]:
	permission: {@BlacklistPerm}
	permission message: {@Prefix} &cYou don't have permission to execute this command!
	trigger:
		if arg-1 is not set:
			send "&aHow to use%nL%&eHold any item in your hand, then type ""/BlacklistItem Confirm""%nL%&6If an item isn't added in the blacklist, it will add the type of block.%nL%&eOtherwise it will remove the type of block from the blacklist."
		else if arg-1 is "confirm":
			if {RIBlacklist::*} does not contain type of player's held item:
				add type of player's held item to {RIBlacklist::*}
				send "{@Prefix} &aAdded item to blacklist!"
			else:
				remove type of player's held item from {RIBlacklist::*}
				send "{@Prefix} &aRemoved item from blacklist!"
		else:
			send "{@Prefix} &cYou must type ""/BlacklistItem Confirm"" to confirm!"

command /RIToggle:
	trigger:
		set {RIToggled::%player's uuid%} to true if {RIToggled::%player's uuid%} is false, else true
		send "{@Prefix} &eToggled random items to %{RIToggled::%player's uuid%}%"

every 10 seconds:
	loop all players:
		{RIToggled::%loop-player's uuid%} is true
		loop 100 times:
			set {_item} to random element out of all items
			if {RIBlacklist::*} does not contain {_item}:
				give loop-player {_item}
				exit loop

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

  • 0

Post locked. Please open a new post rather than replying to an old thread!

rose city STICKER

RosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaR

i code, animate, develop, UI design, learn, and adapt, as well as make servers, of course

💐Joined Minehut sometime in 2014
💐VIP sometime in 2018
💐Legend in January 2021
💐Helper on 4/11/2021
💐♥ (Retired) on 5/17/2021
💐 Moderator on 8/18/2023

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...