Solved cant change enchantment level

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

Haloxx

Member
May 2, 2021
20
0
1
23
im trying to make a ultra hardcore minecraft but i cant get this to work

Code:
on script load:
  set {hardcorelevel} to 1

command /ultramc <boolean>:
  permission: op
  permission message: You do not have permission to do this!
  trigger:
    if arg-1 is on:
      set {ultramcstate} to true
    if arg-1 is off:
      set {ultramcstate} to false

on spawn:
  if {ultramcstate} is true:
    if event-entity isn't a player:
      set event-entity's helmet slot to diamond helmet of protection {hardcorelevel}  # problem
      set event-entity's chestplate slot to diamond chestplate of protection {hardcorelevel}  # problem
      set event-entity's legging slot to diamond leggings of protection {hardcorelevel}  # problem
      set event-entity's boot slot to diamond boots of protection {hardcorelevel}  #problem
      set event-entity's weapon to diamond sword of sharpness {hardcorelevel}  #problem



command /ultramclevel <number>:
  permission: op
  permission message: You do not have permission to do this!
  trigger:
    set {hardcorelevel} to arg-1
    message "%{hardcorelevel}%" to player

im getting this error

upload_2021-8-11_14-10-48.png
 
Code:
on damage:
    set {_ench} to ("protection %{hardcorelevel}%" parsed as enchantment)
    set victim's helmet slot to diamond helmet of {_ench}
something like this maybe?
 
Code:
on damage:
    set {_ench} to ("protection %{hardcorelevel}%" parsed as enchantment)
    set victim's helmet slot to diamond helmet of {_ench}
something like this maybe?

it didnt work, i tried modifying it after trying that but it still wouldnt work
 
Code:
set {_helmet} to "diamond helmet of protection %{hardcorelevel}%" parsed as a item
set event-entity's helmet slot to {_helmet}
 
Last edited:
Status
Not open for further replies.