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

TFS 0.X Create Item Bug

_Aion_

Nothing Else
Joined
Jan 19, 2010
Messages
400
Solutions
4
Reaction score
10
Location
Jequie,Bahia,Brazil
Hello. Someone know how solve one problem?
BUG: If i try make item by /i name show this error Item with such name does not exists.
But this item are registered in item.xml
like this
XML:
    <item id="20759" article="a" name="Fragmento Desconhecido" plural="Fragmentos Desconhecidos">
        <attribute key="description" value="Um fragmento que até então é desconhecido." />
    </item>
but for /i ID works perfecly

I have this function
Lua:
function getItemNameById(itemid)
    return getItemDescriptionsById(itemid).name
end
and this error appear in another places, like autoloot collect
I dont know how solve this
 
Solution
Solution:
Find this

C++:
    if(id > 20000 && id < 20100)
    {
        id -= 20000;
        ItemType* iType = new ItemType();

        iType->id = id;
        items.addElement(iType, iType->id);
    }

And this
C++:
                    if(serverId > 20000 && serverId < 20100)
                        serverId = serverId - 20000;
Change 20000 to another number, like 30000, 40000.
Solution:
Find this

C++:
    if(id > 20000 && id < 20100)
    {
        id -= 20000;
        ItemType* iType = new ItemType();

        iType->id = id;
        items.addElement(iType, iType->id);
    }

And this
C++:
                    if(serverId > 20000 && serverId < 20100)
                        serverId = serverId - 20000;
Change 20000 to another number, like 30000, 40000.
 
Solution
Solução:
Encontre isso.

C++:
 se (id > 20000 && id < 20100)
    {
        id -= 20000;
 ItemType* iType = novo ItemType();

        iType->id = id;
        items.addElement(iType, iType->id);
 }[/CÓDIGO]

E isso
[CODE=cpp] if (serverId > 20000 && serverId < 20100)
 serverId = serverId - 20000; [/CÓDIGO]
Mude 20000 para outro número, como 30000, 40000.
[/QUOTE]

[/QUOTE]


hello, I'm also with the same problem, if the item is larger than id 20100 I can not create using the name, only the id. I found this code in items.cpp. I made the modification, but I still can't create it. Do I need to modify it in another file? the item is already registered in items.xml
 
Back
Top