Modify Item Flags with Skript

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

Goose

Supporter
Nov 23, 2019
439
33
28
Hey everybody! So my friend has a Minehut server (which recently had updated to 1.15) so I'm skripting an Item Editor plugin for him because he doesn't have one. I wanna know how to modify item flags with Skript, keep in mind I cannot use skript-mirror because Minehut hasn't added skript-mirror because its Minehut. Any help please?


Code:
command /edit:
    permission: argon.edit
    permission message: You do not have permission to execute this command!
    trigger:
        set {_item} to player's tool
        open virtual chest with 3 rows named "&aItem Editor" to player
        format gui slot 0 of player with gray stained glass pane named ""
        format gui slot 1 of player with gray stained glass pane named ""
        format gui slot 2 of player with gray stained glass pane named ""
        format gui slot 3 of player with gray stained glass pane named ""
        format gui slot 4 of player with gray stained glass pane named ""
        format gui slot 5 of player with gray stained glass pane named ""
        format gui slot 6 of player with gray stained glass pane named ""
        format gui slot 7 of player with gray stained glass pane named ""
        format gui slot 8 of player with gray stained glass pane named ""
#second row
        format gui slot 9 of player with gray stained glass named ""
        format gui slot 10 of player with anvil named "&aRename Item" to close then run:
        set {_naming.%uuid of player%} to true
        send "&aSay the name that you want your item to have!"
        format gui slot 11 of player with book and quill named "&aSet Lore" to close then run:
            open virtual chest with 1 row named "&aSet Lore" to player
            format gui slot 0 of player with gray stained glass pane named ""
            format gui slot 1 of player with paper named "&aEdit Line 1" to close then run:
                set {_lore1.%uuid of player%} to true
                send "&aSay the lore that you want your item to have!"
            format gui slot 2 of player with gray stained glass pane named ""
            format gui slot 3 of player with paper named "&aEdit Line 2" to close then run:
                set {_lore2.%uuid of player%} to true
                send "&aSay the lore that you want your item to have!"
            format gui slot 4 of player with gray stained glass pane named ""
            format gui slot 5 of player with paper named "&aEdit Line 3" to close then run:
                set {_lore3.%uuid of player%} to true
                send "&aSay the lore that you want your item to have!"
            format gui slot 6 of player with gray stained glass pane named ""
            format gui slot 7 of player with paper named "&aEdit Line 4" to close then run:
                set {_lore4.%uuid of player%} to true
                send "&aSay the lore that you want your item to have!"
            format gui slot 8 of player with gray stained glass pane named ""
        format gui slot 13 of player with {_item}

on chat:
    if {_naming.%uuid of player%} is true:
        cancel event
        set {_itemname} to message
        set {_naming.%uuid of player%} to false
        set name of {_item} to "%{_itemname}%"
    if {_lore1.%uuid of player%} is true:
        cancel event
        set {_lore1} to message
        set {_lore1.%uuid of player%} to false
        set 1st line of lore of {_item} to "%{_lore1}"
    if {_lore2.%uuid of player%} is true:
        cancel event
        set {_lore2} to message
        set {_lore2.%uuid of player%} to false
        set 2nd line of lore of {_item} to "%{_lore2}"
    if {_lore3%uuid of player%} is true:
        cancel event
        set {_lore3} to message
        set {_lore3.%uuid of player%} to false
        set 3rd line of lore of {_item} to "%{_lore3}"
    if {_lore4.%uuid of player%} is true:
        cancel event
        set {_lore4} to message
        set {_lore4.%uuid of player%} to false
        set 4th line of lore of {_item} to "%{_lore4}"
 
What exactly are you looking to do?
All you have said is "modify item flags" ... then you sent 67 lines of code with absolutely no explanation of what you're trying to do.
 
What exactly are you looking to do?
All you have said is "modify item flags" ... then you sent 67 lines of code with absolutely no explanation of what you're trying to do.
I wanted to know how to change an item, for example, making an item that can lose durability unbreakable. I basically wanted to change NBT like {Unbreakable:1b} to {Unbreakable:0b} & stuff. Hopefully you understand what im saying
 
Status
Not open for further replies.