Skip to content

Enchant x2

Featured Replies

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

  • Author

i try this too but still nothing :(

 

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

            if (count < 2)

              count = 2;

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.