Jump to content
  • 0

Enchant scrolls!


Question

Posted

Hello, today i test my enchant system from server, and with retail settings, i can't enchant my items. When i try to enchant, i don't get any error on gameserver. I get just a shortly message on chat like unknown.png. Someone can explain me what's happend?

L2j-Mobius-High Five!

11 answers to this question

Recommended Posts

  • 0
Posted

Check the conditions here.

 

public class RequestExTryToPutEnchantTargetItem implements IClientIncomingPacket
{
	private int _objectId;
	
	@Override
	public boolean read(GameClient client, PacketReader packet)
	{
		_objectId = packet.readD();
		return true;
	}
	
	@Override
	public void run(GameClient client)
	{
		final PlayerInstance player = client.getPlayer();
		if ((_objectId == 0) || (player == null))
		{
			return;
		}
		
		if (player.isEnchanting())
		{
			return;
		}
		
		final ItemInstance item = player.getInventory().getItemByObjectId(_objectId);
		final ItemInstance scroll = player.getInventory().getItemByObjectId(player.getActiveEnchantItemId());
		if ((item == null) || (scroll == null))
		{
			return;
		}
		
		final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll);
		if ((scrollTemplate == null) || !scrollTemplate.isValid(item, null))
		{
			player.sendPacket(SystemMessageId.DOES_NOT_FIT_STRENGTHENING_CONDITIONS_OF_THE_SCROLL);
			player.setActiveEnchantItemId(PlayerInstance.ID_NONE);
			player.sendPacket(new ExPutEnchantTargetItemResult(0));
			if (scrollTemplate == null)
			{
				LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Undefined scroll have been used id: " + scroll.getId());
			}
			return;
		}
		player.setEnchanting(true);
		player.setActiveEnchantTimestamp(Chronos.currentTimeMillis());
		player.sendPacket(new ExPutEnchantTargetItemResult(_objectId));
	}
}

 

Validation method.

 

	public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
	{
		if ((_items != null) && !_items.contains(itemToEnchant.getId()))
		{
			return false;
		}
		else if ((supportItem != null))
		{
			if (_isBlessed)
			{
				return false;
			}
			else if (!supportItem.isValid(itemToEnchant, supportItem))
			{
				return false;
			}
			else if (supportItem.isWeapon() != isWeapon())
			{
				return false;
			}
		}
		if (_items == null)
		{
			for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
			{
				if (scroll.getId() == getId())
				{
					continue;
				}
				final Set<Integer> scrollItems = scroll.getItems();
				if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
				{
					return false;
				}
			}
		}
		return super.isValid(itemToEnchant, supportItem);
	}

 

The general problem is Enchant scroll isn't defined in EnchantItemData, i guess.

  • 0
Posted

I can post here EnchantItemData if this may help.
 

