Solved Enchanting Table

  • Thread starter Deleted member 5254
  • Start date
  • 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 community!

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

Deleted member 5254

So I know how to open a virtual enchanting table, but now what im curious is, is there a way to set the slots in an enchanting table.... you know the 3 that would show the different enchanting options.
And if there is a way to do this, what would be the event for clicking on said options.

I checked over the docs and I cant seem to find it. Very possible im just not seeing what I am looking for.

Thanks in advance for the help
 
Okay well then next time you should note that you saw those on the socs but you don't know how they work. But for the problem, I'll look at it tomorrow as I don't have much time now
[doublepost=1525070082,1525016527][/doublepost]I tried this and it works:
code_language.skript:
on enchant prepare:
    loop all enchantment offers:
        set enchant of offer loop-value to Knockback
        set level of offer loop-value to 2
 
Okay well then next time you should note that you saw those on the socs but you don't know how they work. But for the problem, I'll look at it tomorrow as I don't have much time now
[doublepost=1525070082,1525016527][/doublepost]I tried this and it works:
code_language.skript:
on enchant prepare:
    loop all enchantment offers:
        set enchant of offer loop-value to Knockback
        set level of offer loop-value to 2
Ok so that totally works
One problem is it sets each of the enchant options to the same thing, is there a way to set them all different?
 
Ofcourse:
code_language.skript:
on enchant prepare:
    loop all enchantment offers:
        add 1 to {_i}
        if {_i} is 1:
            set enchant of offer loop-value to Knockback
            set level of offer loop-value to 2
        if {_i} is 2:
            set enchant of offer loop-value to Sharpness
            set level of offer loop-value to 4
        if {_i} is 3:
            set enchant of offer loop-value to Flame
            set level of offer loop-value to 1
 
Ofcourse:
code_language.skript:
on enchant prepare:
    loop all enchantment offers:
        add 1 to {_i}
        if {_i} is 1:
            set enchant of offer loop-value to Knockback
            set level of offer loop-value to 2
        if {_i} is 2:
            set enchant of offer loop-value to Sharpness
            set level of offer loop-value to 4
        if {_i} is 3:
            set enchant of offer loop-value to Flame
            set level of offer loop-value to 1
YES that is amazing, thank you :emoji_slight_smile:
 
Status
Not open for further replies.