# "step" Script format

Add this code to your step script to get started. This is how you can scout your RNet server for anything you want.

## No code Example

<figure><img src="/files/3Zlwft2ArkS3VdDOOlGe" alt=""><figcaption></figcaption></figure>

You can use the no code tool to see how easy it is.

## Direct code example

```javascript
//const game is the game instance!!
for (let roomId in game.rooms) {
    const room = game.rooms[roomId];



    // Room-specific code here

    // Client iteration
    for (let clientId in room.clients) {
        const client = room.clients[clientId];

        // Client-specific code here

        //
        for (let entityId in client.entities) {
            try {
                var EP = JSON.parse(client.entities[entityId])

                // Entities-specific code here

            } catch (e) {
                console.log(e)
            }

        }

        //Persistent Object iteration
        for (let persistentObjectId in room.persistentObjects) {
            const persistentObject = room.persistentObjects[persistentObjectId]
            //Persistent Objects specific code here

        }
    }
}
```


---

# 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://rocket-networking.gitbook.io/docs/server-side-scripting/important-scripts/step-script-format.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.
