++ wepons and armour

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
cgiven415
Posts: 13
Joined: Wed Oct 14, 2009 2:35 am
Location: USA
Contact:

++ wepons and armour

Post by cgiven415 »

ok well I have done some reading on the forums and saw that the XML no longer supports the sale of enchanted weapons and armour. I'm wondering if there is a way to mod the core or the datapack to make it support enchants again...I'm not looking for a handout but I am just looking for someone to point me in the right direction, so that I may change or make it work myself.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: ++ wepons and armour

Post by _DS_ »

Not a contribution, moved to support.

btw, enchanted items can be sold.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
cgiven415
Posts: 13
Joined: Wed Oct 14, 2009 2:35 am
Location: USA
Contact:

Re: ++ wepons and armour

Post by cgiven415 »

sorry about posting in the wrong spot. when I changed the xml file it didn't add it as enchanted to my AIO Npc Shop
User avatar
Charus
L2j Veteran
L2j Veteran
Posts: 410
Joined: Thu Feb 16, 2006 1:24 pm

Re: ++ wepons and armour

Post by Charus »

User avatar
cgiven415
Posts: 13
Joined: Wed Oct 14, 2009 2:35 am
Location: USA
Contact:

Re: ++ wepons and armour

Post by cgiven415 »

I'm not trying to makean enchanter npc...I'm trying to straight up sell enchanted Armors and wepons in an AIO Npc shop. Example....you go to shop and with so much currency you buy a +10 Vesper Cutter. not the individual enchants.

now if i change the multisell.java to this

Code: Select all

	protected MultiSellEntry parseEntry(Node n)	{		int entryId = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); 		Node first = n.getFirstChild();		MultiSellEntry entry = new MultiSellEntry(); 		for (n = first; n != null; n = n.getNextSibling())		{			if ("ingredient".equalsIgnoreCase(n.getNodeName()))			{				Node attribute; 				int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue());				long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue());				int enchant = Integer.parseInt(n.getAttributes().getNamedItem("enchant").getNodeValue());				boolean isTaxIngredient = false, mantainIngredient = false; 				attribute = n.getAttributes().getNamedItem("isTaxIngredient"); 				if (attribute != null)					isTaxIngredient = Boolean.parseBoolean(attribute.getNodeValue()); 				attribute = n.getAttributes().getNamedItem("mantainIngredient"); 				if (attribute != null)					mantainIngredient = Boolean.parseBoolean(attribute.getNodeValue()); 				MultiSellIngredient e = new MultiSellIngredient(id, count, enchant, isTaxIngredient, mantainIngredient);				entry.addIngredient(e);			}			else if ("production".equalsIgnoreCase(n.getNodeName()))			{				int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue());				long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue());				int enchant = Integer.parseInt(n.getAttributes().getNamedItem("enchant").getNodeValue()); 				MultiSellIngredient e = new MultiSellIngredient(id, count, enchant, false, false);				entry.addProduct(e);			}		} 
when I load server though it won't load any of the multisell. I'm not sure what I need to add to the multisell files I thought they were all there.
User avatar
cgiven415
Posts: 13
Joined: Wed Oct 14, 2009 2:35 am
Location: USA
Contact:

Re: ++ wepons and armour

Post by cgiven415 »

ok I got the multisell to load. I changed the clientpacket file, multisellchoose.java as well, but it still will not show a ++weapon or armor from xml

Code: Select all

		// Next add the adena amount, if any		if (totalAdenaCount > 0)			newEntry.addIngredient(L2Multisell.getInstance().new MultiSellIngredient(57, totalAdenaCount, enchantLevel, false, false)); 		// Now modify the enchantment level of products, if necessary		for (MultiSellIngredient ing : templateEntry.getProducts())		{			// load the ingredient from the template			MultiSellIngredient newIngredient = L2Multisell.getInstance().new MultiSellIngredient(ing); 			if (maintainEnchantment && hasIngredient)			{				// if it is an armor/weapon, modify the enchantment level appropriately				// (note, if maintain enchantment is "false" this modification will result to a +0)				L2Item tempItem = ItemTable.getInstance().createDummyItem(newIngredient.getItemId()).getItem();				if ((tempItem instanceof L2Armor) || (tempItem instanceof L2Weapon))					newIngredient.setEnchantmentLevel(enchantLevel);			}			newEntry.addProduct(newIngredient);		}		return newEntry;	}
is there another part in that that I have to change for xml to allow enchanted weapons to be sold by xml. like this:


<!-- +20 Nephlim Shield -->
<item id="2">
<ingredient id="3194" count="50" enchantLevel="0"/>
<production id="5799" count="1" enchantLevel="20"/>
</item>
Post Reply