npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

koishi-plugin-p-shop

v0.0.6

Published

适用于 Satori 适配器的p点商店,satori-ai和p-qiandao的拓展功能

Readme

koishi-plugin-p-shop

npm MIT License Language Static Badge

p-shop 插件文档

基于 Koishi 框架的 P点商店插件(satori-aip-qiandao的拓展功能),提供道具购买、出售、使用及背包管理功能,包含多种趣味道具及好感度互动机制。


功能列表

  • 商店系统:查看/购买道具、好感度限制
  • 背包管理:查看道具、出售、使用
  • 道具交互:符卡抽奖、记忆删除、好感度操作等
  • 自定义配置:支持通过 JSON 文件扩展道具

安装与配置

前置要求

  • 已安装 Koishi 框架
  • 启用 database 数据库服务
  • 已使用 satori-aip-qiandao 插件
  • 可选: 启用 puppeteer 服务渲染商店消息

安装插件

npm install koishi-plugin-p-shop
# 或通过 Koishi 插件市场安装

基础配置

# koishi.yml
plugins:
  p-shop:
    dataDir: "./data"  # 数据存储目录

指令说明

| 指令示例 | 别名 | 功能 | 参数说明 | |-------------------------|------------|--------------------------|-----------------------| | p/p-shop <id> | 查看商店 | 查看商品列表或单个详情 | id: 道具ID(可选) | | p/p-bag | 查看背包 | 显示背包内所有道具 | - | | p/p-buy <id> [amount] | 购买道具 | 购买指定数量的道具 | amount: 数量(默认1)| | p/p-sell <id> [amount]| 出售道具 | 出售指定数量的道具 | amount: 数量(默认1)| | p/p-use <id> [...args]| 使用道具 | 使用道具并触发效果 | args: 额外参数 | | p/p-item <id> | 查看道具 | 显示道具详细信息 | - |


核心道具列表

1. 空白符卡

  • 效果: 随机获得 SSR/SR/R/N 等级符卡
  • 彩蛋: 有 2% 概率抽到垃圾符卡 (GG级)

2. 消忆药水

  • 效果: 删除包含指定关键词的记忆
  • 限制: 关键词必须为2个字

3. 败者食尘

  • 效果: 清空所有好感度与记忆

4. 订婚戒指

  • 动态定价: 根据好感度动态定价
  • 效果: 佩戴后修改对话交互逻辑
  • 彩蛋: 出售已佩戴戒指会触发特殊提示

5. 心碎魔药

  • 效果:
    • 首次使用:好感度降至 -99999
    • 再次使用:恢复原好感度

高级配置

自定义道具

  1. data/p-shop.json 中添加或修改配置:
{
  "新道具ID": {
    "price": 5000,
    "maxStack": 5,
    "description": "自定义道具描述",
    "favorability": 100
  }
}
  1. 重启插件生效

数据目录结构

data/
├─ p-shop.json       # 自定义道具配置
└─ satori_ai/dialogues/*.txt  # 用户记忆数据

问题反馈

如有问题请提交 Issue 至 GitHub仓库