> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucon.md).

# npc.ucon

```lua
npc.ucon()
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x000D`                          |
| arguments               | 0                                 |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 8131 calls in 736 of 1114 scripts |

## What it does

Gives the player's control back after [ucoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucoff.md).

## Timing

Returns at once.

## In NPC Kit

In `talkClose`, after the mouth and nods are off. In the kit, `talkClose` is recorded after `npc.lua`, so it runs only once the Lua called `handle.finish()`: a missing finish leaves the player without control for good.

## Used with

* [ucoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucoff.md): always paired.
* [sethpmenu](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/sethpmenu.md)`(1)` right after.

## Example

```lua
local function talkClose()
    npc.setkutipakustatus(0);
    npc.setunazukistatus(0);
    npc.lookatoff();
    npc.ucon();                  -- control back
    npc.sethpmenu(1);
    -- ...
end
```

## Pitfalls

* On a map with no party actors the game's own `ucon` reads an empty party slot and crashes; on a field map with the party this doesn't happen.
