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 cant change enchantment level

Discussion in 'Skript' started by Haloxx, Aug 11, 2021.

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

    Haloxx Member

    Joined:
    May 2, 2021
    Messages:
    20
    Likes Received:
    0
    im trying to make a ultra hardcore minecraft but i cant get this to work

    Code (Text):
    1. on script load:
    2.   set {hardcorelevel} to 1
    3.  
    4. command /ultramc <boolean>:
    5.   permission: op
    6.   permission message: You do not have permission to do this!
    7.   trigger:
    8.     if arg-1 is on:
    9.       set {ultramcstate} to true
    10.     if arg-1 is off:
    11.       set {ultramcstate} to false
    12.  
    13. on spawn:
    14.   if {ultramcstate} is true:
    15.     if event-entity isn't a player:
    16.       set event-entity's helmet slot to diamond helmet of protection {hardcorelevel}  # problem
    17.       set event-entity's chestplate slot to diamond chestplate of protection {hardcorelevel}  # problem
    18.       set event-entity's legging slot to diamond leggings of protection {hardcorelevel}  # problem
    19.       set event-entity's boot slot to diamond boots of protection {hardcorelevel}  #problem
    20.       set event-entity's weapon to diamond sword of sharpness {hardcorelevel}  #problem
    21.  
    22.  
    23.  
    24. command /ultramclevel <number>:
    25.   permission: op
    26.   permission message: You do not have permission to do this!
    27.   trigger:
    28.     set {hardcorelevel} to arg-1
    29.     message "%{hardcorelevel}%" to player
    30.  
    im getting this error

    upload_2021-8-11_14-10-48.png

     
  2. Best Answer:
    Post #4 by Minecoll_YT, Aug 11, 2021
  3. Ankoki

    Moderator Supporter Addon Developer

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    12
    Code (Text):
    1. on damage:
    2.     set {_ench} to ("protection %{hardcorelevel}%" parsed as enchantment)
    3.     set victim's helmet slot to diamond helmet of {_ench}
    something like this maybe?
     
  4. Haloxx

    Haloxx Member

    Joined:
    May 2, 2021
    Messages:
    20
    Likes Received:
    0
    it didnt work, i tried modifying it after trying that but it still wouldnt work
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Code (Text):
    1. set {_helmet} to "diamond helmet of protection %{hardcorelevel}%" parsed as a item
    2. set event-entity's helmet slot to {_helmet}
     
    #4 Minecoll_YT, Aug 11, 2021
    Last edited: Aug 11, 2021
  6. Haloxx

    Haloxx Member

    Joined:
    May 2, 2021
    Messages:
    20
    Likes Received:
    0
    Thanks! It worked
     
Thread Status:
Not open for further replies.

Share This Page

Loading...