• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Correct way to transform item

Ovnyx

Member
Joined
Jul 25, 2017
Messages
163
Solutions
2
Reaction score
7
hello, i wanted to know what should be the correct way to transform item into another while equiped, and transform back again when dequiped, i just modify items.xml and add transformEquipTo, and transform back used decayto and a duration, but in future i will like this item to give something to the player like magic level or critical chance so i dont know if i should do a script just to give the player the atributes or the same script should be responsable for the transformation of the item too.

Thanks in advice
 
Solution
Just use one of the default rings as an example, like energy ring:

XML:
    <item id="2167" article="an" name="energy ring">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="transformEquipTo" value="2204" />
        <attribute key="stopduration" value="1" />
        <attribute key="showduration" value="1" />
    </item>
This is the unequipped item, you dont need to add any attributes to this item

XML:
    <item id="2204" article="an" name="energy ring (magic shield)">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="decayTo" value="0" />
        <attribute key="transformDeEquipTo" value="2167" />...
Just use one of the default rings as an example, like energy ring:

XML:
    <item id="2167" article="an" name="energy ring">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="transformEquipTo" value="2204" />
        <attribute key="stopduration" value="1" />
        <attribute key="showduration" value="1" />
    </item>
This is the unequipped item, you dont need to add any attributes to this item

XML:
    <item id="2204" article="an" name="energy ring (magic shield)">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="decayTo" value="0" />
        <attribute key="transformDeEquipTo" value="2167" />
        <attribute key="duration" value="600" />
        <attribute key="showduration" value="1" />
        <attribute key="manashield" value="1" />
        <attribute key="showattributes" value="1" />
    </item>
Here is the item while equipped and you have the transformDeEquipTo attribute that will transform it back to the original item afterwards
and you can just add attributes like magiclevelpoints and so on. You shuld not need a script at all

Just remember to register the item in movements for all the attributes to work
 
Solution
Just use one of the default rings as an example, like energy ring:

XML:
    <item id="2167" article="an" name="energy ring">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="transformEquipTo" value="2204" />
        <attribute key="stopduration" value="1" />
        <attribute key="showduration" value="1" />
    </item>
This is the unequipped item, you dont need to add any attributes to this item

XML:
    <item id="2204" article="an" name="energy ring (magic shield)">
        <attribute key="weight" value="80" />
        <attribute key="slotType" value="ring" />
        <attribute key="decayTo" value="0" />
        <attribute key="transformDeEquipTo" value="2167" />
        <attribute key="duration" value="600" />
        <attribute key="showduration" value="1" />
        <attribute key="manashield" value="1" />
        <attribute key="showattributes" value="1" />
    </item>
Here is the item while equipped and you have the transformDeEquipTo attribute that will transform it back to the original item afterwards
and you can just add attributes like magiclevelpoints and so on. You shuld not need a script at all

Just remember to register the item in movements for all the attributes to work
thank you, really helpfull
 
Back
Top