Jump to content

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello, is it possible to set to open boxes, clams, etc only if there's enough space in the inventory? As a result, the players won't be able to drop 1000000 items on the ground with their names on it.

quest itemdrop begin
    state start begin
        when 00000.use begin
        if pc.get_empty_inventory_count() < 1 then
        chat("You don't have enough inventory space.")
        else
        pc.remove_item(00000,1)
        *your drop actions here*

            end
        end
    end
end
end
Link to comment
Share on other sites

@Rumor

It is ugly way to do this.

 

I did simulation and it creates bug. When player lefts 1 empty slot he can easier drop one-slot items with content that have items multi-slot.

Better way is change function:

bool CHARACTER::GiveItemFromSpecialItemGroup

You have to check size of giving item and in case of 2 or more disable calling this function again with some bool var.

Next send text packet to player with information that he must empty at least 3 slots to open box.

Link to comment
Share on other sites

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.