> For the complete documentation index, see [llms.txt](https://doc.lucky-cycle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lucky-cycle.com/games/index/slot-machine.md).

# Slot Machine

{% hint style="warning" %}
Demo: <https://campaigns.lucky-cycle.com/utils/games?game=slot-machine>
{% endhint %}

1. [#configuration](#configuration "mention")
2. [#options](#options "mention")
3. [#assets](#assets "mention")

### Configuration

<details>

<summary>JSON</summary>

```json
{
  "options": {
    "background_color": "white",
    "speed": 0.08,
    "use_reward_image": false,
    "index_reward_image": 0,
    "border_width_offset_1": 0,
    "border_width_offset_2": 0,
    "border_width_offset_3": 0,
    "reel2_start_time": 1000,
    "reel3_start_time": 2000,
    "overlay_width": 550,
    "overlay_height": 380,
    "handle_height": 380
  },
  "texts": {
    "en": {
      "play_button": "Play now"
    },
    "fr": {
      "play_button": "Je joue"
    },
    "nl": {
      "play_button": "Speel nu"
    }
  },
  "images": {
    "overlay": GAME_URL + "/overlay.png",
    "handle": {
      "ball": GAME_URL + "/handle_ball.png",
      "handle": GAME_URL + "/handle_handle.png",
      "base": GAME_URL + "/handle_base.png"
    },
    "items": [
      GAME_URL + "/item-1.jpg",
      GAME_URL + "/item-2.jpg",
      GAME_URL + "/item-3.jpg",
      GAME_URL + "/item-4.jpg",
      GAME_URL + "/item-5.jpg",
      GAME_URL + "/item-6.jpg",
      GAME_URL + "/item-7.jpg",
      GAME_URL + "/item-8.jpg",
      GAME_URL + "/item-9.jpg"
    ],
    "rewards": {}
  }
}
```

</details>

### Options

<table><thead><tr><th>Key</th><th>Type</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>background_color
</code></pre></td><td>String</td><td>Background color of the machine <mark style="color:$danger;">(should <strong>NOT</strong> be transparent if handle is visible)</mark>.</td><td>"white"</td></tr><tr><td><pre><code>speed
</code></pre></td><td>Integer</td><td>Rotation speed.</td><td>0.08</td></tr><tr><td><pre><code>border_width_offset_1 / _2 / _3
</code></pre></td><td>Integer</td><td>Adjust to match overlay.</td><td>0 / 0 / 0</td></tr><tr><td><pre><code>reel2_start_time
</code></pre></td><td>Integer</td><td>Delay for the second row.</td><td>1000</td></tr><tr><td><pre><code>reel3_start_time
</code></pre></td><td>Integer</td><td>Delay for the third row.</td><td>2000</td></tr><tr><td><pre><code>overlay_width / _height
</code></pre></td><td>Integer</td><td>Size of the overlay.</td><td>550 / 380</td></tr><tr><td><pre><code>handle_height
</code></pre></td><td>Integer</td><td>Height of the handle (must be smaller or equal to <em>overlay_height</em>).</td><td>380</td></tr><tr><td><pre><code>use_reward_image
</code></pre></td><td>Boolean</td><td>Use reward image in machine (must specify an image for each reward).</td><td>true</td></tr><tr><td><pre><code>index_image_no_reward
</code></pre></td><td>Integer</td><td><mark style="color:orange;">If </mark><em><mark style="color:orange;">use_reward_image</mark></em><mark style="color:orange;"> is false</mark>, specify which image is used in case of win (must be between 0 and 8).</td><td>0</td></tr><tr><td><pre><code>play_button
</code></pre></td><td>String <mark style="color:green;">(one per language)</mark></td><td>Text for the button that is displayed on small screens (instead of the handle).</td><td>"Play now" / "Je joue" / "Speel nu"</td></tr></tbody></table>

### Assets

<table><thead><tr><th>Key</th><th>Size</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>overlay
</code></pre></td><td>550 x 380px</td><td>Image used on top of the game. Must be transparent or items will be hidden.</td><td><a href="https://statics.lucky-cycle.com/files/_games/slot-machine/overlay.png">/overlay.png</a></td></tr><tr><td><pre><code>ball
</code></pre></td><td><em>120 x 120px</em></td><td>Component of the handle.</td><td><a href="https://statics.lucky-cycle.com/files/_games/slot-machine/handle_ball.png">/handle_ball.png</a></td></tr><tr><td><pre><code>handle
</code></pre></td><td><em>35 x 400px</em></td><td>Component of the handle.</td><td><a href="https://statics.lucky-cycle.com/files/_games/slot-machine/handle_handle.png">/handle_handle.png</a></td></tr><tr><td><pre><code>base
</code></pre></td><td><em>110 x 200px</em></td><td>Component of the handle.</td><td><a href="https://statics.lucky-cycle.com/files/_games/slot-machine/handle_base.png">handle_base.png</a></td></tr><tr><td><pre><code>items
</code></pre></td><td>150 x 150px <mark style="color:green;">(x9)</mark></td><td>Item displayed in the game. Must have 9 different items for the game to work.</td><td><a href="https://statics.lucky-cycle.com/files/_games/slot-machine/item-1.jpg">/item-1.jpg</a></td></tr></tbody></table>
