Jump to content
  • 0

C++ HELP Drop Items in the Inventory


TekkForCeAD2

Question

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

  • Answers 7
  • Created
  • Last Reply

Top Posters For This Question

7 answers to this question

Recommended Posts

  • 0

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.