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

Amulet charge problem

Felipe Monteiro

Webmaster
Joined
Feb 27, 2009
Messages
460
Reaction score
59
Location
Brasil
My amulets show in game only 1 charge when look it, but in items.xml is right charges.

I hope someone can help me
 
You should check your movements.xml and make sure your amulet ID is equal to the one in items.xml

ex:
/data/movements/movements.xml
Code:
<!-- Strange Talisman -->
                <movevent type="Equip" itemid="2161 -- itemID" slot="necklace" event="function" value="onEquipItem"/>
                <movevent type="DeEquip" itemid="2161 --- itemID" slot="necklace" event="function" value="onDeEquipItem"/>
/data/items/items.xml
Code:
    <item id="2161 -- itemID" article="a" name="strange talisman">
        <attribute key="weight" value="290"/>
        <attribute key="slotType" value="necklace"/>
        <attribute key="charges" value="200"/>
        <attribute key="showcharges" value="1"/> 
        <attribute key="absorbPercentEnergy" value="10"/>
        <attribute key="showattributes" value="1"/>
    </item>

If this din't help you, please tell us what distro you're using and also post your amulet script, both in items.xml and movements.xml

EDIT: thought
Lua:
 was still working, changed to [ code ] [/SIZE]
 
Last edited:
You should check your movements.xml and make sure your amulet ID is equal to the one in items.xml

ex:
/data/movements/movements.xml
Code:
<!-- Strange Talisman -->
                <movevent type="Equip" itemid="2161 -- itemID" slot="necklace" event="function" value="onEquipItem"/>
                <movevent type="DeEquip" itemid="2161 --- itemID" slot="necklace" event="function" value="onDeEquipItem"/>
/data/items/items.xml
Code:
    <item id="2161 -- itemID" article="a" name="strange talisman">
        <attribute key="weight" value="290"/>
        <attribute key="slotType" value="necklace"/>
        <attribute key="charges" value="200"/>
        <attribute key="showcharges" value="1"/> -- If you change this to "0" you dont have to worry about the amulet to show charges when looking at it. If the case is that the charges work but the description says something else
        <attribute key="absorbPercentEnergy" value="10"/>
        <attribute key="showattributes" value="1"/>
    </item>

If this din't help you, please tell us what distro you're using and also post your amulet script, both in items.xml and movements.xml

EDIT: thought
Lua:
 was still working, changed to [ code ] [/SIZE][/quote]

Im using tfs 1.0,  and about configuration looks right..

Items.xml
[code]
<item id="2197" article="a" name="stone skin amulet">
        <attribute key="weight" value="700" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="5" />
        <attribute key="showcharges" value="1" />
        <attribute key="absorbPercentPhysical" value="80" />
        <attribute key="absorbPercentDeath" value="80" />
        <attribute key="showattributes" value="1" />
    </item>

Movements.xml
Code:
<movevent event="Equip" itemid="2197" slot="necklace" function="onEquipItem"/>
<movevent event="DeEquip" itemid="2197" slot="necklace" function="onDeEquipItem"/>

but, when i look it in-game..
Code:
09:28 You see a stone skin amulet (protection physical +80%, death +80%) that has 1 charge left.
It weighs 7.00 oz.
 
Code:
<item id="2197" article="a" name="stone skin amulet">
        <attribute key="weight" value="700" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="5" />
        <attribute key="showcharges" value="5" /> 
        <attribute key="absorbPercentPhysical" value="80" />
        <attribute key="absorbPercentDeath" value="80" />
        <attribute key="showattributes" value="1" />
    </item>

Try this
 
Code:
<item id="2197" article="a" name="stone skin amulet">
        <attribute key="weight" value="700"/>
        <attribute key="slotType" value="necklace"/>
        <attribute key="charges" value="5"/>
        <attribute key="showcharges" value="1"/>
        <attribute key="absorbPercentPhysical" value="80" />
        <attribute key="absorbPercentDeath" value="80" />
        <attribute key="showattributes" value="1"/>
    </item>

Yeah, you should leave "showcharges" at "1" for enable and "0" for disable.
Im not sure what could be the problem, perhaps it's in the source?

Anyway, the code posted above is another amulet script but changed the name, ids etc.. It could just be that there is just a minor character missing somewhere that I didn't see, but this code should fix that.

Meantime while waiting for someone who knows what could be the problem just change "showcharges" to "0" to disable it. The charges will still be there but the description will not show any charges
 
Example SSA

Items.xml
PHP:
    <item id="2197" article="a" name="stone skin amulet">
        <attribute key="weight" value="700"/>
        <attribute key="slotType" value="necklace"/>
        <attribute key="charges" value="5"/>
        <attribute key="showcharges" value="1"/>
        <attribute key="absorbPercentPhysical" value="80"/>
        <attribute key="absorbPercentDeath" value="80"/>
        <attribute key="showattributes" value="1"/>
    </item>

Movements.xml

PHP:
    <movevent type="Equip" itemid="2197" slot="necklace" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="2197" slot="necklace" event="function" value="onDeEquipItem"/>

if this not working you need to compile your ot :p
 
NPC
Code:
stone skin amulet,2197,5000,5;
Monsters
Code:
<item id="2197" subtype="5" chance="900"/>
Could you explain your issue more clearly?
 
I'm using TFS 1.2, got my items.xml and movements.xml correctly set up, and subtype (or subType) is not working.
Anybody knows the solution? I have also tried to set countmin and countmax, without success.
 
If you're trying to give the player an item with a script
Code:
doPlayerGiveItem(cid, <AMULET ID>, 1, 100)
 
Back
Top