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 item and lore

Discussion in 'Skript' started by SoMuchWessel, Sep 7, 2018.

Thread Status:
Not open for further replies.
  1. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Hello guys,
    Is there a way to give a player a item and give the given item a lore?
    Like:

    Code (Skript):
    1.         give a dirt to player
    2.         set the 1nd line of the lore of the given item to "test"
    And i know about the codeline: Give the player a dirt with lore "test", but that is not what i want here

     
  2. Best Answer:
    Post #7 by ShaneBee, Sep 7, 2018
  3. Harvey

    Harvey Member

    Joined:
    Jan 16, 2018
    Messages:
    18
    Likes Received:
    0
    Hey, of course there is here is the code:
    Code (Skript):
    1. set line 1 of the lore of player's tool to "test"
    --- Double Post Merged, Sep 7, 2018, Original Post Date: Sep 7, 2018 ---
    Sorry, just pulled the line from one of my skripts, changed it just in case.
     
  4. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    That is not what i mean. I will give an example.

    If a player does the command /test, he will get a dirt. And i want that after he got the dirt, the dirt will get a lore with "test".
    But i can not do something like: set the 1nd line of the lore of the given item to "test"
     
  5. Harvey

    Harvey Member

    Joined:
    Jan 16, 2018
    Messages:
    18
    Likes Received:
    0
    Here:
    Code (Skript):
    1. command /dirt:
    2.     trigger:
    3.         give a dirt with lore "test" to player
    4.        
     
  6. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    The problem with that is that if i have multiple different items, that i need to add
    Code (Skript):
    1. with lore "test"
    to every one of them, which is kinda a pain
     
  7. Harvey

    Harvey Member

    Joined:
    Jan 16, 2018
    Messages:
    18
    Likes Received:
    0
    Tbh at this point I don't know what you are talking about. You asked for "Is there a way to give a player a item and give the given item a lore?" and I have literally spoon fed it too you. What more can I give you. If you want the player to get more items add them below in the same format. If you want more lines on the lore (another line under the top one) add more. It's really not hard.
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Code (Skript):
    1. set {_item} to dirt
    2. set 1st line of lore of {_item} to "SOME LORE HERE"
    3. give player 1 of {_item}
     
  9. Harvey

    Harvey Member

    Joined:
    Jan 16, 2018
    Messages:
    18
    Likes Received:
    0
    That's no different to what I gave him.
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Its totally different

    Your way is setting the lore of the tool the player already has

    Mine is ... creating an item, adding lore to it, THEN giving it to the player
     
  11. Harvey

    Harvey Member

    Joined:
    Jan 16, 2018
    Messages:
    18
    Likes Received:
    0
    The player gets the item with the lore, it's in the same line of code. There is not a way to avoid getting the lore on the item.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...