++ wepons and armour
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- cgiven415
- Posts: 13
- Joined: Wed Oct 14, 2009 2:35 am
- Location: USA
- Contact:
++ wepons and armour
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.
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: ++ wepons and armour
Not a contribution, moved to support.
btw, enchanted items can be sold.
btw, enchanted items can be sold.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
- cgiven415
- Posts: 13
- Joined: Wed Oct 14, 2009 2:35 am
- Location: USA
- Contact:
Re: ++ wepons and armour
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
- Charus
- L2j Veteran
- Posts: 410
- Joined: Thu Feb 16, 2006 1:24 pm
- cgiven415
- Posts: 13
- Joined: Wed Oct 14, 2009 2:35 am
- Location: USA
- Contact:
Re: ++ wepons and armour
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
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.
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); } }
- cgiven415
- Posts: 13
- Joined: Wed Oct 14, 2009 2:35 am
- Location: USA
- Contact:
Re: ++ wepons and armour
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
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>
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; }
<!-- +20 Nephlim Shield -->
<item id="2">
<ingredient id="3194" count="50" enchantLevel="0"/>
<production id="5799" count="1" enchantLevel="20"/>
</item>