<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/enchantItemData.xsd">
	<!-- Scrolls: Enchant Weapon -->
	<enchant id="729" targetGrade="A" maxEnchant="16" />
	<enchant id="947" targetGrade="B" maxEnchant="16" />
	<enchant id="951" targetGrade="C" maxEnchant="16" />
	<enchant id="955" targetGrade="D" maxEnchant="16" />
	<enchant id="959" targetGrade="S" maxEnchant="16" />

	<!-- Scrolls: Enchant Armor -->
	<enchant id="730" targetGrade="A" maxEnchant="16" />
	<enchant id="948" targetGrade="B" maxEnchant="16" />
	<enchant id="952" targetGrade="C" maxEnchant="16" />
	<enchant id="956" targetGrade="D" maxEnchant="16" scrollGroupId="0" /> <!-- Default scroll groups binding. -->
	<enchant id="960" targetGrade="S" maxEnchant="16" />

	<!-- Blessed Scrolls: Enchant Weapon -->
	<enchant id="6569" targetGrade="A" maxEnchant="16" />
	<enchant id="6571" targetGrade="B" maxEnchant="16" />
	<enchant id="6573" targetGrade="C" maxEnchant="16" />
	<enchant id="6575" targetGrade="D" maxEnchant="16" />
	<enchant id="6577" targetGrade="S" maxEnchant="16" />
	<!-- Blessed Scrolls: Enchant Armor -->
	<enchant id="6570" targetGrade="A" maxEnchant="16" />
	<enchant id="6572" targetGrade="B" maxEnchant="16" />
	<enchant id="6574" targetGrade="C" maxEnchant="16" />
	<enchant id="6576" targetGrade="D" maxEnchant="16" />
	<enchant id="6578" targetGrade="S" maxEnchant="16" />

	<!-- Weapon Enchant Scrolls -->
	<enchant id="22006" targetGrade="D" bonusRate="10" maxEnchant="16" />
	<enchant id="22007" targetGrade="C" bonusRate="10" maxEnchant="16" />
	<enchant id="22008" targetGrade="B" bonusRate="10" maxEnchant="16" />
	<enchant id="22009" targetGrade="A" bonusRate="10" maxEnchant="16" />
	<enchant id="20517" targetGrade="S" bonusRate="10" maxEnchant="16" />
	<!-- Armor Enchant Scrolls -->
	<enchant id="22010" targetGrade="D" bonusRate="10" maxEnchant="16" />
	<enchant id="22011" targetGrade="C" bonusRate="10" maxEnchant="16" />
	<enchant id="22012" targetGrade="B" bonusRate="10" maxEnchant="16" />
	<enchant id="22013" targetGrade="A" bonusRate="10" maxEnchant="16" />
	<enchant id="20518" targetGrade="S" bonusRate="10" maxEnchant="16" />

	<!-- Ancient Weapon Enchant Crystal -->
	<enchant id="22014" targetGrade="B" maxEnchant="16" bonusRate="10" />
	<enchant id="22015" targetGrade="A" maxEnchant="16" bonusRate="10" />
	<enchant id="20519" targetGrade="S" maxEnchant="16" bonusRate="10" />
	<!-- Ancient Armor Enchant Crystal -->
	<enchant id="22016" targetGrade="B" maxEnchant="16" bonusRate="10" />
	<enchant id="22017" targetGrade="A" maxEnchant="16" bonusRate="10" />
	<enchant id="20520" targetGrade="S" maxEnchant="16" bonusRate="10" />

	<!-- Divine Weapon Enchant Crystal -->
	<enchant id="22018" targetGrade="B" bonusRate="100" />
	<enchant id="22019" targetGrade="A" bonusRate="100" />
	<enchant id="20521" targetGrade="S" bonusRate="100" />
	<!-- Divine Armor Enchant Crystal -->
	<enchant id="22020" targetGrade="B" bonusRate="100" />
	<enchant id="22021" targetGrade="A" bonusRate="100" />
	<enchant id="20522" targetGrade="S" bonusRate="100" />

	<!-- Scroll: Enchant Weapon of Destruction -->
	<enchant id="22221" targetGrade="S" maxEnchant="15" />
	<enchant id="22223" targetGrade="A" maxEnchant="15" />
	<enchant id="22225" targetGrade="B" maxEnchant="15" />
	<enchant id="22227" targetGrade="C" maxEnchant="15" />
	<enchant id="22229" targetGrade="D" maxEnchant="15" />
	<!-- Scroll: Enchant Armor of Destruction -->
	<enchant id="22222" targetGrade="S" maxEnchant="6" />
	<enchant id="22224" targetGrade="A" maxEnchant="6" />
	<enchant id="22226" targetGrade="B" maxEnchant="6" />
	<enchant id="22228" targetGrade="C" maxEnchant="6" />
	<enchant id="22230" targetGrade="D" maxEnchant="6" />

	<!-- Master Yogi's Scroll: Enchant Weapon -->
	<enchant id="13540" maxEnchant="23">
		<item id="13539" /> <!-- Staff of Master Yogi -->
	</enchant>

	<!-- Olf's T-shirt Enchant Scroll -->
	<enchant id="21581" maxEnchant="10">
		<item id="21580" /> <!-- Olf's T-shirt -->
		<item id="21706" /> <!-- Olf's T-shirt (Event) -->
	</enchant>

	<!-- Blessed Olf's T-shirt Enchant Scroll -->
	<enchant id="21582" maxEnchant="10">
		<item id="21580" /> <!-- Olf's T-shirt -->
		<item id="21706" /> <!-- Olf's T-shirt (Event) -->
	</enchant>

	<!-- Blessed Olf's T-shirt Enchant Scroll - Event -->
	<enchant id="21707" maxEnchant="10">
		<item id="21580" /> <!-- Olf's T-shirt -->
		<item id="21706" /> <!-- Olf's T-shirt (Event) -->
	</enchant>

	<!-- Event - Herdsman's Love Scroll Event -->
	<enchant id="15381" maxEnchant="16">
		<item id="15383" /> <!-- Weaver's Multi-colored Clothes (7-day limited period) -->
		<item id="15384" /> <!-- Weaver's Multi-colored Clothes (30-day limited period) -->
		<item id="15385" /> <!-- Weaver's Multi-colored Clothes (60-day limited period) -->
		<item id="15386" /> <!-- Weaver's Multi-colored Clothes (90-day limited period) -->
		<item id="15387" /> <!-- Weaver's Multi-colored Clothes (Permanent Use) -->
		<item id="15388" /> <!-- Weaver's Multi-colored Clothes (Event) (7-day limited period) -->
		<item id="15389" /> <!-- Weaver's Multi-colored Clothes (Event) (30-day limited period) -->
		<item id="15390" /> <!-- Weaver's Multi-colored Clothes (Event) (60-day limited period) -->
		<item id="15391" /> <!-- Weaver's Multi-colored Clothes (Event) (90-day limited period) -->
		<item id="15392" /> <!-- Weaver's Multi-colored Clothes (Event) (Permanent Use) -->
	</enchant>

	<!-- Event - Vitality Belt Enchant Scroll -->
	<enchant id="15382" maxEnchant="50">
		<item id="15393" /> <!-- Vitality Belt (7-day limited period) -->
		<item id="15394" /> <!-- Vitality Belt (30-day limited period) -->
		<item id="15395" /> <!-- Vitality Belt (60-day limited period) -->
		<item id="15396" /> <!-- Vitality Belt (90-day limited period) -->
		<item id="15397" /> <!-- Vitality Belt (Permanent Use) -->
		<item id="15398" /> <!-- Vitality Belt (Event) (7-day limited period) -->
		<item id="15399" /> <!-- Vitality Belt (Event) (30-day limited period) -->
		<item id="15400" /> <!-- Vitality Belt (Event) (60-day limited period) -->
		<item id="15401" /> <!-- Vitality Belt (Event) (90-day limited period) -->
		<item id="15402" /> <!-- Vitality Belt (Event) (Permanent Use) -->
	</enchant>

	<!-- Weapon enhancing scroll exclusive for PC cafe -->
	<enchant id="15346" targetGrade="S">
		<item id="15313" /> <!-- Player Commendation - Forgotten Blade (Player Recommendation Weapon) -->
		<item id="15314" /> <!-- Player Commendation - Basalt Battlehammer (Player Recommendation Weapon) -->
		<item id="15315" /> <!-- Player Commendation - Imperial Staff (Player Recommendation Weapon) -->
		<item id="15316" /> <!-- Player Commendation - Angel Slayer (Player Recommendation Weapon) -->
		<item id="15317" /> <!-- Player Commendation - Dragon Hunter Axe (Player Recommendation Weapon) -->
		<item id="15318" /> <!-- Player Commendation - Saint Spear (Player Recommendation Weapon) -->
		<item id="15319" /> <!-- Player Commendation - Demon Splinter (Player Recommendation Weapon) -->
		<item id="15320" /> <!-- Player Commendation - Heaven's Divider (Player Recommendation Weapon) -->
		<item id="15321" /> <!-- Player Commendation - Arcana Macw (Player Recommendation Weapon) -->
		<item id="15322" /> <!-- Player Commendation - Draconic Bow (Player Recommendation Weapon) -->
		<item id="15323" /> <!-- Player Commendation - Laevateinn (Player Recommendation Weapon) -->
		<item id="15324" /> <!-- Player Commendation - Gram (Player Recommendation Weapon) -->
		<item id="15325" /> <!-- Player Commendation - Sarunga (Player Recommendation Weapon) -->
		<item id="15326" /> <!-- Player Commendation - Tallum Blade *Dark Legion's Edge (Player Recommendation Weapon) -->
	</enchant>
	<enchant id="15347" targetGrade="A">
		<item id="13210" /> <!-- Player Commendation - Sirra's Blade (Player Commendation Weapon) -->
		<item id="13211" /> <!-- Player Commendation - Sword of Ipos (Player Commendation Weapon) -->
		<item id="13212" /> <!-- Player Commendation - Barakiel's Axe (Player Commendation Weapon) -->
		<item id="13213" /> <!-- Player Commendation - Behemoth Tuning Fork (Player Commendation Weapon) -->
		<item id="13214" /> <!-- Player Commendation - Naga Storm (Player Commendation Weapon) -->
		<item id="13215" /> <!-- Player Commendation - Tiphon's Spear (Player Commendation Weapon) -->
		<item id="13216" /> <!-- Player Commendation - Shyeed's Bow (Player Commendation Weapon) -->
		<item id="13217" /> <!-- Player Commendation - Sobekk's Hurricane (Player Commendation Weapon) -->
		<item id="13218" /> <!-- Player Commendation - Themis' Tongue (Player Commendation Weapon) -->
		<item id="13219" /> <!-- Player Commendation - Cabrio's Hand (Player Commendation Weapon) -->
		<item id="13220" /> <!-- Player Commendation - Daimon Crystal (Player Commendation Weapon) -->
		<item id="13221" /> <!-- Player Commendation - Tallum Blade*Damascus (Player Commendation Weapon) -->
		<item id="13222" /> <!-- Player Commendation - Eclair Bijou (Player Commendation Weapon) -->
		<item id="13223" /> <!-- Player Commendation - Durendal (Player Commendation Weapon) -->
		<item id="13224" /> <!-- Player Commendation - Screaming Vengeance (Player Commendation Weapon) -->
	</enchant>
	<enchant id="15348" targetGrade="B">
		<item id="13194" /> <!-- Player Commendation - Damascus Sword (Player Commendation Weapon) -->
		<item id="13195" /> <!-- Player Commendation - Lance (Player Commendation Weapon) -->
		<item id="13196" /> <!-- Player Commendation - Deadman's Glory (Player Commendation Weapon) -->
		<item id="13197" /> <!-- Player Commendation - Art of Battle Axe (Player Commendation Weapon) -->
		<item id="13198" /> <!-- Player Commendation - Staff of Evil Spirits (Player Commendation Weapon) -->
		<item id="13199" /> <!-- Player Commendation - Devil's Dagger (Player Commendation Weapon) -->
		<item id="13200" /> <!-- Player Commendation - Bellion Cestus (Player Commendation Weapon) -->
		<item id="13201" /> <!-- Player Commendation - Bow of Peril (Player Commendation Weapon) -->
		<item id="13202" /> <!-- Player Commendation - Samurai*Samurai (Player Commendation Weapon) -->
		<item id="13203" /> <!-- Player Commendation - Guardian's Sword (Player Commendation Weapon) -->
		<item id="13204" /> <!-- Player Commendation - Wizard's Tear (Player Commendation Weapon) -->
		<item id="13205" /> <!-- Player Commendation - Kaim Vanul's Bones (Player Commendation Weapon) -->
		<item id="13206" /> <!-- Player Commendation - Star Buster (Player Commendation Weapon) -->
		<item id="13207" /> <!-- Player Commendation - Colichemarde (Player Commendation Weapon) -->
		<item id="13208" /> <!-- Player Commendation - Dismantler (Player Commendation Weapon) -->
		<item id="13209" /> <!-- Player Commendation - Hell Hound (Player Commendation Weapon) -->
	</enchant>
	<enchant id="15349" targetGrade="C">
		<item id="13178" /> <!-- Player Commendation - Samurai Long Sword (Player Commendation Weapon) -->
		<item id="13179" /> <!-- Player Commendation - Ghost's Wand (Player Commendation Weapon) -->
		<item id="13180" /> <!-- Player Commendation - Ghoul's Wand (Player Commendation Weapon) -->
		<item id="13181" /> <!-- Player Commendation - Devil's Wand (Player Commendation Weapon) -->
		<item id="13182" /> <!-- Player Commendation - Crystal Dagger (Player Commendation Weapon) -->
		<item id="13183" /> <!-- Player Commendation - Great Pata (Player Commendation Weapon) -->
		<item id="13184" /> <!-- Player Commendation - Eminence Bow (Player Commendation Weapon) -->
		<item id="13185" /> <!-- Player Commendation - Orcish Poleaxe (Player Commendation Weapon) -->
		<item id="13186" /> <!-- Player Commendation - Yaksa Mace (Player Commendation Weapon) -->
		<item id="13187" /> <!-- Player Commendation - Shamshir*Shamshir (Player Commendation Weapon) -->
		<item id="13188" /> <!-- Player Commendation - Admiral's Estoc (Player Commendation Weapon) -->
		<item id="13189" /> <!-- Player Commendation - Saber Tooth (Player Commendation Weapon) -->
		<item id="13190" /> <!-- Player Commendation - Sharpshooter (Player Commendation Weapon) -->
		<item id="13191" /> <!-- Player Commendation - Ecliptic Sword (Player Commendation Weapon) -->
		<item id="13192" /> <!-- Player Commendation - Ecliptic Axe (Player Commendation Weapon) -->
		<item id="13193" /> <!-- Player Commendation - Dwarven Hammer (Player Commendation Weapon) -->
	</enchant>
	<enchant id="15350" targetGrade="D">
		<item id="13163" /> <!-- Player Commendation - Bastard*Crimson Sword (Player Commendation Weapon) -->
		<item id="13164" /> <!-- Player Commendation - Claymore (Player Commendation Weapon) -->
		<item id="13165" /> <!-- Player Commendation - Bonebreaker (Player Commendation Weapon) -->
		<item id="13166" /> <!-- Player Commendation - Atuba Hammer (Player Commendation Weapon) -->
		<item id="13167" /> <!-- Player Commendation - Ghost's Wand (Player Commendation Weapon) -->
		<item id="13168" /> <!-- Player Commendation - Hall of Life (Player Commendation Weapon) -->
		<item id="13169" /> <!-- Player Commendation - Atuba Mace (Player Commendation Weapon) -->
		<item id="13170" /> <!-- Player Commendation - Mithril Dagger (Player Commendation Weapon) -->
		<item id="13171" /> <!-- Player Commendation - Scallop Jamadhr (Player Commendation Weapon) -->
		<item id="13172" /> <!-- Player Commendation - Crossbow (Player Commendation Weapon) -->
		<item id="13173" /> <!-- Player Commendation - Glaive (Player Commendation Weapon) -->
		<item id="13174" /> <!-- Player Commendation - Elven Long Sword (Player Commendation Weapon) -->
		<item id="13175" /> <!-- Player Commendation - Grand Epee (Player Commendation Weapon) -->
		<item id="13176" /> <!-- Player Commendation - General Katzbalger (Player Commendation Weapon) -->
		<item id="13177" /> <!-- Player Commendation - Cranequin (Player Commendation Weapon) -->
	</enchant>

	<!-- Weapon-Type Enhance Backup Stone -->
	<support id="12362" targetGrade="D" maxEnchant="9" bonusRate="20" />
	<support id="12363" targetGrade="C" maxEnchant="9" bonusRate="18" />
	<support id="12364" targetGrade="B" maxEnchant="9" bonusRate="15" />
	<support id="12365" targetGrade="A" maxEnchant="9" bonusRate="12" />
	<support id="12366" targetGrade="S" maxEnchant="9" bonusRate="10" />

	<!-- Armor-Type Enhance Backup Stone -->
	<support id="12367" targetGrade="D" maxEnchant="9" bonusRate="35" />
	<support id="12368" targetGrade="C" maxEnchant="9" bonusRate="27" />
	<support id="12369" targetGrade="B" maxEnchant="9" bonusRate="23" />
	<support id="12370" targetGrade="A" maxEnchant="9" bonusRate="18" />
	<support id="12371" targetGrade="S" maxEnchant="9" bonusRate="15" />

	<!-- Agathion Auxiliary Stone: Enchant Weapon -->
	<support id="14702" targetGrade="D" maxEnchant="9" bonusRate="20" />
	<support id="14703" targetGrade="C" maxEnchant="9" bonusRate="18" />
	<support id="14704" targetGrade="B" maxEnchant="9" bonusRate="15" />
	<support id="14705" targetGrade="A" maxEnchant="9" bonusRate="12" />
	<support id="14706" targetGrade="S" maxEnchant="9" bonusRate="10" />

	<!-- Agathion Auxiliary Stone: Enchant Armor -->
	<support id="14707" targetGrade="D" maxEnchant="9" bonusRate="35" />
	<support id="14708" targetGrade="C" maxEnchant="9" bonusRate="27" />
	<support id="14709" targetGrade="B" maxEnchant="9" bonusRate="23" />
	<support id="14710" targetGrade="A" maxEnchant="9" bonusRate="18" />
	<support id="14711" targetGrade="S" maxEnchant="9" bonusRate="15" />
