An attempt to speed up `multiCraft()` function creation logic
Before it created a table of items while it was trying to check them I've separated this so it just gets that out of the way and checks items in it's own `for` loop
Also added a `maxCreation` variable that users can edit if needed which decides how many of an item can be created (I'll change this soon probably to tie into the config options in scripts for multicraft again soon
Also removed a few `Wait()`s that were there to help it not get confused, but after testing I believe this didn't make a difference, let me know if there's any issues with stuff like it saying it can craft when you dont have the items
I think, if ox_inventory checks a stash that doesn't exist yet, it returns a boolean or `nil`
This checks for that and instead returns a table to hopefully stop the scripts from breaking
Completely overlooked that ox_target item variable is `items` not `item`
changes
```lua
item = opts[i].item or nil,
```
to:
```lua
items = opts[i].item or nil,
```
The slot data for CodeM apparently returns as a string, this fixes it trying to compare a string to a number
```lua
if v.name == item and v.slot <= lowestSlot then
```
to
```lua
if v.name == item and tonumber(v.slot) <= lowestSlot then
```
Added a check to the script start to get the current players duty (helpful if yours saves the duty through restarts)
Also added core specific triggers for job/duty changes to help keep these in sync
I unfortunately forgot to add this before when adding the extra exploit protection. Now demands an auth token before allowing crafting results to help reduce exploiters calling it externally
Nothing public uses this yet, but its very similar to QBCore which makes it very for me to support
Nothing special to note, just improves the integration for future ventures into RedM
Currently if you still have the old qb-inventory or a css edit it would require you to manually edit the starter.lua
```lua
QBInvNew = true
```
I'm testing a change to grab the version and return true of false if its above `2.0.0` (200)
```lua
local qbInvVer = GetResourceMetadata(Exports.QBInv, 'version', nil):gsub("%.", "")
QBInvNew = tonumber(qbInvVer) >= 200
```
If this causes issue's I'll revert this