Jump to content

C++ HELP Drop Items in the Inventory


Recommended Posts

Hello,

if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 10)
        {
            int pct = quest::CQuestManager::instance().GetEventFlag("mondi_drop");

            if (pct > 0)
            {
                const DWORD ITEM_VNUM = 50011;

                if (number(1,400) <= pct)
                {
                    if ((item = CreateItem(ITEM_VNUM, 1, 0, true)))
                        vec_item.push_back(item);
                }
            }
        }


What i must change that the drop came in the inventory and not on the floor.

Link to comment
Share on other sites

Wait , i edit you code.

 

 

    if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5)
    {
        int pct = quest::CQuestManager::instance().GetEventFlag("mondi_drop");

        if (pct > 0)
        {
            if (number(1,100) <= pct)
            {
                    const static DWORD moon_treasure = 50011;
                    pkKiller->AutoGiveItem(moon_treasure, 1);
            }
        }
    }

 

 

Link to comment
Share on other sites

3 hours ago, M.Sorin said:

Wait , i edit you code.

 

 

    if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5)
    {
        int pct = quest::CQuestManager::instance().GetEventFlag("mondi_drop");

        if (pct > 0)
        {
            if (number(1,100) <= pct)
            {
                    const static DWORD moon_treasure = 50011;
                    pkKiller->AutoGiveItem(moon_treasure, 1);
            }
        }
    }

 

 

Thanks ! work fine.

Link to comment
Share on other sites

  • 11 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.