Enchanting Items

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

GToTheG

Member
Jan 26, 2017
35
0
8
23
Hello. Is it possible to when you are clicking an diamond sword with an enchanted unbreaking 1 book, the diamondsword gets enchanted with unbreaking 1 and the book gets removed?

I came up with this, but no luckc:

code_language.skript:
On inventory click:
    set {_item2} to cursor item
    if {_item2} is enchanted book:
        if clicked item is diamond sword:
            set {_item1} to clicked item
            enchant {_item1} with unbreaking 1
            remove {_item2} from player's inventory
 
Status
Not open for further replies.