# Config.lua

#### The configuration file allows you to customize various aspects of **Ks\_Mystic\_Spells\_v2**, such as tarot tables, seating options, potion properties, and item probability. Below is a breakdown of the key sections:

## Configuration Example

{% tabs %}
{% tab title="Confit.lua" %}

```lua
Config = {}

Config.TarotTables = {
    {coords = vector3(162.4500027, 164.1986, 106.8614), dist = 3.0, job = 'tarotist', jobGrade = 1}, --KS Mystic Spells

}

Config.Seats = {
    enabled = true,
    Text = '3D',  -- '3D' - 'ox_target' - 'qb-target'
    Key  =  47,   -- [G]  -- only for  SeatText == '3D'
}

Config.SeatPos = {
    vector4(161.8754, 162.9285, 106.3615, 337.3988),
    vector4(162.7651, 165.2747, 106.3607, 164.6304)
}




--          Potion configuration:
-- value: Healing or protection value (if applicable)
-- time: Duration of the effect in seconds (if applicable)
-- useTime: Time it takes to use the potion in seconds
-- animals: List of animals (only applicable for the 'Animals' potion)
Config.Potions = {
    ['Healing'] = {
        value = 100, useTime = 5  -- Time on seconds
    },
    ['Shield'] = {
        value = 100, useTime = 5
    },
    ['Animals'] = {
        value = 60, useTime = 5,  -- Note: value is the time the animal will be active
        animals = {'a_c_boar', 'a_c_chickenhawk', 'a_c_chimp', 'a_c_cormorant', 'a_c_cow', 'a_c_coyote', 'a_c_deer'}
    },
    ['Invisibility'] = {
        value = 25, useTime = 5  -- Note: value is the duration of invisibility in seconds -> default 25 seconds
    },
    ['Speed'] = {
        value = 30, useTime = 5  -- Note: value is the duration of speed boost in seconds -> default 30 seconds
    },
}


Config.Probability = { -- Note: works only if Config.RandomItems = false
    ['common']    = 70, -- <- Keep this numbers, they should always add 100
    ['rare']      = 20, -- <- Keep this numbers, they should always add 100
    ['legendary'] = 10  -- <- Keep this numbers, they should always add 100
}

Config.RandomItems = true -- true will give random items, false will be based on the probability percentage of Config.Probability
Config.CristalBallItems = {
    {name = 'p1',     amount = 1,  rarity = 'common'},     -- Health Potion
    {name = 'p2',     amount = 1,  rarity = 'common'},     -- Shield Potion
    {name = "p3",     amount = 1,  rarity = 'common'},     -- Animals Potion
    {name = "p4",     amount = 1,  rarity = 'rare'},       -- Invisibility Potion
    {name = "p5",     amount = 1,  rarity = 'rare'},       -- Speed Potion
    {name = "ouija",  amount = 1,  rarity = 'legendary'},  -- Ouija Board
}

```

{% endtab %}
{% endtabs %}

### **Tarot Table Configuration**

Define tarot table locations and their specific settings:

```lua
Config.TarotTables = {

    {coords = vector3(162.4500027, 164.1986, 106.8614), dist = 3.0, job = 'tarotist', jobGrade = 1}, --KS Mystic Spells
}
```

* `coords`: The location of the tarot table.
* `dist`: Interaction distance (in meters).
* `job`: The job or role allowed to use the table.
* `jobGrade`: The job grade allowed to use the table.

#### Usage

**Configuration (`config.lua`)**

The configuration file allows you to customize various aspects of **Ks\_Mystic\_Spells\_v2**, such as tarot tables, seating options, potion properties, and item probability. Below is a breakdown of the key sections:

***

**Tarot Table Configuration**

Define tarot table locations and their specific settings:

```lua
luaCopyEditConfig.TarotTables = {
    {coords = vector3(162.4500027, 164.1986, 106.8614), dist = 3.0, job = 'tarotist'}, -- KS Mystic Spells
}
```