</list>

 

And about what java code you send me, i have the same. No changes. I don;t touch that class

  • 0
Posted

Scroll ID 730 ( Enchant Armor A )

The thinkg is. I do custom stuff on core. But nothing what i do wasn't with enchant or any class about this.

  • 0
Posted

Look on this video i created now. And how work for A grade, work for all scrolls/items.
Nothing happend 

 

I thin it's from edits what i maked on core. I don;t know yet

  • 0
Posted

Add debug messages into RequestExTryToPutEnchantTargetItem packet for known what missed.

 

/*
 * This file is part of the L2J Mobius project.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.l2jmobius.gameserver.network.clientpackets;

import java.util.logging.Level;

import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.commons.util.Chronos;
import org.l2jmobius.gameserver.data.xml.EnchantItemData;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.items.enchant.EnchantScroll;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExPutEnchantTargetItemResult;

/**
 * @author KenM
 */
public class RequestExTryToPutEnchantTargetItem implements IClientIncomingPacket
{
	private int _objectId;
	
	@Override
	public boolean read(GameClient client, PacketReader packet)
	{
		_objectId = packet.readD();
		return true;
	}
	
	@Override
	public void run(GameClient client)
	{
		final PlayerInstance player = client.getPlayer();
		if ((_objectId == 0) || (player == null))
		{
			return;
		}
		
		if (player.isEnchanting())
		{
			return;
		}
		
		final ItemInstance item = player.getInventory().getItemByObjectId(_objectId);
		final ItemInstance scroll = player.getInventory().getItemByObjectId(player.getActiveEnchantItemId());
		if ((item == null) || (scroll == null))
		{
			return;
		}
		
		final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll);
		if ((scrollTemplate == null) || !scrollTemplate.isValid(item, null))
		{
			player.sendMessage("Scrol template is " + (scrollTemplate == null ? "null" : "not noll"));
			player.sendMessage("Item is " + (scrollTemplate.isValid(item, null) ? "valid" : "not valid") + " for this scroll template.");
			player.sendPacket(SystemMessageId.DOES_NOT_FIT_STRENGTHENING_CONDITIONS_OF_THE_SCROLL);
			player.setActiveEnchantItemId(PlayerInstance.ID_NONE);
			player.sendPacket(new ExPutEnchantTargetItemResult(0));
			if (scrollTemplate == null)
			{
				LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Undefined scroll have been used id: " + scroll.getId());
			}
			return;
		}
		player.setEnchanting(true);
		player.setActiveEnchantTimestamp(Chronos.currentTimeMillis());
		player.sendPacket(new ExPutEnchantTargetItemResult(_objectId));
	}
}

 

