> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-gangs/integrations/lunar_drugscreator.md).

# lunar\_drugscreator

{% stepper %}
{% step %}

### Find Folder

Find foler: `lunar_drugscreator/config/sv_edit.lua`
{% endstep %}

{% step %}

### Find Function

Find function called `Editable.onRetailSale` and replace it with this code:

```lua
function Editable.onRetailSale(player, itemName, amount, price)
    local total = amount * price
    local turfId = exports['op-crime']:getPlayerTurfZone(player.source)

    if turfId then
        TriggerEvent('op-crime:drugSold', player.source, turfId, total)
    end
end
```

{% endstep %}
{% endstepper %}
