# Recipe onUsed

```lua
RegisterNetEvent('wasd-mixweed:weed:useRolledWeed', function()
    -- Relieve stress
    local relieveStress = 20
    TriggerServerEvent('hud:server:RelieveStress', relieveStress)

    local playerPed = PlayerPedId()
    local effects = {
        { set = 'move_m@drunk@slightlydrunk', duration = 60000 }, -- Slightly walking effect
        { set = 'move_m@drunk@moderatedrunk', duration = 60000 }, -- Stagger effect
        { set = 'move_m@drunk@verydrunk',     duration = 60000 }  -- Extreme intoxication effect
    }

    -- Select a random effect
    local randomEffect = math.random(1, #effects)
    local selectedEffect = effects[randomEffect]

    -- Request the animation set
    lib.requestAnimSet(selectedEffect.set)
    SetPedMovementClipset(playerPed, selectedEffect.set, true)
    ShakeGameplayCam('DRUNK_SHAKE', 1.0)
    RemoveAnimSet(selectedEffect.set)

    -- Remove effect after the specified duration
    Citizen.SetTimeout(selectedEffect.duration, function()
        ShakeGameplayCam('DRUNK_SHAKE', 0.0)
        ResetPedMovementClipset(playerPed, 0.0)
    end)
end)
```

```lua
RegisterNetEvent('wasd-mixweed:recipe:onUseDrugBlurredWater', function()
    local playerPed = PlayerPedId()
    local currentHealth = GetEntityHealth(playerPed)
    SetEntityHealth(playerPed, currentHealth - 50)

    local animDict = 'anim@scripted@nightclub@vomit@'
    local animName = 'vomit'

    lib.playAnim(playerPed, animDict, animName)

    Citizen.Wait(3000)
    ClearPedTasks(playerPed)
end)
```


---

# 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://wasd-dev.gitbook.io/wasd/resources/mix-weed/modules/recipe-type/recipe-onused.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.
