# Lobby shop

This type of shop is used to buy various types of items, effects, arrow trails, special arrows at a set of price and in game points that can be earned by playing with one of RageMode game.

{% hint style="info" %}
Every x amount of items purchased will increase the overall price and points requirement as well. Make sure to only buy items you want, no refunds are available.
{% endhint %}

<figure><img src="/files/2NsVW8yVAx7ScAtLE1vM" alt=""><figcaption></figcaption></figure>

## Features

* Set price and points individually for all elements manually from configuration
* Option to apply discount for all items or individually set from `/rm discount` command
* Option to set all prices to 0 value so they will be free of charge
* Option to configure buy limits with groups & permissions defined for specific items

{% hint style="info" %}
For all items marked for purchase, players will be charged after the start of the game, if they can afford the total price of the bought items.

If they leave the game before it starts, their balance will be recharged and the items will be restored.
{% endhint %}

## Categories for purchase

You have different type of menu categories to select and buy from, these are:

* [arrow trails](/ragemode-docs/global-game-guides/arrow-trails.md)
  * Purchase and activate only one or set a randomised state for it
* [in game items](/ragemode-docs/guides/game-items.md)
  * grenade
  * barricade
  * flash
  * freezeball
  * pressure mine
  * special arrows

## Shop configuration

You can configure purchase requirements (price & points) for specific game items which can be bought from this shop, you can access these in `game-items.yml` file:

```yml
shop:
  buy-limits:
    groups:
      global: 2
      default: 1
      vip: 4
    permissions:
      vip: "ragemode.shop.buy.limit.vip"
  requirements:
    cost: 0.0
    points: 300
```

* `buy-limits` - configuration for buy limits for specific item
  * `groups` - list of groups with individual limit value, set to `0` for no limit
    * `global` group is meant for everyone without any group
  * `permissions` - list of group permissions to use with
* `requirements`
  * `cost` - the price value of the item
  * `points` the points value of the item

***

For configuring arrow trails price open `arrow-trails.yml` file:

```yml
effects:
- POOF:true;0.0;100
- INSTANT_EFFECT:true;0.0;100,255, 1
```

Syntax: `effectName:enableState;price;points,particleData`

## Discount

Discount is used to reduce the original price to half or x percentage to purchase items at a cheaper deal. These discount data will be saved in a local file named `discounts.yml`. It is not recommended to modify this file manually.

#### Features

* Apply discount to any items or for specific items only
* Option to apply discount for specific players individually or for everyone
* Option to define expiration time that this will expire at
* Option to remove discount from specific players and from items as well

#### Notes

* Applying discount for everyone will reset players discount set individually and all discount will be set to the specified one
* You can apply discount for different players individually even after discount was applied for everyone
* Discounts valid for all items will not be combined with existing ones, to do that specify `-i:itemName` parameter to add discount for specific item(s)

### Apply discount

Players with permission can apply discount in percentage for all or for specific items individually. This can be achieved using `/rm discount add` command.

{% hint style="info" %}
Order of the optional command arguments does not matter. You only need to specify the required ones.
{% endhint %}

Command parameters:

1. `points` - for points only, `price` - for price only, `both` - for both points and price
2. `all` - to apply for all items
   1. or specify item names separated with `,` commas: `itemName1, itemName2`
3. `-v:value` - define the value of the discount in percent, can range from 0 to 100
4. `-p:names` - (Optional) specify which players will receive discount, define `all` so every played player receives this discount
   1. These players can be who already joined the server at least once
5. `-expire:timestamp` - (Optional) define the timestamp that this discount will expire at
   1. timestamp can be days as `d`, hours as `h` and minutes as `m`, accepted formats:
      1. `1d,3h,5m` -> 1 day 3 hour and 5 minutes
      2. `5d` -> 5 days
      3. `3m` -> 3 minutes

Result: `/rm discount add points -v:8 -p:playerNames -expire:7d`

### Remove discount

You can as well remove applied discounts from any player and any items. This can be achieved using `/rm discount remove points/price/both` command.

Command parameters:

1. `points` - for points only, `price` - for price only, `both` - for both points and price
2. `all` - to apply for all items
   1. or specify item names separated with `,` commas: `itemName1, itemName2`
3. `-p:names` - specify which players will receive discount, define `all` so every played player receives this discount
   1. These players can be who already joined the server at least once


---

# 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://mdswork.gitbook.io/ragemode-docs/guides/lobby-shop.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.
