Jump to content
  • 0

custom enchant failure


Question

Posted

how to set custom enchant failure?

example i have +18 Arcana Mace. I Have Failure Enchant,but weapon set not to +0. it's set to +15

example2: i have +9 Draconic Bow. I Have Failure Enchant,But Weapon Set not to +0.it's set to +5

 

 

sorry for my english. i hope you understand what i want

10 answers to this question

Recommended Posts

  • 0
Posted

he said

 

Look at his request again.

 

And now ontopic.

 

lekino - take a look on this class: RequestEnchantItem.java

 

look at this line:

 

Quote

synchronized (item)

 

if enchant was failed bla bla bla:

 

You can use this function

 

item.setEnchantLevel(item.getEnchantLevel() - PUT YOUR VALUE HERE);

 

and if i write this

 

item.setEnchantLevel(item.getEnchantLevel() -15);

 

and if i failure at +6 weapon will enchant to +15?!

  • 0
Posted

Lol, we cant help you?

 

We did.

 

if you dont understand it, its not our problem, we gave you solution already.

 

I will explain it ONCE AGAIN:

 

item.setEnchantLevel(item.getEnchantLevel() -2);

 

Add this method after enchant item failed, and:

 

if you enchant is failed, it will get getEnchantLevel (so for example +10) and -2 ...so after failed enchant it should be +8

 

got it  :-\?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...