Skip to main content

NoneBot slot machine plugin

Project description

nonebot

nonebot-plugin-slot-machine

✨ NoneBot2 老虎/老虎机与打螺丝金币插件 ✨

workflow pypi python nonebot

📖 介绍

一个基于 NoneBot2 的老虎机插件,支持注册金币账户、投注设置、老虎机抽奖、转账、查询,以及内置的“打螺丝”金币获取玩法。

老虎机为 5 行 6 列盘面,包含普通符号、百搭符号和夺宝符号。中奖结果会绘制成图片发送,中奖轮数较多时自动使用合并转发。

💿 安装

使用 nb-cli 安装

在 NoneBot2 项目的根目录下打开命令行,输入以下指令即可安装:

nb plugin install nonebot-plugin-slot-machine
使用包管理器安装

在 NoneBot2 项目的插件目录下打开命令行,根据你使用的包管理器输入相应的安装命令。

pip
pip install nonebot-plugin-slot-machine
pdm
pdm add nonebot-plugin-slot-machine
poetry
poetry add nonebot-plugin-slot-machine
conda
conda install nonebot-plugin-slot-machine

打开 NoneBot2 项目根目录下的 pyproject.toml 文件,在 [tool.nonebot] 部分追加写入:

plugins = ["slot_machine.plugins.slot_machine"]

⚙️ 配置

本插件会通过 nonebot-plugin-localstore 自动管理数据文件,无需额外配置数据库路径。

需要安装并配置 Milky 适配器:

pip install nonebot-adapter-milky

🎉 使用

在 NoneBot 项目中加载插件:

nonebot.load_plugin("slot_machine.plugins.slot_machine")

如果使用 pyproject.toml 的本地插件目录加载,请确保插件目录包含:

[tool.nonebot]
plugin_dirs = ["slot_machine/plugins"]

指令

指令 说明
注册老虎机 / 注册 注册账号,每人赠送初始金币
设置投注 <投注大小> <投注倍数> 设置投注,投注大小支持 0.020.21,倍数为 1-10
开始旋转 按当前投注设置开始抽奖
查询老虎机 / 查询 查看金币、抽奖次数、中奖次数和投注设置
转账 <账号> <金额> 向其他已注册账号转账金币
开始打螺丝 <分钟> 按普通模式立即打工结算
开始打螺丝 <模式> <分钟> 使用指定模式打工,模式:普通、韭菜、牛马、卷王
打螺丝状态 / 螺丝状态 查看体力和打工状态

示例

注册老虎机
设置投注 0.2 5
开始旋转
查询老虎机
转账 123456 10
开始打螺丝 牛马 10

🎰 玩法说明

  • 中奖需要从第一列开始连续命中,同符号可由百搭符号补位。
  • 每次中奖后会消除中奖符号并补充新符号,奖金倍数翻倍,最高 1024 倍。
  • 盘面任意位置出现 3 个夺宝符号可获得免费抽奖机会,超过 3 个时每多 1 个增加 10 次。
  • 打螺丝体力上限为 100,每 30 秒恢复 1 点。

📦 数据存储

插件数据使用 SQLite,并通过 nonebot-plugin-localstore 存放在插件数据目录中。缓存图片会写入插件缓存目录,发送完成后自动删除。

🙏 致谢

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_slot_machine-0.0.6.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_slot_machine-0.0.6-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_slot_machine-0.0.6.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.0.6.tar.gz
Algorithm Hash digest
SHA256 186e1606bea364dde4528c334977b59ce7de71340353bc53b4317ca235342a5d
MD5 f9793f8997ac676fde40449952e6e0b4
BLAKE2b-256 f896dd68c87bb76b5a80db254d052b3b3340d6e5972fc85a7b61ff10813d2943

See more details on using hashes here.

File details

Details for the file nonebot_plugin_slot_machine-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 647735dae0e7403b82f8168b560a0c5b42b930d91c106682f417ab84a51ff545
MD5 cd0f15f9822766b7b900693915f5bf92
BLAKE2b-256 1098831721acd6b24cf49982122bdc356a351d65d7790a8a3e8ac556ad8b252c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page