> 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/settalkiconstatus.md).

# npc.settalkiconstatus

```lua
npc.settalkiconstatus(state)
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x0389`                         |
| arguments               | 1: Int                           |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 760 calls in 101 of 1114 scripts |

## What it does

Makes the NPC offer talk (`1`) or not (`0`): the game's talk test requires it before it looks at the NPC's talk function, so with `0` the talk button doesn't come up for it.

## Arguments

### `state` (Int)

`1` talkable, `0` not. Vanilla: `0` 438 times, `1` 322.

## Timing

Returns at once.

## In NPC Kit

A kit NPC with a `talk` is talkable from the start. Turning it off and on mid-game (an NPC that talks once, then not) is the vanilla way, but not tested on a kit NPC.

## Used with

* [reqdisable](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/reqdisable.md) / [reqenable](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/reqenable.md)`(2)`: the talk trigger itself.

## Example

An NPC that talks once: the talk ends by turning the talk button off, and the NPC doesn't offer it again until the map loads.

```lua
local allSaid = [[
That's all I have to say to you, so off you go.
I've got work to do, and so do you, I suspect.
]]

talk = function()
    talkOpen();
    npc.lua(function(handle)
        if not dialog.amese.open {
                speaker = "NPCKit 0020",
                body = allSaid,
                queue = true,
                onClose = function() handle.finish() end,
                onError = function() handle.finish() end
            } then
            handle.finish()
        end
    end);
    talkClose();
    npc.settalkiconstatus(0);
end,
```

## Pitfalls

* Not tested on a kit NPC; the next map load runs `init` again, so the NPC talks again then.