I guess you broken something with your customs and reconfig.

  • 0
Posted

Assume, what this item isn't registered for this scroll or crystal type mismatches. Anyway you need debug isValid() method in EnchantScroll and AbstractEnchantItem classes.

 

By the way. I didn't understood a logic in this validation.

	public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
	{
		if ((_items != null) && !_items.contains(itemToEnchant.getId()))
		{
			// If _items isn't null check registered Item Id.
			return false;
		}
		else if ((supportItem != null))
		{
			if (_isBlessed)
			{
				return false;
			}
			else if (!supportItem.isValid(itemToEnchant, supportItem))
			{
				return false;
			}
			else if (supportItem.isWeapon() != isWeapon())
			{
				return false;
			}
		}
		if (_items == null)
		{
			// If _items Set is null get all scrolls.
			for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
			{
				if (scroll.getId() == getId())
				{
					continue;
				}

				final Set<Integer> scrollItems = scroll.getItems(); 
				// here we get the Set from _items field via local getter method (already checked before). LMAO.
				if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
				{
					// If scroll exists and item for enchanting isn't registered then fault.
					return false;
				}
			}
		}

		// Calls here super class with checking Grade and etc.
		return super.isValid(itemToEnchant, supportItem);
	}

 

Correct me if i'm wrong.

