Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Belt Inventory Bug


Adrian1428

Question

22 answers to this question

Recommended Posts

  • 0

Use the function item.remove() instead of pc.remove_item

Works perfect.

 

Wtf are you talking about? The official belt system doesn't even use quest.

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

  • 0

 

Use the function item.remove() instead of pc.remove_item

Works perfect.

 

Wtf are you talking about? The official belt system doesn't even use quest.

 

 

I think he means the soul stone quest to use pc.remove_item instead of item.remove but this isn't a "fix"

 

  • Love 2
Link to comment
Share on other sites

  • 0

It`s not realy a fix but..
 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

Link to comment
Share on other sites

  • 0

Fix: 

if pc . count_item ( 50513 ) < 1 then

say_title ( "Bug Controls" )

say ( "Object, drag it to the inventar." )

return

end

 Evidence that work: Click YouTube

 

Best Regards 

Can BARAN...

 

You could fix it by this way too:

    int item_remove(lua_State* L)
    {
        CQuestManager& q = CQuestManager::instance();
        LPITEM item = q.GetCurrentItem();
        if (item != NULL) {
            if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
                // ITEM_MANAGER::instance().RemoveItem(item);
                CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
            } else {
                sys_err("Tried to remove invalid item %p", get_pointer(item));
            }
            q.ClearCurrentItem();
        }
        
        return 0;
    }

I don't know if it's gonna work by that way

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

 

It would be easier to change the function void CHARACTER::RemoveSpecifyItem(DWORD vnumDWORD count)

to count belt items too, because if you can see it has only one for loop for inventory items

Link to comment
Share on other sites

  • 0

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

Link to comment
Share on other sites

  • 0

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

tried now, it does not work

Link to comment
Share on other sites

  • 0

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

 

2 years?Really? :blink:

 

  • Love 3
Link to comment
Share on other sites

  • 0
int item_remove(lua_State* L)
{
    CQuestManager& q = CQuestManager::instance();
    LPITEM item = q.GetCurrentItem();
    if (item != NULL) {
        if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
            // ITEM_MANAGER::instance().RemoveItem(item);
            CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
        } else {
            sys_err("Tried to remove invalid item %p", get_pointer(item));
        }
        q.ClearCurrentItem();
    }
    
    return 0;
}

by the way, this doesn`t work too.

other solutions?

Link to comment
Share on other sites

  • 0

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

 

2 years?Really? :blink:

 

 

I was ironic. :))

Link to comment
Share on other sites

  • 0

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

I tried this two years ago, does not work

 

wtf, two years? I think you were on Mars

 

Yes, definitely on Mars.

Link to comment
Share on other sites

  • 0

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

break it is for switch or loop , and doesn't work , problem is safebox

 

Another solution would be for the items of type18 can not put in safebox....or edited pc.remove_item function...

 

Maybe someone has a better solution...

  • Love 1
Link to comment
Share on other sites

  • 0

 

Fix: 

if pc . count_item ( 50513 ) < 1 then

say_title ( "Bug Controls" )

say ( "Object, drag it to the inventar." )

return

end

 Evidence that work: Click YouTube

 

Best Regards 

Can BARAN...

 

You could fix it by this way too:

    int item_remove(lua_State* L)
    {
        CQuestManager& q = CQuestManager::instance();
        LPITEM item = q.GetCurrentItem();
        if (item != NULL) {
            if (q.GetCurrentCharacterPtr() == item->GetOwner()) {
                // ITEM_MANAGER::instance().RemoveItem(item);
                CQuestManager::instance().GetCurrentCharacterPtr()->RemoveSpecifyItem(item->GetVnum(), 1);
            } else {
                sys_err("Tried to remove invalid item %p", get_pointer(item));
            }
            q.ClearCurrentItem();
        }
        
        return 0;
    }

I don't know if it's gonna work by that way

 

 

It`s not realy a fix but..

 

    static bool CanMoveIntoBeltInventory(LPITEM item)
    {
        bool canMove = true;

        if (item->GetType() == ITEM_QUEST)
        {
            canMove = false;
            break;
        }

        return canMove;
    }  

It`s not tested and the fix is made by a e*pvp member.

 

It would be easier to change the function void CHARACTER::RemoveSpecifyItem(DWORD vnumDWORD count)

to count belt items too, because if you can see it has only one for loop for inventory items

 

Hi Denis,
I just tried your version, but does not work!
Delete just what's in inventory, not in the belt inventory.
The Belt Item Inventory remains permanently.
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.