• 🎉 Hey there! I've just launched my brand new server voting platform — Metin2 P Servers 🚀

Not answered Problem auto pickup DracaryS

Metin2Hub Bot
M2Hub Bot
Feb
Threads
66
2,380
2
1,307
113
Hello, I also have a problem with autopick-up, it collects all my items, but it puts them in the inventory and not specifically in storage
Resurs:


Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Member
May
Threads
1
186
6
18
31
Hungary
payhip.com
I have Special Inventory by Sanii:

char_item.cpp

for example:

Code:
#ifdef RENEWAL_PICKUP_AFFECT
void CHARACTER::AutoGiveItemNew(LPITEM item, bool printMsg)
{
    if (!item)
        return;

    const DWORD itemVnum = item->GetVnum();
    const WORD realCount = item->GetCount();

    WORD wCount = item->GetCount();

    if (item->IsStackable() && item->GetType() != ITEM_BLEND)
    {
        for (WORD i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
        {
            LPITEM invItem = GetInventoryItem(i);
            if (!invItem)
                continue;

            if (invItem->GetVnum() == itemVnum)
            {
                BYTE j;
                for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
                    if (invItem->GetSocket(j) != item->GetSocket(j))
                        break;
                if (j != ITEM_SOCKET_MAX_NUM)
                    continue;
                const WORD bCount2 = MIN(ITEM_MAX_COUNT - invItem->GetCount(), wCount);
                if (bCount2 > 0)
                {
                    wCount -= bCount2;
                    invItem->SetCount(invItem->GetCount() + bCount2);
                    if (wCount == 0)
                    {
                        if (printMsg)
                        {
                            if (realCount > 1)
                                ChatPacket(CHAT_TYPE_INFO, "Tárgyat kaptál: x%d %s.", realCount, item->GetName());
                            else
                                ChatPacket(CHAT_TYPE_INFO, "Tárgyat kaptál: %s.", item->GetName());
                        }
                        M2_DESTROY_ITEM(item);
                        return;
                    }
                }
            }
        }
        item->SetCount(wCount);
    }

    int cell;
    if (item->IsDragonSoul())
    {
        cell = GetEmptyDragonSoulInventory(item);
    }
    else
    {
#ifdef ENABLE_SPECIAL_INVENTORY
        cell = GetEmptyInventory(item);
#else
        cell = GetEmptyInventory(item->GetSize());
#endif
    }


    if (cell != -1)
    {
        if (item->IsDragonSoul())
            item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, cell));
        else
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));

        if (printMsg)
        {
            if (realCount > 1)
                ChatPacket(CHAT_TYPE_INFO, "Tárgyat kaptál: x%d %s.", realCount, item->GetName());
            else
                ChatPacket(CHAT_TYPE_INFO, "Tárgyat kaptál: %s.", item->GetName());
        }
    }
    else
    {
        if (printMsg && realCount != wCount)
        {
            if (realCount-wCount > 1)
                //ChatPacket(CHAT_TYPE_INFO, "111 %s %d", item->GetName(), realCount);
                ChatPacket(CHAT_TYPE_INFO, "Tárgyat kaptál: x%d %s.", realCount, item->GetName());
        }

        item->AddToGround(GetMapIndex(), GetXYZ());
        item->StartDestroyEvent();
        item->SetOwnership(this, 300);
    }
}
bool CHARACTER::CanPickupDirectly()
{
    return FindAffect(AFFECT_PICKUP_ENABLE) != NULL;
}
#endif
 

NXS

Member
Mar
Threads
0
104
1
18
I have the same problem.
It automatically picks up upgrade items, but puts them in the normal inventory, not in special storage.
How do I fix this?
 
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock