Jump to content

Chest Item Info


Recommended Posts

you can help me with this error?

17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::CGrid(int,int)" (??0CGrid@@QAE@HH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::~CGrid(void)" (??1CGrid@@QAE@XZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: void __thiscall CGrid::Clear(void)" (?Clear@CGrid@@QAEXXZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGrid::FindBlank(int,int)" (?FindBlank@CGrid@@QAEHHH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CGrid::Put(int,int,int)" (?Put@CGrid@@QAE_NHHH@Z)

 

  • Love 1
Link to comment
Share on other sites

  • Silver
20 hours ago, Elders said:

you can help me with this error?

17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::CGrid(int,int)" (??0CGrid@@QAE@HH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::~CGrid(void)" (??1CGrid@@QAE@XZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: void __thiscall CGrid::Clear(void)" (?Clear@CGrid@@QAEXXZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGrid::FindBlank(int,int)" (?FindBlank@CGrid@@QAEHHH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CGrid::Put(int,int,int)" (?Put@CGrid@@QAE_NHHH@Z)

 

you forget add grid.cc to eterbase project.  right click eterbase -> add -> existing item and select grid.cc in eterbase libary.

  • Love 1
Link to comment
Share on other sites

3 hours ago, SamuraiHUN said:

you forget add grid.cc to eterbase project.  right click eterbase -> add -> existing item and select grid.cc in eterbase libary.

Thanks that helped me but those 2 errors remains ?

"public: class std::vector<unsigned long,class std::allocator<unsigned long> > const * __thiscall CItemManager::GetItemDropInfoVec(unsigned long)const " (?GetItemDropInfoVec@CItemManager@@QBEPBV?$vector@KV?$allocator@K@std@@@std@@K@Z)

public: bool __thiscall CItemManager::LoadChestDropInfo(char const *)" (?LoadChestDropInfo@CItemManager@@QAE_NPBD@Z)

Any idea ?

 

EDIT : I applied same method -> Added ItemManager to UserInterface, but my game after Ctrl+Click crash out with 

uiChestDropInfo.py(line:48) __LoadWindow
uiChestDropInfo.py(line:69) __BindObject
ui.py(line:2799) GetChild

ChestDropInfoWindow.__LoadWindow.__BindObject - <type 'exceptions.KeyError'>:'CurrentPage'

in sysserr

 

EDIT: Fixed in ui.py

Edited by EnchikO
new error
Link to comment
Share on other sites

  • 4 months later...

Hey, i have a problem with your system. Everything works fine but it seems like your system also reads some drops from source somehow? There are few items that can drop things and they are not included in special_item_group or fishing.txt. Is there any way to change it?  


Edit: It doesn't read form source, i disabled source drop but these items still appear in chest drop info although they don't drop anything:

30093 - 30096 

Link to comment
Share on other sites

  • Premium
On 1/7/2022 at 1:41 AM, Mithras01 said:

Maybe you can add autoresize of slots there are not too many items, because it is look too empty :-?

  Hide contents

.png

Working perfect - thank you for the release!

Is it normal, that it shows 3 slots for 1 slot chests?

HdfWLcD.png

Best Regards

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

On 1/2/2023 at 5:50 AM, SussyFlore96 said:

Hello! How I can use this system for special storage?

Thanks! 

for the special inventory it is the same step as for the normal inventory, look for def __UseItem(self, slotIndex): and after item.SelectItem(ItemVNum) paste the tutorial lines

works without any problems

 

test.png

 

Edited by Metin2 Dev
Core X - External 2 Internal

Captura-de-pantalla-2024-03-20-112804.pn

 

Link to comment
Share on other sites

On 1/4/2023 at 10:23 AM, josehdelaro said:

for the special inventory it is the same step as for the normal inventory, look for def __UseItem(self, slotIndex): and after item.SelectItem(ItemVNum) paste the tutorial lines

works without any problems

 

test.png

 

Thanks for you relpy! 

I tryed, but it's doesn't work.

Ddfpruj.png

a20B4mz.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 month later...

Alternative download links → Alternate_1 or Alternate_2 or Alternate_3

 

Any solution?

 

Later edit : in my case on def Close function, i've deleted the self. wndChestDrop.. and after this i tried to hide in the same function and that's why.. so just hide first and after delete the self.wndChestDrop..

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
  • 4 weeks later...
  • 1 month later...
  • 2 months later...
  • 3 weeks later...

Hello, first thank you for share.

Please, I can't see a drop in any chest and a shortcut to show the drop (both in special_item_group.txt and in chest_drop are added).

However, in items that contain lucky_box, the system also shows me the command to show the drop and it shows me the drop even if these items are only written in lucky_box.txt. (chest_drop or special_idem_group.txt does not contain these item IDs)

Spoiler
#if defined(ENABLE_CHEST_DROP_INFO)
PyObject* itemHasDropInfo(PyObject* poSelf, PyObject* poArgs)
{
    int iItemIndex;
    if (!PyTuple_GetInteger(poArgs, 0, &iItemIndex))
        return Py_BadArgument();
    bool bMain;
    if (!PyTuple_GetBoolean(poArgs, 1, &bMain))
        return Py_BadArgument();
    CItemManager::TChestDropItemInfoVec* vDropInfo = nullptr;
    
    if (bMain)
        vDropInfo = CItemManager::Instance().GetItemDropInfoVec(iItemIndex);
    else
        vDropInfo = CItemManager::Instance().GetBaseItemDropInfoVec(iItemIndex);
    return Py_BuildValue("b", (vDropInfo && !vDropInfo->empty()));
}
static int __CreateDropPage(CItemManager::TChestDropItemInfoVec* vDropInfo, PyObject* poList)
{
    int iPageCount(0);
    CGrid grid(5, 8);
    
    if (vDropInfo && !vDropInfo->empty())
    {
        for (CItemManager::TChestDropItemInfoVec::const_iterator it = vDropInfo->begin(); it != vDropInfo->end(); ++it)
        {
            const CItemManager::SDropItemInfo& dwDropInfo = *it;
            CItemData* pItemData;
            if (!CItemManager::Instance().GetItemDataPointer(dwDropInfo.dwDropVnum, &pItemData))
                continue;
            const BYTE bItemSize = pItemData->GetSize();
            while (true)
            {
                const int iPos = grid.FindBlank(1, bItemSize);
                if (iPos >= 0)
                {
                    grid.Put(iPos, 1, bItemSize);
                    PyList_Append(poList, Py_BuildValue("iiii", iPageCount, iPos, dwDropInfo.dwDropVnum, dwDropInfo.iCount));
                    break;
                }
                else
                {
                    grid.Clear();
                    ++iPageCount;
                }
            }
        }
    }
    return iPageCount;
}
PyObject* itemGetDropInfo(PyObject* poSelf, PyObject* poArgs)
{
    int iItemIndex;
    if (!PyTuple_GetInteger(poArgs, 0, &iItemIndex))
        return Py_BadArgument();
    bool bMain;
    if (!PyTuple_GetBoolean(poArgs, 1, &bMain))
        return Py_BadArgument();
    PyObject* poList = PyList_New(0);
    CItemManager::TChestDropItemInfoVec* vDropInfo = nullptr;
    if (bMain)
        vDropInfo = CItemManager::Instance().GetItemDropInfoVec(iItemIndex);
    else
        vDropInfo = CItemManager::Instance().GetBaseItemDropInfoVec(iItemIndex);
    return Py_BuildValue("iO", __CreateDropPage(vDropInfo, poList), poList);
}
#endif

 

 

Thanks for help.
Have a nice day.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/31/2022 at 6:21 PM, Elders said:

you can help me with this error?

17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::CGrid(int,int)" (??0CGrid@@QAE@HH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::~CGrid(void)" (??1CGrid@@QAE@XZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: void __thiscall CGrid::Clear(void)" (?Clear@CGrid@@QAEXXZ)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGrid::FindBlank(int,int)" (?FindBlank@CGrid@@QAEHHH@Z)
17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CGrid::Put(int,int,int)" (?Put@CGrid@@QAE_NHHH@Z)

 

Did not add EterBase files to Visual Studio

Working perfectly...

Thanks @ Mali...

.jpg

.jpg

Link to comment
Share on other sites

  • Management
1 hour ago, B3AT said:

What is the Passwort for the archive?

In download page.

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.