Sorbon Posted February 10, 2020 Share Posted February 10, 2020 (edited) RandomItem Β Plugins needed:SkriptSkRayFallDescription:It gives everyone on the server a random item every X seconds.The time, boss bar and black list can be edited within the skript, just open it with a regular text editor.Features:Timer can be changedBossBar name, color can be changedBlack list for removing items that you do not want to give to people. toggleIf there are any suggestions or bugs, contact me if there are any discrepancies: Sorbon#1337 CODE: #---------------------------------------< Skript made by Sorbon >---------------------------------# options: time: 20 # 5, 10, 15, 20... are the best times, :D bossbar: True # True or False # needs restart bossbarColor: green BossBarName: &aRandom Item in: &7[&c%{_timer}%&7] #---> %{_timer}% is the Timer #------------------------------------------------------------------------# # THe Blacklist, everthing here wont be given to the player! # ps: remove the items here, if you want to give it to the player xD #------------------------------------------------------------------------# Blacklist: bedrock, command block and barrier and stone #------------------------------------------------------------------------------------------------# # Do not edit the code below without knowing what you're doing on load: set {_timer} to 0 create bossbar titled "{@BossBarName}" and id "randomdrop" for all players with progress 100 with colors {@bossbarColor} if "{@bossbar}" = "True" on join: add bossbar "randomdrop" for player if "{@bossbar}" = "True" command /toggle: trigger: if {toggle::%player%} is set: delete {toggle::%player%} send "You are getting Items now!" else: set {toggle::%player%} to true send "You don't get any Items now :c" command /random [<string>]: trigger: if player has permission "random.admin": if arg-1 is "Pause","Break" or "stop": set {break} to true send "&cYou stopped the Countdown" if arg-1 is "continue","unstop" or "start": send "&cYou started the countdown" delete {break} if arg-1 is not set: send "&7------<&aRandomItem by Sorbon&7>------" send "&7-> &aUse &c/random Pause &a| &cStop &ato stop the Countdown!" send "&7-> &aUse &c/random Continue &a| &cStart &ato start the Countdown!" else: send "&7------<&aRandomItem by Sorbon&7>------" send "&7-> &cYou don't have the permissions to use this command!" Every {@time} seconds: set bossbar "randomdrop" value to 100 if "{@bossbar}" = "True" loop 100 times: if {break} is set: set {_timer} to "Paused" set bossbar "randomdrop" title to "{@BossBarName}" if "{@bossbar}" = "True" set bossbar "randomdrop" value to 100 if "{@bossbar}" = "True" stop set {_s} to {@time}/100 wait ("%{_s}% seconds" parsed as timespan) set bossbar "randomdrop" value to (value of bossbar "randomdrop" - 1) if "{@bossbar}" = "True" set {_timer} to ceil({_s} * value of bossbar "randomdrop") if "{@bossbar}" = "True" set bossbar "randomdrop" title to "{@BossBarName}" if "{@bossbar}" = "True" loop all players: while {_bool} is not true: set {_item} to random element out of all items set {_bool} to true if {@Blacklist} does not contain {_item} wait 1 tick give loop-player {_item} if {toggle::%loop-player%} is not set Β RandomItem V 1.2.sk Edited February 14, 2020 by Sorbon Link to comment Share on other sites More sharing options...
xX__Strqfe__Xx Posted February 13, 2020 Share Posted February 13, 2020 (edited) thanks m8! really could use your skript!.Β Edited February 13, 2020 by xX__Strqfe__Xx Link to comment Share on other sites More sharing options...
Theleast47 Posted May 1, 2020 Share Posted May 1, 2020 cool Link to comment Share on other sites More sharing options...
zlbybytheway Posted July 25, 2020 Share Posted July 25, 2020 Cool but, when you do theΒ if player has permission:Β you could just doΒ Β command /random [<string>]: permission: &6LINE ONE%nl%&7LINE TWO trigger: # the rest of the code And also what syntax highlighting do you use for skript? ign: zlby_btw discord: zlby_btw#1349 join date: Dec 2019 Β zlby_btwΒ ||Β 19 DecΒ 2019 [ESCAPED] zlby_btwΒ ||Β 26 AugΒ 2020 zlby_btwΒ ||Β 31 AugΒ 2020 Β Β Link to comment Share on other sites More sharing options...
Croomped Posted August 2, 2020 Share Posted August 2, 2020 Cool, Got the Skript working. Link to comment Share on other sites More sharing options...
poodleoo Posted August 13, 2020 Share Posted August 13, 2020 how do i make it so everyone gets different things Link to comment Share on other sites More sharing options...
RadSow Posted December 4, 2020 Share Posted December 4, 2020 On 5/4/2020 at 3:53 PM, Theleast47 said: had an error. Maybe you didn't install SkRayFall? Link to comment Share on other sites More sharing options...
Untreated Posted December 4, 2020 Share Posted December 4, 2020 Topic Locked. Please don't reply on month-old inactive threads. (necro-posting).Β πππππππππ π»ππ€ππ π£π: @πππ₯π£πππ₯ππ#ππππ News & UpdatesΒ β’Β RulesΒ β’Β Helper Application ReportsΒ β’Β Appeals πππππ ππ πΌππππππ πππππ πΉπππ πΉπΆππ, πΈπΆπΈπΆ Link to comment Share on other sites More sharing options...
Recommended Posts