Skip to main content

NoneBot slot machine plugin

Project description

nonebot

nonebot-plugin-slot-machine

✨ NoneBot2 一个老虎机插件 ✨

workflow pypi python nonebot

📖 介绍

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

[!WARNING] 本插件仅在 Yogurt 协议端环境中通过测试,其他协议端可能存在兼容性问题。

老虎机为 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] 部分追加写入:

"@local" = ["nonebot_plugin_slot_machine"]

⚙️ 配置

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

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

pip install nonebot-adapter-milky

🎉 使用

在 NoneBot 项目中加载插件:

nonebot.load_plugin("nonebot_plugin_slot_machine")

如果使用 pyproject.toml 加载插件,请在 [tool.nonebot.plugins] 中加入 @local = ["nonebot_plugin_slot_machine"]

指令

指令 说明
注册老虎机 / 注册 注册账号,每人赠送初始金币
设置投注 <投注大小> <投注倍数> 设置投注,投注大小支持 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.1.1.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.1.1-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 033cd33e7305c03ce999277a7d32312a1fccd0c2e0ada9c26f72ade23e404888
MD5 073dcbebcc96b5c489a6aea532c66cd8
BLAKE2b-256 7490b571c4575758c489c8ec5a325e76888e5f8cb83c6d0279b4502b82adcd9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24afc930e0f83bbac80407a7badb283de4565c77f5d8db86e2de2838f0e4223d
MD5 52caeb72128775740dc69f01454684d6
BLAKE2b-256 16a0303183b13a03709c822f5b32c6dd07ed46932ae7973931a99f54abd011f3

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