Jump to content

Recommended Posts

Hello everyone,

 

i have a problem, when i absobate attribute from a weapon or amor i always have 1%

 

https://metin2.download/picture/Fp6D8CFt2e171De7R63O84glz7mv31sh/.png

 

if its a big problem i will pay for the fix :)

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/13211-sash-absorbation/
Share on other sites

  • Active Member

	ACMD(do_item)
{
    char arg1[256], arg2[256];
    two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));
	    if (!*arg1)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: item <item vnum>");
        return;
    }
	    int iCount = 1;
	    if (*arg2)
    {
        str_to_number(iCount, arg2);
        iCount = MINMAX(1, iCount, ITEM_MAX_COUNT);
    }
	    DWORD dwVnum;
	    if (isnhdigit(*arg1))
        str_to_number(dwVnum, arg1);
    else
    {
        if (!ITEM_MANAGER::instance().GetVnum(arg1, dwVnum))
        {
            ch->ChatPacket(CHAT_TYPE_INFO, "#%u item not exist by that vnum.", dwVnum);
            return;
        }
    }
	    LPITEM item = ITEM_MANAGER::instance().CreateItem(dwVnum, iCount, 0, true);
	    if (item)
    {
        if (item->IsDragonSoul())
        {
            int iEmptyPos = ch->GetEmptyDragonSoulInventory(item);
	            if (iEmptyPos != -1)
            {
                item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos));
                LogManager::instance().ItemLog(ch, item, "GM", item->GetName());
            }
            else
            {
                M2_DESTROY_ITEM(item);
                if (!ch->DragonSoul_IsQualified())
                {
                    ch->ChatPacket(CHAT_TYPE_INFO, "ŔÎşĄŔĚ Č°ĽşČ­ µÇÁö ľĘŔ˝.");
                }
                else
                    ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space.");
            }
        }
        else
        {
            int iEmptyPos = ch->GetEmptyInventory(item->GetSize());
	            if (iEmptyPos != -1)
            {
                if (item->GetType() == ITEM_COSTUME && item->GetSubType() == COSTUME_ACCE)
                    item->SetSocket(1, iCount);
	                item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
                LogManager::instance().ItemLog(ch, item, "GM", item->GetName());
	            }
            else
            {
                M2_DESTROY_ITEM(item);
                ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space.");
            }
        }
    }
    else
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "#%u item not exist by that vnum.", dwVnum);
    }
}
	

/item 85004 20

:)

Link to comment
https://metin2.dev/topic/13211-sash-absorbation/#findComment-75611
Share on other sites

  • 2 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.