Jump to content
  • 0

Enchant system


Question

Posted

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?

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

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 {

 

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