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

# npc.sethoridashi

```lua
npc.sethoridashi(good)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x02F7`                        |
| arguments               | 1: Int                          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 135 calls in 47 of 1114 scripts |

## What it does

Puts one of the bazaar's script goods on sale. Only the goods the bazaar marks as offered by a script take it; any other id does nothing. The good stays on sale until it is bought or [clearhoridashi](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/clearhoridashi.md) takes it off.

## Arguments

### `good` (Int)

The bazaar good id. The seven script goods are `0xD063` to `0xD066` and `0xD07C` to `0xD07E`, the monographs (vanilla offers `0xD066` 98 times, after counting shop visits).

## Timing

Returns at once.

## In NPC Kit

Calling it again puts a bought good back on sale, so a reward given once keeps its own flag: vanilla sets a bit of a script global next to each call.

## Used with

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

## Example

A merchant who tells the player a monograph has reached the bazaar.

```lua
local book = [[
A rare book just came in at the bazaar today.
If you're quick, you might get it before it sells.
]]

offer = function()
    npc.sethoridashi(0xD066);
end,

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

## Pitfalls

* `ishoridashi` cannot tell whether a good is on sale: it always returns `0`.
