Jump to content
  • 0

Custom Enchant System.


Question

Posted (edited)
if(blessedScroll){
                        item.setEnchantLevel(Config.BREAK_ENCHANT);
                        item.updateDatabase();
                    }else if(crystalScroll){
                        item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN);
                        item.updateDatabase();

 

 

So I found some topics about custom enchant system but not what I want to do.

 

I want the bless /crystals when the enchant fails , the item's enchantment to not change.

 

If I enchant a +16 bow and fails then it stays +16.

Edited by sotid

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
if(blessedScroll){
                        item.setEnchantLevel(item.getEnchantLevel());
                        item.updateDatabase();
                    }else if(crystalScroll){
                        item.setEnchantLevel(item.getEnchantLevel());
                        item.updateDatabase();

 

Thanks SweeTs once again, works perfectly :)

 

You can lock it.

Edited by sotid
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..