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 equip and add does not work not work

Discussion in 'Skript' started by Ierdyr, Mar 23, 2019.

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

    Ierdyr Member

    Joined:
    Mar 18, 2019
    Messages:
    14
    Likes Received:
    0
    Full Code:
    command /starter-pack [<player>]:
    trigger:
    if arg-1 is not set:
    send "&6Buy&7>>&6%player% &7vil gerne købe &5&lSpecial Edition &5&lStarter Bundle" to all players
    if arg-1 is set:
    if {op.%player%} is true:
    equip arg-1 with diamond helmet of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    equip arg-1 with iron chestplate of protection 3 and unbreaking 1 named "&5&lStarter Bundle"
    equip arg-1 with iron leggings of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    equip arg-1 with diamond boots of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    add 1 of diamond sword of sharpness 1 to arg-1's inventory named "&5&lStarter Bundle"
    add 1 of diamond pickaxe of efficiency 3 and unbreaking 3 to arg-1's inventory named "&5&lStarter Bundle"
    add 384 of obsidian to arg-1's inventory named "&5&lStarter Bundle"
    send "&6Kit &7Du modtog kittet &5&lStarter&7-&5&lBundle" to arg-1
    send "&7Du gav kittet &5&lStarter&7-&5&lBundle &7til &6%arg-1%" to player



    Code (Skript):
    1. command /starter-pack [<player>]:
    2. trigger:
      if arg-1 is not set:
      send "&6Buy&7>>&6%player% &7vil gerne købe &5&lSpecial Edition &5&lStarter Bundle" to all players
      if arg-1 is set:
      if {op.%player%} is true:
      equip arg-1 with diamond helmet of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
      equip arg-1 with iron chestplate of protection 3 and unbreaking 1 named "&5&lStarter Bundle"
      equip arg-1 with iron leggings of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
      equip arg-1 with diamond boots of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
      add 1 of diamond sword of sharpness 1 to arg-1's inventory named "&5&lStarter Bundle"
      add 1 of diamond pickaxe of efficiency 3 and unbreaking 3 to arg-1's inventory named "&5&lStarter Bundle"
      add 384 of obsidian to arg-1's inventory named "&5&lStarter Bundle"
      send "&6Kit &7Du modtog kittet &5&lStarter&7-&5&lBundle" to arg-1
      send "&7Du gav kittet &5&lStarter&7-&5&lBundle &7til &6%arg-1%" to player
    Errors on Reload:
    https://imgur.com/nLmpOuj


    Code (Skript):

    Console Errors: (if applicable)

    Code (Skript):
    1. Error here
    Other Useful Info:

    Addons using (I don't know where to find versions but my server is running 1.8 ):
    skRayfll SkQuery
    Troubleshooting:

    Have you tried searching the docs?Yes
    Have you tried searching the forums? Yes
     
  2. Ouma Shu

    Ouma Shu Member

    Joined:
    Dec 25, 2017
    Messages:
    45
    Likes Received:
    2
    Please, format your code, it's hard to understand.
    But, if I understood good, you need something like this:

    Code (Text):
    1. set {_helmet} to diamond helmet named "&5&lStarter Bundle"
    2. enchant {_helmet} with protection 2
    3. enchant {_helmet} with unbreaking 1
    4. set executor's helmet to {_helmet}
    Obviously, do it with other parts of player's armour.
     
  3. Ierdyr

    Ierdyr Member

    Joined:
    Mar 18, 2019
    Messages:
    14
    Likes Received:
    0
    Code (Text):
    1. command /starter-pack [<player>]:
    2. trigger:
    3. if arg-1 is not set:
    4. send "&6Buy&7>>&6%player% &7vil gerne købe &5&lSpecial Edition &5&lStarter Bundle" to all players
    5. if arg-1 is set:
    6. if {op.%player%} is true:
    7. equip arg-1 with diamond helmet of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    8. equip arg-1 with iron chestplate of protection 3 and unbreaking 1 named "&5&lStarter Bundle"
    9. equip arg-1 with iron leggings of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    10. equip arg-1 with diamond boots of protection 2 and unbreaking 1 named "&5&lStarter Bundle"
    11. add 1 of diamond sword of sharpness 1 to arg-1's inventory named "&5&lStarter Bundle"
    12. add 1 of diamond pickaxe of efficiency 3 and unbreaking 3 to arg-1's inventory named "&5&lStarter Bundle"
    13. add 384 of obsidian to arg-1's inventory named "&5&lStarter Bundle"
    14. send "&6Kit &7Du modtog kittet &5&lStarter&7-&5&lBundle" to arg-1
    15. send "&7Du gav kittet &5&lStarter&7-&5&lBundle &7til &6%arg-1%" to player
     
  4. Ouma Shu

    Ouma Shu Member

    Joined:
    Dec 25, 2017
    Messages:
    45
    Likes Received:
    2
    Yes, I know what's your code, can you try the code that I wrote for you?
     
  5. Ierdyr

    Ierdyr Member

    Joined:
    Mar 18, 2019
    Messages:
    14
    Likes Received:
    0
    Yes but not now. I don’t have access to a computer right now sorry.
    --- Double Post Merged, Mar 26, 2019, Original Post Date: Mar 24, 2019 ---
    Thank you so much!
    It worked!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...