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

# npc.addgill

```lua
npc.addgill(gil)
```

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

## What it does

Gives the party gil and returns the new total. Writes no line in the message log.

## Arguments

### `gil` (Int)

How much. Vanilla: `1000` most.

## Result

The new total.

## Timing

Returns at once.

## In NPC Kit

For a visible reward, count the gil window up first: `gillwinopen(havegill())`, `gillwinstart(n)`, `gillwinsync()`, `addgill(n)`, `gillwinclose()`.

## Used with

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

## Example

A reward the player sees counted up: the gil window opens on the current total, counts `+500`, and the gil is given when the count ends.

```lua
local reward = [[
For your trouble, friend. You earned every coin,
and don't let anyone in the bazaar say otherwise.
]]

reward = function()
    npc.gillwinopen(npc.havegill());
    npc.gillwinstart(500);
    npc.gillwinsync();
    npc.addgill(500);
    npc.wait(20);
    npc.gillwinclose();
end,

talk = function()
    talkOpen();
    npc.lua(function(handle)
        handle.run("reward", function() say(handle, reward) end)
    end);
    talkClose();
end,
```

## Pitfalls

* `gillwinstart` only animates the window: without `addgill` the party gets nothing.
