ItemIDs Database?

MFighter

Active Member
looking for a database with all itemIDs and their names.

Market Orders often get pulled correctly but without a name (NULL).

thanks in advance!
 

GliderPro

Active Member
I wrote a short application to covert the EveMon item database into a LavishSettings file. The LavishSettings file is committed into the EveBot source. The conversion application source is pasted below.

Code:
#include <tchar.h>
#include <fstream>
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
    int lineCount = 0;

    ifstream ifs("eve-items2.xml");
    ofstream ofs("EVEDB_Items.xml");

    ofs << "<?xml version='1.0' encoding='UTF-8'?>" << endl;
    ofs << "<!-- Generated by LavishSettings v2 -->" << endl;
    ofs << "<InnerSpaceSettings>" << endl;
    ofs << "    <Set Name=\"EVEDB_Items\">" << endl;

    while( !ifs.bad() && !ifs.eof() )
    {
        char buf[4096];

        ifs.getline(buf,sizeof(buf));

        if( buf[0] == 0 ) break;

        lineCount++;

        if( strstr(buf,"<Item Id=\"") )
        {
            char itemID[33];
            char itemName[129];
            char *pTok;

            // this is a hack.  it assumes that the ID is first and Name second.
            pTok = strtok(buf,"\"");
            pTok = strtok(NULL,"\"");
            strcpy(itemID,pTok);
            pTok = strtok(NULL,"\"");
            pTok = strtok(NULL,"\"");
            strcpy(itemName,pTok);

            ofs << "        <Set Name=\"" << itemName << "\">" << endl;
            ofs << "            <Setting Name=\"itemID\">" << itemID << "</Setting>" << endl ;
            ofs << "        </Set>" << endl;
        }
    }

    ofs << "    </Set>" << endl;
    ofs << "</InnerSpaceSettings>" << endl;

    ifs.close();
    ofs.close();

    cout << "Read " << lineCount << " lines." << endl;

    return 0;
}
 
Top Bottom