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 {

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock