Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

Open boxes


Geek

Question

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.

Link to comment
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

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

@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

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

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 7

      PHOENIX2 !OLDSCHOOL SERVER, PAYTOWIN REMOVED!

    2. 0

      special_item_group and chest apprentice

    3. 2

      Alternative Alternative Zodiac Suit - Ninja M

    4. 0

      character details negative bonus

    5. 0

      Questlib mysql_query function problem

  • Recently Browsing

    • No registered users viewing this page.

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.