Solved Random item GUI

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

varboosted

Active Member
Apr 20, 2020
50
3
8
24
Hey everyone,

I want to make this that there is a command like /rewards

List of rewards:
Diamond sword sharpness 2
Diamond helmet, Leggings, Boots.

When he execute the command a GUI opens (with tuske or skquery 1.8.8 dev36 skript version)
and then he see an animation of all possible drops and then it stop on one item after a 3 seconds and he can pick it up or something.

thanks everyone!
 
Try this:
Code:
command /rewards:
    trigger:
        set {randomitem_1} to a random element out of {randomitems::*}
        set {randomitem_2} to a random element out of {randomitems::*}
        set {randomitem_3} to a random element out of {randomitems::*}
        set {randomitem_4} to a random element out of {randomitems::*}
        set {randomitem_5} to a random element out of {randomitems::*}
        set {randomitem_6} to a random element out of {randomitems::*}
        open chest with 3 rows named "Rewards" to player
        wait 2 tick
        format slot 4 of player with hopper named "Your Win" to run " "
        format slot 13 of player with {randomitem_1} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_2} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_3} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_4} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_5} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_6} named "&a" to close then run " "
        wait 1 tick
        give {randomitem_6} to player



on load:
    add diamond boots to {randomitems::*}
    add diamond sword to {randomitems::*}
    add diamond helmet to {randomitems::*}
    add diamond leggings to {randomitems::*}
 
  • Like
Reactions: varboosted
Try this:
Code:
command /rewards:
    trigger:
        set {randomitem_1} to a random element out of {randomitems::*}
        set {randomitem_2} to a random element out of {randomitems::*}
        set {randomitem_3} to a random element out of {randomitems::*}
        set {randomitem_4} to a random element out of {randomitems::*}
        set {randomitem_5} to a random element out of {randomitems::*}
        set {randomitem_6} to a random element out of {randomitems::*}
        open chest with 3 rows named "Rewards" to player
        wait 2 tick
        format slot 4 of player with hopper named "Your Win" to run " "
        format slot 13 of player with {randomitem_1} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_2} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_3} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_4} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_5} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_6} named "&a" to close then run " "
        wait 1 tick
        give {randomitem_6} to player



on load:
    add diamond boots to {randomitems::*}
    add diamond sword to {randomitems::*}
    add diamond helmet to {randomitems::*}
    add diamond leggings to {randomitems::*}
Works thanks so much!
[doublepost=1622137418,1622136883][/doublepost]
Try this:
Code:
command /rewards:
    trigger:
        set {randomitem_1} to a random element out of {randomitems::*}
        set {randomitem_2} to a random element out of {randomitems::*}
        set {randomitem_3} to a random element out of {randomitems::*}
        set {randomitem_4} to a random element out of {randomitems::*}
        set {randomitem_5} to a random element out of {randomitems::*}
        set {randomitem_6} to a random element out of {randomitems::*}
        open chest with 3 rows named "Rewards" to player
        wait 2 tick
        format slot 4 of player with hopper named "Your Win" to run " "
        format slot 13 of player with {randomitem_1} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_2} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_3} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_4} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_5} named "&c..." to run " "
        wait 5 tick
        format slot 13 of player with {randomitem_6} named "&a" to close then run " "
        wait 1 tick
        give {randomitem_6} to player



on load:
    add diamond boots to {randomitems::*}
    add diamond sword to {randomitems::*}
    add diamond helmet to {randomitems::*}
    add diamond leggings to {randomitems::*}
Is it possible to do for example /rewards %player% and it will open it to him?
 
Status
Not open for further replies.