Jump to content
  • 0

Enchant x2


erhan4o0

Question

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

i try this too but still nothing :(

 

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

            if (count < 2)

              count = 2;

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

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