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.

Names of Items Inside Chests

Discussion in 'Skript' started by TotaledToast, Jan 18, 2021.

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

    TotaledToast Member

    Joined:
    Jan 18, 2021
    Messages:
    1
    Likes Received:
    0
    Hola,
    I'm in the early parts of making a quest skript which involves villager dialogue. This should work by having the names of items in a chest below the villager be messaged to the player. It all works except the line which sets the message to the player "set {QuestText} to name of {_qitem}", any fixes or things Im overlooking would be welcome.

    It currently doesn't set {QuestText} even though i have tested setting {QuestText} as other variables which works.
    Also yes i have checked {_qitem}, it the right item in the chest

    Full Skript:
    Code (Text):
    1. on right click on villager:
    2.     if block 4 down block at clicked entity is chest:
    3.         set {_qc} to block 4 down block at clicked entity
    4.         set {_qslot} to 0
    5.         loop 10 times:
    6.             set {_qitem} to slot {_qslot} of {_qc}'s inventory
    7.             set {_qslot} to {_qslot} + 1
    8.             If lore of {_qitem} contains "Dialogue":
    9.                 set {QuestText} to name of {_qitem}
    10.                 message {_qitem} to player
    11.                 message "%{QuestText}%" to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...