Jump to content
  • 0

Question

Posted

hello i want to make crystal scrolls to enchant x2 example.. when i put enchant instead one enchant to give me two on weapon

 

i find a java code at java/gameserver/network/clientpackets/RequestEnchantItem.java

 

and code is this

 

int count = item.getCrystalCount() - (item.getItem().getCrystalCount() + 1) / 2;
			if (count < 1)
				count = 1;

 

if i am wrong fix me plz

2 answers to this question

Recommended Posts

  • 0
Posted

i try this too but still nothing :(

 

int count = item.getCrystalCount() - (item.getItem().getCrystalCount() + 2) / 2;

            if (count < 2)

              count = 2;

  • 0
Posted

First of all, wrong section, this is the L2Off section not the l2j one.

 

I'm not sure if I understood your question correctly, because it seems like you want to know how to make the crystal scrolls put 2 enchants on a weapon instead of one, but the code you pasted looks more like you are trying to make it give double the crystals if it fails... But here goes anyway...

 

				// success
			int nEnchantInc = 1;
			if (scroll.getItemId() => 947 && scroll.getItemId() <= 962)
				nEnchantInc++;

			item.setEnchantLevel(item.getEnchantLevel() + nEnchantInc);
			item.updateDatabase();

 

Replace the code at lines 160-162 with that code.

That will make it give 2 enchants if you use a crystal scroll, but you will need to check the item ids are correct with whichever chronicle you are using.

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