Guest
This topic is now closed to further replies.


  • Posts

    • We have the best prices for Adena on L2Reborn. discord - adver745645
    • Played the first 20 lvls in the OBT, very promising indeed. Quests seemed to be working fine for the most part although there's no need for the repetitive quests in the start since with x3 rates (x4 with premium which is pretty cheap tbh) adena from mobs outperforms the repetitive quests since you outlevel them in the early stage before you finish the quest, one time quests are good though and that's where is the juice. Idk how the og elixir was since I was a kid but this is definetely going to be much easier than your usual x1-2 no buffs server since GK is free for the first 40 lvls and you get basic 6 basic normal buffs even after low levels, that's not a bad thing for a lot of people though. Will be there on the opening.  
    • This post originally appeared on MmoGah. As the global release of Aion 2 draws near, players are eagerly preparing to dive into this highly anticipated MMORPG. One of the most important decisions you’ll make is choosing the right class, as it will define your experience in both solo and group content. Aion 2 introduces eight distinct classes, each with unique gameplay mechanics, strengths, and roles. Whether you’re a seasoned veteran or a newcomer, understanding these classes is essential to finding the one that suits your preferred playstyle. This guide provides a comprehensive overview of all eight classes, tips for selecting your ideal role, and recommendations for different types of players. Aion 2’s class system offers a variety of options across tanks, damage dealers, healers, and hybrid supports. Here’s a quick breakdown of the roles: - Tank Classes: Templar - Physical DPS Classes: Gladiator, Assassin, Ranger - Magical DPS Classes: Sorcerer - Hybrid Classes: Spiritmaster, Chanter - Healer Class: Cleric Each class has been carefully designed to excel in specific scenarios, whether it’s PvP, PvE, solo leveling, or large-scale faction battles. Pro Tip: As you embark on your journey, remember that having Aion 2 Kinah can greatly enhance your experience, so consider acquiring it to make the most of your adventure.   Class Breakdown Templar – The Indomitable Tank The Templar is the quintessential tank, specializing in defense and crowd control. With high durability and reliable aggro management, this class is invaluable in group content and large-scale battles. Strengths: - Exceptional survivability  - Top-tier aggro control  - Disruption tools for PvP  Playstyle: Templars thrive on the frontlines, soaking up damage and protecting allies. They are perfect for players who enjoy leading the charge and maintaining battlefield control. Gladiator – The Melee Powerhouse The Gladiator strikes a balance between offense and defense, offering strong AoE damage and decent survivability. This class excels in fast-paced melee combat and open-world PvP. Strengths: - High AoE damage  - Lifesteal-style abilities for sustain  - Versatile in both PvE and PvP  Playstyle:  Gladiators are ideal for players who enjoy dynamic melee combat with a mix of durability and damage. Assassin – The Stealthy Burst Specialist Assassins are masters of stealth and mobility. Known for their high single-target burst damage, they dominate in duels and small-scale PvP encounters. Strengths: - Exceptional burst damage  - Stealth mechanics for ambushes  - High mobility for quick disengagement Playstyle: This class is perfect for players who prefer fast-paced, tactical gameplay with an emphasis on sneaky kills. Ranger – The Precision Archer Rangers excel at dealing consistent physical damage from a distance. With excellent crowd control abilities and strong kiting potential, they are a solid choice for both PvE and PvP. Strengths:  - Safe ranged damage  - Strong crowd control tools  - Great for solo play  Playstyle: Rangers suit players who enjoy staying at range, controlling enemies, and executing precise attacks. Sorcerer – The Magical Artillery Sorcerers are pure magic damage dealers with devastating AoE spells and crowd control abilities. They are capable of turning the tide of battle with their massive burst potential. Strengths: - Highest magical burst damage  - Excellent AoE capabilities  - Crowd control via slows and immobilizes  Playstyle: Sorcerers are perfect for players who enjoy dealing immense magical damage while controlling enemies from a distance. Spiritmaster – The Tactical Summoner The Spiritmaster brings strategic depth to combat by combining summons, debuffs, and utility spells. This class is highly versatile and excels in both solo and group settings. Strengths: - Elemental summons with unique abilities  - Strong debuffs for PvP dominance  - Great solo leveling potential  Playstyle: Spiritmasters are best suited for players who enjoy strategic gameplay and multitasking in battle. Cleric – The Essential Healer The Cleric is the backbone of any group, providing powerful healing, cleansing, and defensive buffs. This class is indispensable in dungeons and raids. Strengths: - Reliable direct and AoE healing  - Cleansing abilities to remove debuffs  - Vital for group survival  Playstyle: Clerics are ideal for players who take pride in supporting their team and ensuring everyone stays alive. Chanter – The Hybrid Support The Chanter blends melee combat with healing and party-wide buffs. This versatile class can fill multiple roles in a group, making it a valuable addition to any team. Strengths: - Strong party buffs  - Solid healing capabilities  - Decent melee damage Playstyle: Chanters are perfect for players who want to contribute both offensively and defensively while supporting their team.   Choosing the Right Class What’s Your Playstyle? To help narrow down your choice, consider what you enjoy most in an MMORPG: • If you like tanking and leading the charge, choose Templar. • If you like melee combat with high durability, choose Gladiator.  • If you like stealthy gameplay with burst damage, choose Assassin.  • If you like ranged combat with precision, choose Ranger.   • If you like Massive magical damage, choose Sorcerer. • If you like tactical utility with summons, choose Spiritmaster. • If you like healing and supporting teammates, choose Cleric.  • If you like hybrid support with melee combat, choose Chanter. Beginner-Friendly Classes If you’re new to MMORPGs or unsure where to start, these classes offer straightforward mechanics: 1. Templar – Durable, beginner-friendly tank. 2. Cleric – Essential healer with clear roles in group content. Solo vs. Group Play Some classes excel in solo play, while others shine in groups: - Best Solo Classes: Gladiator, Ranger, Spiritmaster (good sustain and flexibility). - Best Group Classes: Templar (tank), Cleric (healer), Chanter (support). PvP Recommendations For competitive players who enjoy PvP: - 1v1/Small-Scale PvP: Assassin (stealth burst) or Sorcerer (burst + CC).  - Large-Scale PvP: Spiritmaster (debuffs) or Templar (frontline disruption). Team Composition Tips Building a balanced party is crucial in Aion 2. Consider these combinations for optimal synergy: - Tank + DPS + Healer: Templar + Sorcerer + Cleric (classic setup).  - Buff-Oriented Group: Gladiator + Chanter + Cleric (durability + support).    Final Thoughts Aion 2 offers a rich variety of classes tailored to different playstyles. Whether you prefer tanking, dealing damage, or supporting your team, there’s a class that fits your preferences. To summarize: - For beginners: Start with Templar or Cleric. - For high damage: Choose Gladiator, Assassin, or Sorcerer. - For strategic gameplay: Go with Spiritmaster. - For support roles: Opt for Cleric or Chanter. Still undecided? Share your preferred playstyle—solo adventuring, competitive PvP, or cooperative group play—and you’ll find the perfect class to begin your journey in Aion 2!  
    • Prepare for OBT (Open Beta Test)! https://www.l2ertheia.eu/news:open-beta-test-obt/
  • Topics

×
×
  • 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