nikosdevil20 Posted April 18, 2014 Posted April 18, 2014 hello guys...i have 1 problem..i want sell enchanted items in gm shop.. i have try this: <?xml version='1.0' encoding='utf-8'?><list><item id="1"><ingredient id="14721" count="25"/><production id="15941" count="1" enchant="12"/></item> i have try this: <?xml version='1.0' encoding='utf-8'?><list maintainEnchantment="true"><item id="1"><ingredient id="14721" count="25"/><production id="15941" count="1" enchantmentLevel="12"/></item> but nothing happened...i havent any error in my gs console but items are +0.. My pack is l2j freya if someone know how to fix this pls post here ty
0 MeVsYou Posted July 28, 2014 Posted July 28, 2014 I am not sure, maybe it is crap but why not try the following: <item id="1"><ingredient id="14721" count="25" enchant="0"/> <production id="15941" count="1" enchant="12"/></item> It seems to be ok as a code.
0 nikosdevil20 Posted July 30, 2014 Author Posted July 30, 2014 I am not sure, maybe it is crap but why not try the following: <item id="1"> <ingredient id="14721" count="25" enchant="0"/> <production id="15941" count="1" enchant="12"/> </item> It seems to be ok as a code. i have already try and this and no work :( i havent any error on gs or something but item isnt enchanted
0 nikosdevil20 Posted July 30, 2014 Author Posted July 30, 2014 MultiSellList.java @@ -119,5 +119,5 @@ else { - writeH(0x00); // enchant level + writeH(ing.getEnchantLevel()); // enchant level writeD(0x00); // augment id writeD(0x00); // mana @@ -154,5 +154,5 @@ else { - writeH(0x00); // enchant level + writeH(ing.getEnchantLevel()); // enchant level writeD(0x00); // augment id writeD(0x00); // mana PreparedEntry.java @@ -72,5 +72,5 @@ adenaAmount += _taxAmount; // do not forget tax if (adenaAmount > 0) - _ingredients.add(new Ingredient(ADENA_ID, adenaAmount, false, false)); + _ingredients.add(new Ingredient(ADENA_ID, adenaAmount,0, false, false)); Ingredient.java @@ -30,4 +30,5 @@ private int _itemId; private long _itemCount; + private int _EnchantmentLevel; private boolean _isTaxIngredient, _maintainIngredient; @@ -35,8 +36,9 @@ private ItemInfo _itemInfo = null; - public Ingredient(int itemId, long itemCount, boolean isTaxIngredient, boolean maintainIngredient) + public Ingredient(int itemId, long itemCount,int EnchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient) { _itemId = itemId; _itemCount = itemCount; + _EnchantmentLevel = EnchantmentLevel; _isTaxIngredient = isTaxIngredient; _maintainIngredient = maintainIngredient; @@ -80,5 +82,5 @@ public final int getEnchantLevel() { - return _itemInfo != null ? _itemInfo.getEnchantLevel() : 0; + return _itemInfo == null?_EnchantmentLevel:_itemInfo.getEnchantLevel(); } MultiSell.java @@ -270,4 +270,8 @@ if ("ingredient".equalsIgnoreCase(n.getNodeName())) { + int enchantmentLevel = 0; + if (n.getAttributes().getNamedItem("enchantmentLevel") != null) + enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); + int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); @@ -286,12 +290,16 @@ mantainIngredient = false; - entry.addIngredient(new Ingredient(id, count, isTaxIngredient, mantainIngredient)); + entry.addIngredient(new Ingredient(id, count, enchantmentLevel, isTaxIngredient, mantainIngredient)); } else if ("production".equalsIgnoreCase(n.getNodeName())) { + int enchantmentLevel = 0; + if (n.getAttributes().getNamedItem("enchantmentLevel") != null) + enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); + int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); - entry.addProduct(new Ingredient(id, count, false, false)); + entry.addProduct(new Ingredient(id, count, enchantmentLevel, false, false)); } } And put this: <production id="10452" count="1" enchantmentLevel="16"/> GOOD LUCK! ty for your replay i try it after some hours and i post the resault :)
0 nikosdevil20 Posted July 30, 2014 Author Posted July 30, 2014 MultiSellList.java @@ -119,5 +119,5 @@ else { - writeH(0x00); // enchant level + writeH(ing.getEnchantLevel()); // enchant level writeD(0x00); // augment id writeD(0x00); // mana @@ -154,5 +154,5 @@ else { - writeH(0x00); // enchant level + writeH(ing.getEnchantLevel()); // enchant level writeD(0x00); // augment id writeD(0x00); // mana PreparedEntry.java @@ -72,5 +72,5 @@ adenaAmount += _taxAmount; // do not forget tax if (adenaAmount > 0) - _ingredients.add(new Ingredient(ADENA_ID, adenaAmount, false, false)); + _ingredients.add(new Ingredient(ADENA_ID, adenaAmount,0, false, false)); Ingredient.java @@ -30,4 +30,5 @@ private int _itemId; private long _itemCount; + private int _EnchantmentLevel; private boolean _isTaxIngredient, _maintainIngredient; @@ -35,8 +36,9 @@ private ItemInfo _itemInfo = null; - public Ingredient(int itemId, long itemCount, boolean isTaxIngredient, boolean maintainIngredient) + public Ingredient(int itemId, long itemCount,int EnchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient) { _itemId = itemId; _itemCount = itemCount; + _EnchantmentLevel = EnchantmentLevel; _isTaxIngredient = isTaxIngredient; _maintainIngredient = maintainIngredient; @@ -80,5 +82,5 @@ public final int getEnchantLevel() { - return _itemInfo != null ? _itemInfo.getEnchantLevel() : 0; + return _itemInfo == null?_EnchantmentLevel:_itemInfo.getEnchantLevel(); } MultiSell.java @@ -270,4 +270,8 @@ if ("ingredient".equalsIgnoreCase(n.getNodeName())) { + int enchantmentLevel = 0; + if (n.getAttributes().getNamedItem("enchantmentLevel") != null) + enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); + int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); @@ -286,12 +290,16 @@ mantainIngredient = false; - entry.addIngredient(new Ingredient(id, count, isTaxIngredient, mantainIngredient)); + entry.addIngredient(new Ingredient(id, count, enchantmentLevel, isTaxIngredient, mantainIngredient)); } else if ("production".equalsIgnoreCase(n.getNodeName())) { + int enchantmentLevel = 0; + if (n.getAttributes().getNamedItem("enchantmentLevel") != null) + enchantmentLevel = Integer.parseInt(n.getAttributes().getNamedItem("enchantmentLevel").getNodeValue()); + int id = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); long count = Long.parseLong(n.getAttributes().getNamedItem("count").getNodeValue()); - entry.addProduct(new Ingredient(id, count, false, false)); + entry.addProduct(new Ingredient(id, count, enchantmentLevel, false, false)); } } And put this: <production id="10452" count="1" enchantmentLevel="16"/> GOOD LUCK! now i have this problem...in game when i go to see the items in shop, show me the item +12 but when i buy and i go to inventory the item is +0 :(
0 Hl4p3x Posted July 30, 2014 Posted July 30, 2014 (edited) Show me your Multisell shop.. or Try this: - <list > + <list maintainEnchantment="true"> <list maintainEnchantment="true"> <!-- Icarus Hammer - Anger --> <item id="1"> <ingredient id="29990" count="6"/> <production id="10452" count="1" enchantmentLevel="16"/> </item> Edited July 30, 2014 by Hl4p3x
0 nikosdevil20 Posted July 30, 2014 Author Posted July 30, 2014 (edited) Show me your Multisell shop.. or Try this: - <list > + <list maintainEnchantment="true"> <list maintainEnchantment="true"> <!-- Icarus Hammer - Anger --> <item id="1"> <ingredient id="29990" count="6"/> <production id="10452" count="1" enchantmentLevel="16"/> </item> http://pastebin.com/y3YYr41h maybe have problem with multishell.xsd ???? http://pastebin.com/zeFhZy9h Edited July 30, 2014 by nikosdevil20
0 Hl4p3x Posted July 30, 2014 Posted July 30, 2014 (edited) http://pastebin.com/y3YYr41h <?xml version='1.0' encoding='utf-8'?> <!-- Armor --> - <list> + <list maintainEnchantment="true"> <!-- Vesper Cuirass --> <item id="1"> <ingredient id="14721" count="3" enchant="0"/> <production id="16168" count="1" enchantmentLevel="12"/> </item> Change <list> to <list maintainEnchantment="true">.. and be happy! =D Edited July 30, 2014 by Hl4p3x
0 nikosdevil20 Posted July 30, 2014 Author Posted July 30, 2014 (edited) <?xml version='1.0' encoding='utf-8'?> <!-- Armor --> - <list> + <list maintainEnchantment="true"> <!-- Vesper Cuirass --> <item id="1"> <ingredient id="14721" count="3" enchant="0"/> <production id="16168" count="1" enchantmentLevel="12"/> </item> Change <list> to <list maintainEnchantment="true">.. and be happy! =D omg working!!! ty man!!! realy ty :D <3 I make share with your credits cuz i have find alot of ppl on need that ty again :) Edited July 30, 2014 by nikosdevil20
0 Hl4p3x Posted July 30, 2014 Posted July 30, 2014 omg working!!! ty man!!! realy ty :D <3 I make share with your credits cuz i have find alot of ppl on need that ty again :) Glad to help you!
Question
nikosdevil20
hello guys...i have 1 problem..i want sell enchanted items in gm shop..
i have try this:
<?xml version='1.0' encoding='utf-8'?>
<list>
<item id="1">
<ingredient id="14721" count="25"/>
<production id="15941" count="1" enchant="12"/>
</item>
i have try this:
<?xml version='1.0' encoding='utf-8'?>
<list maintainEnchantment="true">
<item id="1">
<ingredient id="14721" count="25"/>
<production id="15941" count="1" enchantmentLevel="12"/>
</item>
but nothing happened...i havent any error in my gs console but items are +0.. My pack is l2j freya if someone know how to fix this pls post here ty
25 answers to this question
Recommended Posts