How do you enchant an item with a random enchant of either sharpness, fire aspect or unbreaking

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

megamanoioi

Member
May 19, 2021
1
0
1
22
I want to recreate wisp's random 1000 enchant and I want to make it so that whenever I craft a sword it does a random enchant of either sharpness, fire aspect or unbreaking, but I can only make it so that it only gives one enchant that you choose, and I also want to make it a level 1000 enchantment. Does anyone know how to do it? Thanks! BTW this is my code so far:


on craft of a wooden_sword:
enchant wooden_sword with
[doublepost=1621521613,1621463189][/doublepost]Hello? Does anyone know??
 
just do something like this?:
Code:
set {_random} to a random number between 1 and 4
if {_random} is 1: #1 to 1.9999
    >enchant with sharpness
else:
    if {_random} is 2 #2 to 2.9999
        >enchant fire aspect
    else:
        #random has to be 3 then. #3 - 3.999
        >enchant unbreaking
 
Status
Not open for further replies.