# Set Mes Win Mes Id

### Signature

```c
void setmeswinmesid(int windowId, int messageId); //id:0x047e
```

### Description

Used before functions like [Mes](/the-insurgents-handbook/scripts/vm-call-targets/mes.md) to replace the dialogue of the next opened window with a global message instead.

Generally, the text of a dialogue, system notification, and more are saved in the dialogue section of the location file (ebp - section 2). Now, there are also dialogues which are available in all locations. These are declared in various different files and then configured with additional arguments in section 5 of the `fontpack_it.bin` file. This function references this section to display a global message (e.g. ... joins the party).

### Arguments

#### Window Identifier

The window the dialogue will be displayed in.

There are a total of 8 windows (0 -> 7) that can be used to simultaneously display several dialogues, shapes (textures), etc. at the same time.

If a value of `-1` is passed, it will be changed to `0`.

If the window is already used before calling this function, nothing will change.

#### Message Identifier

The entry identifier of the message inside section 5 of the `fontpack_it.bin` file.

The value will be subtracted by 1 after being passed.

If an invalid value is passed (e.g. 0 -> -1), this function will have no effect on the next opened window.

### Examples

#### Display a message that the party menu was added.

```c
setmeswinmesid(0, 58);
```

#### Display a message that the map for the Leviathan was obtained.

```c
setmeswinmesid(0, 73);
```

### Notes

{% hint style="info" %}
If the entry type of the message is `Mist`, the displayed content will also be added to the inventory.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xeavin.gitbook.io/the-insurgents-handbook/scripts/vm-call-targets/set-mes-win-mes-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
