1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Giving player a item from a variable

Discussion in 'Skript' started by ImKingGolden, Feb 21, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. ImKingGolden

    ImKingGolden Member

    Joined:
    Aug 11, 2020
    Messages:
    21
    Likes Received:
    1
    I made a Crate skript and im trying to get it so they can get a reward from the variable instead of making a long list. Any help

    on right click on barrier:
    if player's held item is tripwire hook:
    if name of tool is "&aMiner Key":
    cancel event
    open virtual chest inventory with size 5 named "&aMiner Crates..." to player
    format gui slot integers between 0 and 45 of player with purple stained glass pane named " " to do nothing
    set {MinerCrate::%player's uuid%} to random text of "32 Cobblestone", "32 Stone", and "64 Stone"
    send "&aYou got %{MinerCrate::%player's uuid%}%"
    set {_reward} to {MinerCrate::%player's uuid%}
    give player {_reward}

     
  2. Best Answer:
    Post #4 by Nikd0, Feb 22, 2021
  3. Time4Games

    Time4Games Active Member

    Joined:
    Jul 25, 2020
    Messages:
    196
    Likes Received:
    4
    you want to parse the variable as an item and not a text
     
  4. ImKingGolden

    ImKingGolden Member

    Joined:
    Aug 11, 2020
    Messages:
    21
    Likes Received:
    1
    Thanks ill check it out tomorrow
     
  5. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
  6. ImKingGolden

    ImKingGolden Member

    Joined:
    Aug 11, 2020
    Messages:
    21
    Likes Received:
    1
    can you show me an example sorry
     
  7. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    what about the thread i linked?
     
  8. ImKingGolden

    ImKingGolden Member

    Joined:
    Aug 11, 2020
    Messages:
    21
    Likes Received:
    1
    Sorry i didn't see it, its helps alot thanks :emoji_grinning:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...