Jump to content
  • 0

L2J Freya Enchanted Items In Gm Shop


nikosdevil20

Question

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 smile.png ty

Link to comment
Share on other sites

Recommended Posts

  • 0
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!

Link to comment
Share on other sites

  • 0

i would like to see the answer.. i could use it on c6 :D i like the idea :D

i dont think ppl write a clean answer. all now say search have topics and bla bla but i have search all topics about this problem and nothing of answers work for me...

Link to comment
Share on other sites

  • 0

i tried it on my l2jfrozen c6 pack.. and failed.. 

i can try more and more..  a thousand different compinations.. and i will solve your problem :D (but i am not sure if it will work for your pack ;p)

Link to comment
Share on other sites

  • 0

i think i got an idea on how to do it.. 

create a new custom weapon with based enchant +12 (as i saw thats the value you want)

same stats as the normal one (only upgradedthe enchanted stas ;p )

then put it on multisell.. its tricky.. but it might work :D

Link to comment
Share on other sites

  • 0

maybe it just doesn show  the enchant in the shop but when you buy  the weapons the weapons get enchanted automatically
or at least thats how it works to me and i have it like this:
 

<?xml version='1.0' encoding='utf-8'?>

<list maintainEnchantment="true">

  <!-- thrower-->
  <item id="1">
    <ingredient id="5572" count="1000"/>
    <ingredient id="5570" count="1000"/>
    <ingredient id="5574" count="800"/>
    <production id="16005" count="1" enchant="17"/>
  </item>
Edited by Stev0
Link to comment
Share on other sites

  • 0

 

maybe it just doesn show  the enchant in the shop but when you buy  the weapons the weapons get enchanted automatically

or at least thats how it works to me and i have it like this:

 

<?xml version='1.0' encoding='utf-8'?>

<list maintainEnchantment="true">

  <!-- thrower-->
  <item id="1">
    <ingredient id="5572" count="1000"/>
    <ingredient id="5570" count="1000"/>
    <ingredient id="5574" count="800"/>
    <production id="16005" count="1" enchant="17"/>
  </item>

you have this at freya l2j and work?

Link to comment
Share on other sites

  • 0

nah mine is l2j forzen c6 i just said maybe its the same when you buy the weapon you get your weapon enchanted but in the shop it doesnt show the enchant

 
Link to comment
Share on other sites

  • 0

 

nah mine is l2j forzen c6 i just said maybe its the same when you buy the weapon you get your weapon enchanted but in the shop it doesnt show the enchant

 

 

no work for me...but ty for your try..

Link to comment
Share on other sites

  • 0

This doesn't work since many time in L2J. I know that i've seen few servers to have this kinda customization but it's custom and doesn't work default in L2J.

I would recommend you to use google and search a little bit for patch  "Enchanted items in NPC's" if it's shared, otherwise code it yourself if noone is wiling to share it.

Good luck.

Link to comment
Share on other sites

  • 0

This doesn't work since many time in L2J. I know that i've seen few servers to have this kinda customization but it's custom and doesn't work default in L2J.

I would recommend you to use google and search a little bit for patch  "Enchanted items in NPC's" if it's shared, otherwise code it yourself if noone is wiling to share it.

Good luck.

someone say me old l2j have this code but remove and fix some things about this for phx hacks.. i have already try search for this in google but i dont find something like this..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


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