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

# npc.amese

```lua
npc.amese(slot, text)
```

|                         |                                    |
| ----------------------- | ---------------------------------- |
| id                      | `0x0145`                           |
| arguments               | 2: Int, Int                        |
| in NPC Kit              | yes                                |
| measured from a kit NPC | returns                            |
| vanilla scripts         | 15142 calls in 441 of 1114 scripts |

## What it does

The game's own dialogue window: opens window slot `slot` with line `text` of the script's text section, in the conversation style, sized to the text. It doesn't wait; [messync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/messync.md) waits for the player to close it.

## Arguments

### `slot` (Int)

The message window slot, 0 to 7. Vanilla: `0` 13,903 times, `1` 1,237, `5` twice.

### `text` (Int)

A line of the running script's text section: `0x01000000 + n` is line `n`. A line marked as a choice text opens no window and only prepares the choices of the next ask.

## Timing

Returns at once, with the window opening. Vanilla follows it with `messync(slot, 1)` to hold the script until the player closes it.

## In NPC Kit

**Use the Lua Loader's `dialog.amese` instead.** NPC Kit's script has no text section, so this call has no line of yours to show. `dialog.amese` takes the speaker and the text as strings, opened from `npc.lua` (`references/dialog.md`).

## Used with

In a vanilla talk: [setkutipakustatus](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setkutipakustatus.md) and [setunazukistatus](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setunazukistatus.md) on, `amese(0, line)`, [messync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/messync.md)`(0, 1)`, then both off. In the kit the same shape is `talkOpen`, `npc.lua` with `dialog.amese`, `talkClose` (`references/talks.md`).

## Example

```lua
local greeting = [[
Good day to you, traveler. Welcome to the city.
Mind your purse here, the bazaar is so crowded.
]]

-- the kit form of a vanilla amese + messync
npc.lua(function(handle)
    if not dialog.amese.open {
        speaker = "NPCKit 0020",
        body = greeting,
        queue = true,
        onClose = function() handle.finish() end,
        onError = function() handle.finish() end,
    } then
        handle.finish()
    end
end);
```
