• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Item editing help

MadMOOK

Hoo
Joined
Apr 20, 2011
Messages
802
Reaction score
44
I changed the attack damage to 48, why will it not change in game like others?

I use 0.3.7 8.60 btw

This is my enchanted item in game...
Code:
09:04 You see a crystal mace (Atk:28 physical + 20 ice, Def:16, AS: 1200, club fighting +10, dual wielding) that has 956 charges left.
It weighs 80.00 oz.
ItemID: [7774].

This is my item in items.xml
Code:
    <item id="7774" article="a" name="crystal mace">
        <attribute key="weight" value="8000"/>
        <attribute key="defense" value="16"/>
        <attribute key="attack" value="48"/>
        <attribute key="weaponType" value="club"/>
        <attribute key="elementIce" value="20"/>
        <attribute key="charges" value="1000"/>
        <attribute key="decayTo" value="2445"/>
        <attribute key="showcharges" value="1"/>
        <attribute key="dualwield" value="2"/>
        <attribute key="skillClub" value="10"/>
        <attribute key="attackspeed" value="1200"/>
    </item>
 
Last edited:
You have to remove attribute named "attack" from your item. Example code for forgottenserver 1.0:
Code:
item:removeAttribute("attack")


_
Regards,
sn3ejk
 
@sn3ejk: You cannot remove/get/set non-default attributes.

Edit: In 1.0 setting attack to 48 should show that, in any other version I'm not sure if its (attack - elementalAttack) or just the attack.
 
I noticed on my 8.60 that when I edited an item, items created, summoned etc prior to my change had the same values as before, I summoned a new one and it had the new attributes listed. Maybe that is what you did?. Try changing it and create a new one and check the attributes on it then.
 
I was under the impression that the attack value you specify is inclusive of elemental damage? so if you wanted 48 damage it would have to be 48+20ice so 68 damage...
 
It is in movements :P
Code:
    <!--crystal mace-->
        <movevent type="Equip" itemid="2445" slot="hand" event="function" value="onEquipItem"/>
        <movevent type="DeEquip" itemid="2445" slot="hand" event="function" value="onDeEquipItem"/>
       
        <movevent type="Equip" itemid="7755" slot="hand" event="function" value="onEquipItem"/>
        <movevent type="DeEquip" itemid="7755" slot="hand" event="function" value="onDeEquipItem"/>
       
        <movevent type="Equip" itemid="7774" slot="hand" event="function" value="onEquipItem"/>
        <movevent type="DeEquip" itemid="7774" slot="hand" event="function" value="onDeEquipItem"/>
       
        <movevent type="Equip" itemid="7865" slot="hand" event="function" value="onEquipItem"/>
        <movevent type="DeEquip" itemid="7865" slot="hand" event="function" value="onDeEquipItem"/>
       
        <movevent type="Equip" itemid="7880" slot="hand" event="function" value="onEquipItem"/>
        <movevent type="DeEquip" itemid="7880" slot="hand" event="function" value="onDeEquipItem"/>
 
Give me some time tonight Ill see if I can look into it and help maybe. It is registered in weapons.xml as well too right?
It should be changing but ill get back to you.
 
Back
Top