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

# Examples

**Small, complete NPCs to copy from. Each one is a whole script, on its own.**

Most of them stand in Rabanastre's Muthru Bazaar (map 290); the others say where in the table. Save one as `scripts/<Name>.lua` in your mod and enter its map.

| example                                                                                                             | what it shows                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Charging Gil](https://fehdead.gitbook.io/npc-kit/examples/charge-gil.md)                                           | reading the player's gil and taking it, with the gil window                                                                                            |
| [Giving an Item](https://fehdead.gitbook.io/npc-kit/examples/give-item.md)                                          | giving an item with the game's notice                                                                                                                  |
| [A Magic Trick](https://fehdead.gitbook.io/npc-kit/examples/magic-trick.md)                                         | a question, then an NPC that fades in and out on cue                                                                                                   |
| [Two NPCs in a Scene](https://fehdead.gitbook.io/npc-kit/examples/two-npcs-in-a-scene.md)                           | a conversation between two NPCs                                                                                                                        |
| [Walking Back and Forth](https://fehdead.gitbook.io/npc-kit/examples/walking.md)                                    | a routine that walks                                                                                                                                   |
| [A Merchant Who Remembers You](https://fehdead.gitbook.io/npc-kit/examples/talking-npc.md)                          | a gift given once, Lua state between talks, actor functions run mid-talk                                                                               |
| [Two NPCs and the Player in a Scene](https://fehdead.gitbook.io/npc-kit/examples/two-npcs-and-player-in-a-scene.md) | a scene: cameras, beats, a hidden NPC shown on cue, the leader walked to a mark                                                                        |
| [An Object](https://fehdead.gitbook.io/npc-kit/examples/object.md)                                                  | a gadget model off the walkmesh, with no name and no talk                                                                                              |
| [An Inspectable Object](https://fehdead.gitbook.io/npc-kit/examples/inspectable-object.md)                          | the magnifier over the player, and a message on the button                                                                                             |
| [A Magic Sword](https://fehdead.gitbook.io/npc-kit/examples/magic-sword.md)                                         | a model turned on three axes, an effect lit and put out by inspecting it (North End, map 289)                                                          |
| [A Quest: The Bhujerban Viper](https://fehdead.gitbook.io/npc-kit/examples/drink-quest.md)                          | a quest over three maps: saved steps, an objective window, counting defeats and drops, twins swapped for another motion (East End, Sandsea, North End) |
| [Recruiting Guests](https://fehdead.gitbook.io/npc-kit/examples/recruiting-guests.md)                               | guests that join and leave the party, one at a time, read from the game at every talk (Balfonheim, map 823)                                            |

Start with the [Starting Template](https://fehdead.gitbook.io/npc-kit/api/starting-template.md) if you haven't yet: these build on it.
