> For the complete documentation index, see [llms.txt](https://dc-customz.gitbook.io/dc-customz-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dc-customz.gitbook.io/dc-customz-documentation/scripts/dc-weedroll-v2.md).

# DC Weedroll V2

## Installation

1. Download the script from keymaster and place it anywhere in your server resources folder.\
   Make sure you also have ox\_lib installed as well: <https://github.com/overextended/ox_lib/releases>
2. Go to the "install" folder inside of the "dcweedroll" folder. Drag the images into your inventory images folder. Copy and paste the items depending on your inventory (ox.lua for ox\_inventory, qb.lua for qbcore items.lua).
3. Open the config.lua file and set your options to your needs.&#x20;

```
Config.Framework = 'ESX' -- or QB

Config.Notify = {
    Enabled = true, -- Enable or Disable Notifications
    Type = 'ox', --or 'esx' or 'qb' or 'custom' if custom defined in client/custom.lua
    Icon = 'leaf' -- icon for ox notify
}

Config.Progress = { -- Needs ox lib
    Enabled = true, -- Enable or disable Progress bars
    Type = 'circle' -- or 'progressbar'
}

Config.Skillcheck = { -- Optional skill check minigame when rolling up
    Enabled = false, -- Enable or Disable
    Iterations = {'easy', 'easy', 'easy', 'easy'} -- Can be easy, medium, or hard
}
```

## Conversions

Next we have the optional conversions section.

```
Config.UseConversions = false -- or true
```

This section will control whether or not the items needed to roll up will be regular whole item packs\
or if they will be used as items that will hold other items inside.

```
{
    UsableItem = {{ item = "dc_smackwoodsbanana", model = "dc_smackwoodsbanana" }},
    RewardItem = {itemname = 'dc_backwood', amount = 5},
    ProgressText = "Opening Pack Of Smackwoods",
    Time = 5000,
    Anim = {dict = "misscarsteal1car_1_ext_leadin", anim = "base_driver2", params = {blendin = 0.8, blendout = 0.8, duration = 5000, flag = 49, playbackrate = 1.0}},
    Props = {{Enabled = true, BoneID = 18905, Position = vector3(0.152000, 0.007000, 0.031000), Rotation = vector3(112.949699, -0.900000, 178.469849)}}
},
```

So in this example, instead of the dc\_smackwoodsbanana item being an item used to roll with, it is used as a package item instead which holds 5 dc\_backwood items. When player uses the dc\_smackwoodsbanana item it will give 5 dc\_backwoods to player and the script would be using the dc\_backwood items as rollup items instead. Only if Config.UseConversions = true.

## Rollable Items

If Config.UseConversions = false then it will use the Config.RollableItems table to check for items that can be used to roll up with. If Config.UseConversions = true then it will use the Config.ConversionRollableItems table. The script will populate a context menu based on the items player has in their inventory. The items are categorized into sections:

* Backwoods
* Joints
* Blunts
* Grabba

## Usable Items Section

Next we have the Config.UsableItems section. This section controls the item name that will be used to initiate the whole rolling process.

```
['dc_ak47bag'] = {
    backwoods = { item = 'ak47_backwood', amount = 3 },
    joints    = { item = 'ak47_joint', amount = 3 },
    blunts    = { item = 'ak47_blunt', amount = 3 },
    grabba    = { item = 'ak47_grabba', amount = 3 },
},
```

Here we have the usable item which is 'dc\_ak47bag' this is also the name of the weed bag prop for this item. We also have the different categories and what each category will give player once rolling is complete. These items can be changed to whatever you want. But if you want to see the weed bag prop then the item name at top needs to stay the same. You can also specify how many of each item player will receive after rolling up.&#x20;
