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

# npc.isquestclear

```lua
npc.isquestclear(quest)
```

|                         |                                                                             |
| ----------------------- | --------------------------------------------------------------------------- |
| id                      | `0x01D0`                                                                    |
| arguments               | 1: Int                                                                      |
| result                  | int: goes to the very next call, or to `npc.lua(npc.isquestclear(...), fn)` |
| in NPC Kit              | yes                                                                         |
| measured from a kit NPC | returns                                                                     |
| vanilla scripts         | 212 calls in 45 of 1114 scripts                                             |

## What it does

Gives `1` when a quest is cleared, else `0`. A result.

## Arguments

### `quest` (Int)

The quest number, the same as [getquestscenarioflag](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getquestscenarioflag.md)'s: the hunts are 128 to 172. Keep it within 0 to 255: it is not checked.

## Result

`1` or `0`.

## Timing

Returns at once.

## In NPC Kit

Read in Lua. Which quest is which has no bundled table.

## Used with

* [getquestscenarioflag](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getquestscenarioflag.md).

## Example

```lua
local quest = 0   -- ask the requester which quest

talk = function()
    talkOpen();
    npc.lua(npc.isquestclear(quest), function(handle, done)
        say(handle, done == 1 and "You did it! The whole town is talking." or "Any luck yet?")
    end);
    talkClose();
end,
```
