Skip to content

[HELP]Enchant Penalty

Featured Replies

Hey ppl any 1 can tell me how i can change crystal scroll and others penalty?

 

ty in advance

Hey ppl any 1 can tell me how i can change crystal scroll and others penalty?

 

ty in advance

What penalty? :S

do you mean Crystal scroll Chance?

Hey ppl any 1 can tell me how i can change crystal scroll and others penalty?

 

ty in advance

 

What you mean with penalty ?

 

do you mean Crystal scroll Chance?

 

If that's it , you can change from configs . eg:Enchant Crystal Scroll = 68 (%)

  • Author

I mean, example from +5 to +6 with crystal scroll item wont brake but goes +0

You should take a look right here :

 

 (com.l2jfrozen).gameserver.network.clientpackets; or (net.sf.l2j).gameserver.(network).clientpackets; 

Like Joκκєrino said, take a look there, at RequestEnchantItem.java and look at isBlessed() or if(blessedScroll) method, depends of pack that you use and do the same, just change it to Crystal :P

 

Ex, on my pack blessed code looks like that

 

			if (scrollTemplate.isBlessed())
			{
				// blessed enchant - clear enchant value
				activeChar.sendPacket(SystemMessageId.BLESSED_ENCHANT_FAILED);

				item.setEnchantLevel(0);
				item.updateDatabase();
				activeChar.sendPacket(EnchantResult.UNSUCCESS);
			}

 

So, I have to change isBlessed to isCrystal, also I added a text message - sendMessage instead of sendPacket.

 

			if (scrollTemplate.isCrystal())
			{
				// crystal enchant - clear enchant value
				activeChar.sendMessage("Failed in Crystal Enchant. The enchant value of the item became 0.");

				item.setEnchantLevel(0);
				item.updateDatabase();
				activeChar.sendPacket(EnchantResult.UNSUCCESS);
			}

 

Btw, what pack are you using?

  • Author

Im using l2jserver hi5

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.