Jump to content
  • 0

Enchant system


aris96

Question

Hello, I am trying to make an enchant system that on failure item will loose for example -2 enchant value. Weapon +8 on failure will go +6. Is it possible?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

in java u can make everything... need only good java dev 🙂

must only ask him how u can set it... if this set use for normal or blessed enchants...

Edited by KejbL
Link to comment
Share on other sites

  • 0

Hey there!

Look for

if (scrollTemplate.isBlessed()) {

Under aCis_gameserver\java\net\sf\l2j\gameserver\network\clientpackets\RequestEnchantItem.java file and do something like below

				if (scrollTemplate.isBlessed()) {
					// blessed enchant - clear enchant value
					// player.sendPacket(SystemMessageId.BLESSED_ENCHANT_FAILED);

					int temp = item.getEnchantLevel();
					if (temp > 2) {
						temp = temp - 2;
						item.setEnchantLevel(temp);
						player.sendMessage("Enchantment failed. Item enchant is now +" + (temp));
					} else
						player.sendMessage("Enchantment failed.");

					item.updateDatabase();
					player.sendPacket(EnchantResult.UNSUCCESS);
				} else {

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...