# 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 %}


---

# 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.otherplanet.dev/scripts/op-gangs/integrations/lunar_drugscreator.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.