* `coords`: The location of the tarot table.
* `dist`: Interaction distance (in meters).
* `job`: The job or role allowed to use the table.

***

### **Seating Options**

Customize the interaction text and key for seating at specific locations:

```lua
Config.Seats = {
    enabled = true,
    Text = '3D',  -- '3D' - 'ox_target' - 'qb-target'
    Key  =  47,   -- [G]  -- only for  SeatText == '3D'
}

Config.SeatPos = {
    vector4(161.8754, 162.9285, 106.3615, 337.3988),
    vector4(162.7651, 165.2747, 106.3607, 164.6304)
}


```

***

### **Potion Configuration**

Define properties for each potion type:

```lua
Config.Potions = {
    ['Healing'] = {
        value = 100, useTime = 5  -- Restores health (value) in 5 seconds.
    },
    ['Shield'] = {
        value = 100, useTime = 5  -- Adds 100 points of protection in 5 seconds.
    },
    ['Animals'] = {
        value = 60, useTime = 5,  
        animals = {'a_c_boar', 'a_c_chickenhawk', 'a_c_chimp', 'a_c_cormorant', 'a_c_cow', 'a_c_coyote', 'a_c_deer'}
    },
    ['Invisibility'] = {
        value = 25, useTime = 5  -- Grants invisibility for 25 seconds.
    },
    ['Speed'] = {
        value = 30, useTime = 5  -- Boosts speed for 30 seconds.
    },
}

```

* `value`: The effect's intensity or duration.
* `useTime`: Time (in seconds) required to consume the potion.
* `animals`: Specific to the "Animals" potion, defines the available animal models.

***

**Potion Configuration**

Define properties for each potion type:

```lua
luaCopyEditConfig.Potions = {
    ['Healing'] = {
        value = 100, useTime = 5  -- Restores health (value) in 5 seconds.
    },
    ['Shield'] = {
        value = 100, useTime = 5  -- Adds 100 points of protection in 5 seconds.
    },
    ['Animals'] = {
        value = 60, useTime = 5,  
        animals = {'a_c_boar', 'a_c_chickenhawk', 'a_c_chimp', 'a_c_cormorant', 'a_c_cow', 'a_c_coyote', 'a_c_deer'}
    },
    ['Invisibility'] = {
        value = 25, useTime = 5  -- Grants invisibility for 25 seconds.
    },
    ['Speed'] = {
        value = 30, useTime = 5  -- Boosts speed for 30 seconds.
    },
}
```

* `value`: The effect's intensity or duration.
* `useTime`: Time (in seconds) required to consume the potion.
* `animals`: Specific to the "Animals" potion, defines the available animal models.

***

### **Item Probability**

Set the probability of receiving items based on their rarity:

```lua
Config.Probability = {
    ['common']    = 70, -- Common items: 70% chance
    ['rare']      = 20, -- Rare items: 20% chance
    ['legendary'] = 10  -- Legendary items: 10% chance
}

Config.RandomItems = true
```

* If `Config.RandomItems` is set to `true`, items are distributed randomly.
* If `false`, the item rarity will follow the specified percentages.

### **Crystal Ball Items**

Define the possible items received from the crystal ball:

```lua
Config.CristalBallItems = {
    {name = 'p1',     amount = 1,  rarity = 'common'},     -- Health Potion
    {name = 'p2',     amount = 1,  rarity = 'common'},     -- Shield Potion
    {name = "p3",     amount = 1,  rarity = 'common'},     -- Animals Potion
    {name = "p4",     amount = 1,  rarity = 'rare'},       -- Invisibility Potion
    {name = "p5",     amount = 1,  rarity = 'rare'},       -- Speed Potion
    {name = "ouija",  amount = 1,  rarity = 'legendary'},  -- Ouija Board
}
```

* `name`: Item identifier.
* `amount`: Quantity awarded per interaction.
* `rarity`: Corresponds to the probability settings.


---

# 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://mysticspells.killstore.net/killstore-magic-v2/usage/config.lua.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.
