Jump to content
  • 0

Item Enchantment


Question

4 answers to this question

Recommended Posts

  • 0
Posted

maybe you need that:

<?xml version='1.0' encoding='utf-8'?>
<list maintainEnchantment="true">
    <item id="1">
        <ingredient id="57" count="200000000"/>
        <production id="8191" count="1" enchant="26"/>
    </item>
    </list>

  • 0
Posted (edited)

You only need to use npc.setEnchant(int) on npc spawn. If you want it updated instantly (let's say the NPC was already spawned and you edit the enchant value), you have to broadcast NpcInfo packet every time you edit the color (in order players see it, otherwise they can teleport back to the zone and it will correctly show).

If you want it for every instance of a particular NPC, you can add/edit "enchant" tag on its template directly, which will automatically setEnchant() on NPC instance creation. Then you don't have to care about anything else, since it's hardwritten.

Edited by Tryskell

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..