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

# npc.gillwinstart

```lua
npc.gillwinstart(change)
```

|                         |                                |
| ----------------------- | ------------------------------ |
| id                      | `0x0489`                       |
| arguments               | 1: Int                         |
| in NPC Kit              | yes                            |
| measured from a kit NPC | returns                        |
| vanilla scripts         | 78 calls in 42 of 1114 scripts |

## What it does

Makes the open gil window count its figure up or down by an amount. It changes only the display: [subgill](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/subgill.md) or [addgill](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/addgill.md) changes the gil.

## Arguments

### `change` (Int)

The amount: negative for a payment (`-100`), positive for a reward. It is cut so the figure stays between 0 and 99,999,999. Ignored with no window, or while a count is still running.

## Timing

Returns at once; [gillwinsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/gillwinsync.md) waits for the count.

## In NPC Kit

```lua
pay = function()
    npc.gillwinstart(-100);
    npc.gillwinsync();
    npc.subgill(100);
    npc.wait(20);
    npc.gillwinclose();
end,
```

## Used with

* [gillwinopen](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/gillwinopen.md), [gillwinsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/gillwinsync.md), [subgill](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/subgill.md).

## Example

A price paid: the window counts `-100`, the script waits for the count, then the gil is taken and the window closes after a short beat.

```lua
pay = function()
    npc.gillwinopen(npc.havegill());
    npc.gillwinstart(-100);
    npc.gillwinsync();
    npc.subgill(100);
    npc.wait(20);
    npc.gillwinclose();
end,
```

Run it from the talk's Lua: `handle.run("pay", function() say(handle, thanks) end)`, with `thanks` a text in `[[ ]]`.

## Pitfalls

* The number only animates the window; the gil moves with `subgill` / `addgill`, which must match.
