# Replenish System

## Initialization

To use this system simply call the **Initialize Replenish Value** instruction.

<figure><img src="/files/ZSQ0zTrVlyUW9jEmINHd" alt=""><figcaption></figcaption></figure>

#### Replenish Key

A key needed to store the value in Player's storage

#### Initial Value

The initial value that will have the Player's storage value

#### Max Value

The maximum value the player can earn with the system

#### Interval

How often this value will be incremented by 1.

#### Auto Collect Offline Earnings

If enabled offline earnings will be auto collected, otherwise an event will be triggered that can be used to do it manually

## Offline Earnings

Offline earnings can be received manually by using a trigger.

<figure><img src="/files/dInLuosAcYF2G1UHws36" alt=""><figcaption></figcaption></figure>

Once this trigger is execute the instruction **Collect Offline Earnings** can be used

<figure><img src="/files/vdibzRAeRmQu5Zbn8xsz" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To see this in action you can play the demo scene **9\_ReplenishSystem**
{% 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://docs.ninjutsugames.com/game-creator-2/loot-locker/replenish-system.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.
