# Create new item drink

You can add any drink in config.lua look for

* <mark style="color:orange;">name</mark>
  * The name is the item name (not the label) so whatever item name you put there will\
    get registered to that specific item (on standalone it will be command so example: /item)
* <mark style="color:orange;">numbersOfSips</mark>
  * The number of sips is how many times the player can sip from the bottle he holds.
* <mark style="color:orange;">eachSipGiveDrunk</mark>
  * This is how much percentage of alcohol each sip gives to the player

```
{
    -- name of the item
    name = "beer",
    
    -- This number represents how many sips player can take before the beer will be empty
    -- the maximum number of sips for this item will be 5
    numbersOfSips = 5,
    
    -- This represent how much percentage of drunkenness the player will earn per each sip he takes
    -- numbersOfSips * eachSipGiveDrunk. In this case 2 * 5 = 10% of total drunkenness gained
    eachSipGiveDrunk = 2,
    
    -- This handles the prop placement in the player's hand. Leave as default unless you are an advanced user.
    attachmentInfo = DefaultAttachmentPropertiesOfItem,
    
    -- Should we remove the bottle after player will finish the drink?
    -- true = will delete the prop after finishing the drink
    -- false = will let the prop drop on the ground
    removeBottle = false,    
},
```

## Example of the config:

```lua
-- Configurable drunk list
-- here you can add your own item that can be drinkable
Config.DrunkList = {
	{
		-- name of the item
		name = "beer",

		-- This number represents how many sips player can take before the beer will be empty
		-- the maximum number of sips for this item will be 5
		numbersOfSips = 5,

		-- This represent how much percentage of drunkenness the player will earn per each sip he takes
		-- numbersOfSips * eachSipGiveDrunk. In this case 2 * 5 = 10% of total drunkenness gained
		eachSipGiveDrunk = 2,

		-- This handles the prop placement in the player's hand. Leave as default unless you are an advanced user.
		attachmentInfo = DefaultAttachmentPropertiesOfItem,

		-- This option is 100% optional, when the player finishes drinking the alcohol bottle
		-- it will give him a specific item on finishing the drink, for this case it will be `empty_bottle`
		-- giveEmptyBottle = "empty_bottle",        
	},
	-------
	{
		-- name of the item
		name = "another item example",

		-- This number represents how many sips player can take before the item will be empty
		-- the maximum number of sips for this item will be 5
		numbersOfSips = 5,

		-- This represent how much percentage of drunkenness the player will earn per each sip he takes
		-- numbersOfSips * eachSipGiveDrunk. In this case 5 * 5 = 25% of total drunkenness gained
		eachSipGiveDrunk = 5,

		-- This handles the prop placement in the player's hand. Leave as default unless you are an advanced user.
		attachmentInfo = DefaultAttachmentPropertiesOfItem,

		-- This option is 100% optional, when the player finishes drinking the alcohol bottle
		-- it will give him a specific item on finishing the drink, for this case it will be `empty_bottle`
		-- giveEmptyBottle = "empty_bottle",       
	},
	-------
	{
		-- name of the item
		name = "yet again another drink!",

		-- This number represents how many sips player can take before the item will be empty
		-- the maximum number of sips for this item will be 5
		numbersOfSips = 10,

		-- This represent how much percentage of drunkenness the player will earn per each sip he takes
		-- numbersOfSips * eachSipGiveDrunk. In this case 1 * 10 = 10% of total drunkenness gained
		eachSipGiveDrunk = 1,

		-- This handles the prop placement in the player's hand. Leave as default unless you are an advanced user.
		attachmentInfo = DefaultAttachmentPropertiesOfItem,

		-- This option is 100% optional, when the player finishes drinking the alcohol bottle
		-- it will give him a specific item on finishing the drink, for this case it will be `empty_bottle`
		-- giveEmptyBottle = "empty_bottle",       
	},
}
```

## Extra settings for ox\_inventory item

Whenever you create a new drink and have `Config.ox_inv` set to `true` in your `config.lua`,\
the resource will use exports. This means each new item for `rcore_drunk` must use a specific export\
name in `ox_inventory/data/items.lua`.

For example, let's say we create a new item called `morgan`. The new item should look like this:

```lua
['morgan'] = {
    label = 'Captain Morgan',
    weight = 250,
    close = true,
    consume = 0,
    client = {},
    server = {
        export = 'rcore_drunk.morgan',
    },
},
```

The export will <mark style="color:red;">always follow the format: rcore\_drunk.ITEMNAME.</mark>

Few more examples:

```lua
['morgan'] = {
    label = 'Captain Morgan',
    weight = 250,
    close = true,
    consume = 0,
    client = {},
    server = {
        export = 'rcore_drunk.morgan',
    },
},
['daniel'] = {
    label = 'Jack Daniel',
    weight = 250,
    close = true,
    consume = 0,
    client = {},
    server = {
        export = 'rcore_drunk.daniel',
    },
},
['gin'] = {
    label = 'Gin 1L',
    weight = 250,
    close = true,
    consume = 0,
    client = {},
    server = {
        export = 'rcore_drunk.gin',
    },
},

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_drunk/item_drink.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
