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

# npc.fs\_stonewinopen

```lua
npc.fs_stonewinopen(count)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x702D`                        |
| arguments               | 1: Int                          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 324 calls in 81 of 1114 scripts |

## What it does

Opens the small count window captioned STONES, showing a number: vanilla shows the party's Teleport Stones beside the save crystal's teleport menu.

## Arguments

### `count` (Int)

The number shown. Every vanilla call passes `haveitem(0x2000)`, the Teleport Stones.

## Timing

Returns at once; the window stays until [fs\_stonewinclose](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fs_stonewinclose.md).

## In NPC Kit

Shows on a kit NPC's field map: `npc.fs_stonewinopen(npc.haveitem(0x2000))`. Close it before the talk ends.

## Used with

* [fs\_stonewinclose](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fs_stonewinclose.md), [haveitem](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/haveitem.md).
* [gillwinopen](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/gillwinopen.md): the same window for gil.

## Example

A ferryman who takes Teleport Stones: the count window is up while he asks, and closes either way.

```lua
local noStone = [[
No stone, no crossing. Those are the old rules,
and I'm not the one who's going to break them.
]]

local stone = [[
One Teleport Stone for the crossing, my friend.
Hand it over and the way will open up for you.
]]

local stoneChoices = { "Pay", "Not now" }

openStones = function()
    npc.fs_stonewinopen(npc.haveitem(0x2000));
end,
payStone = function()
    npc.subitem(0x2000, 1);
    npc.fs_stonewinclose();
end,
closeStones = function()
    npc.fs_stonewinclose();
end,

talk = function()
    talkOpen();
    npc.lua(npc.haveitem(0x2000), function(handle, stones)
        if stones == 0 then
            say(handle, noStone)
            return
        end
        handle.run("openStones", function()
            if not dialog.aaske.open {
                    speaker = "NPCKit 0020",
                    body = stone,
                    choice = stoneChoices,
                    cancel = 1,
                    queue = true,
                    onClose = function(index, reason)
                        local paid = reason == "dismissed" and index == 0
                        handle.run(paid and "payStone" or "closeStones", function() handle.finish() end)
                    end,
                    onError = function() handle.run("closeStones", function() handle.finish() end) end
                } then
                handle.run("closeStones", function() handle.finish() end)
            end
        end)
    end);
    talkClose();
end,
```
