# Effects

In this file you can find the effects triggered by the items crafted using av\_business. Effects will be triggered based on the item ingredients or item type.

If the item doesn't have any ingredients it will trigger an effect based on item type.

## Effects based on Item Type

* In Config.DefaultEffects you have the effects triggered based on item type

<figure><img src="/files/FR3x9fx7NJTdQC4wL8b2" alt=""><figcaption></figcaption></figure>

* There's some examples like drink, food, alcohol and joint but if you add more item types to the script make sure to register an effect.
* Every option is a function that triggers a different event or function, for example drink and food triggers an export that adds thirst/hunger to your player, alcohol triggers an alcohol effect and joint triggers a drugs effect... Customize your own item types with the export, event or function that u want is on you to create it.
* Alcohol/drug functions can be found in **client/editable/effects.lua**

## **Effects based on ingredients**

* If the item contains ingredients you can trigger a different effect per ingredient, for example, if we consume an item named *Chocolate Milkshake* that contains the ingredients **Ice, Milk and Chocolate**, we are gonna trigger a different effect for every ingredient:

<figure><img src="/files/TIpdPiud1oscE83Z0Lcz" alt=""><figcaption></figcaption></figure>

> Milk triggers the export to add 100 points of thirst for our character
>
> Chocolate triggers the export to add 100 points of thirst for our character
>
> Ice triggers the export to add 25 points of thirst for our character

Chocolate Milkshake will add 225 points of thirst to our character after consume it, and this is because every ingredients triggers its own function.

If you mix ingredients that has functions with ingredients that don't trigger anything, the only effects you will have are the ones from the ingredients with custom effects.

**DefaultEffects** are only triggered if the item doesn't have any ingredients or if the ingredients didn't triggered any effect.

> **IMPORTANT:** Is on you to edit and make sure your ingredients triggers your custom exports/events correctly, *Config.Effects/Config.DefaultEffects* are triggered client side.


---

# 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://docs.av-scripts.com/laptop-pack-v3/business/config/effects.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.
