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

# npc.setmapjumpgroupflag

```lua
npc.setmapjumpgroupflag(flag)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0430`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 4625 calls in 402 of 1114 scripts |

## What it does

Sets one of the game's own story flags.

## Arguments

### `flag` (Int)

The flag number. Vanilla: `90`, `145`–`147`, `111`, `127`, `128`, `253`–`255`.

## Timing

Returns at once.

## In NPC Kit

**Don't use it for a mod's own state.** Story flags are the player's progress, kept in the save: a wrong flag can unlock, skip or break a story event. What each number gates has no bundled table.

## Example

None for a mod's own state. A "talked once" mark is a Lua variable:

```lua
local met = false

talk = function()
    talkOpen();
    npc.lua(function(handle)
        say(handle, met and "Good to see you again." or "I don't believe we've met.")
        met = true
    end);
    talkClose();
end,
```

## Pitfalls

* It writes the player's save: a wrong flag can unlock, skip or break a story event.
