Names of Items Inside Chests

  • 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.

TotaledToast

Member
Jan 18, 2021
1
0
1
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:
on right click on villager:
    if block 4 down block at clicked entity is chest:
        set {_qc} to block 4 down block at clicked entity
        set {_qslot} to 0
        loop 10 times:
            set {_qitem} to slot {_qslot} of {_qc}'s inventory
            set {_qslot} to {_qslot} + 1
            If lore of {_qitem} contains "Dialogue":
                set {QuestText} to name of {_qitem}
                message {_qitem} to player
                message "%{QuestText}%" to player
 
Status
Not open for further replies.