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 Upgrading System problem

Discussion in 'Skript' started by WiebeHero, Sep 28, 2017.

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

    WiebeHero Active Member

    Joined:
    Aug 23, 2017
    Messages:
    135
    Likes Received:
    5
    Hello everyone i am WiebeHero and i made an upgrading system for well my server that im creating but i got a few questions for you guys here is the code that i have now:
    on inventory click:
    if name of item is "&7Stone Club [Lv 1]":
    if the 6th line of lore of item contains "&7Upgrade Progress: 0 / 2":
    if player has 2 stone hoe:
    remove 1 stone hoe from player's inventory
    give player a stone hoe named "Stone Club [Lv 1]"
    set the 1st line of lore of the player's tool to "&7Confusion I"
    set the 2nd line of lore of the player's tool to "&7---------------------"
    set the 3rd line of lore of the player's tool to "&7Attack Damage: 8"
    set the 4th line of lore of the player's tool to "&7Attack Speed: 0.4"
    set the 5th line of lore of the player's tool to "&7---------------------"
    set the 6th line of lore of the player's tool to "&7Upgrade Progress: 1 / 2"
    set the 7th line of lore of the player's tool to "&7Rarity: Common"
    set {_damage} to 8
    set {_speed} to -3.6
    add "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:%{_damage}%,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:""mainhand""},{AttributeName:""generic.attackSpeed"",Name:""generic.attackSpeed"",Amount:%{_speed}%,Operation:0,UUIDLeast:8055,UUIDMost:772149,Slot:""mainhand""}]}" to nbt of player's tool

    So thats the code and here is what i still want it to do and what the issue is:
    1. I know the give command and how to change its name but i dont know how to set specific lore lines to it set the 1st line of lore of the player's tool to doesnt work sadly.
    2. Does anyone know how i can get the unbreakable tag? XD
    3. It would be handy to know a command to remove this anoying nbt with tags like for 'Combat' or "when in main hand" and that kind of stuff.
    So can anyone help me with this? would be much appericiated!

    Best regards,

    WiebeHero
     
  2. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    To signify a new line in the lore use ||

    So for example:
    Code (Skript):
    1. set lore of whatever to "this is line 1||this is line 2"
    2.  
    3. #to have a space between the lines
    4. set lore of whatever to "this is line 1||||this would be line 3"
     
  3. WiebeHero

    WiebeHero Active Member

    Joined:
    Aug 23, 2017
    Messages:
    135
    Likes Received:
    5
    Thank you!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...