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

# npc.gillwinsync

```lua
npc.gillwinsync()
```

|                         |                                                                         |
| ----------------------- | ----------------------------------------------------------------------- |
| id                      | `0x048A`                                                                |
| arguments               | 0                                                                       |
| in NPC Kit              | yes                                                                     |
| measured from a kit NPC | returns                                                                 |
| waits                   | it has a wait handler: it can hold the script, and in `talk` the player |
| vanilla scripts         | 64 calls in 42 of 1114 scripts                                          |

## What it does

Holds the script until the gil window's count has finished and a short pause after it (24 updates) has passed. With no gil window it returns at once.

## Timing

Waits, once a frame, while the count runs.

## Used with

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

## Example

```lua
pay = function()
    npc.gillwinopen(npc.havegill());
    npc.gillwinstart(-250);
    npc.gillwinsync();          -- the count runs to the end before the gil is taken
    npc.subgill(250);
    npc.wait(20);
    npc.gillwinclose();
end,
```

## Pitfalls

* Without it, `gillwinclose` right after `gillwinstart` closes the window mid-count.
