From 4be39aaca324ab3a48b9a2767051cffe86328fdf Mon Sep 17 00:00:00 2001 From: coooookies <1164557342@qq.com> Date: Tue, 3 May 2022 18:49:17 +0800 Subject: [PATCH] README.md --- README.md | 14 +++--- README_CN.md | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 140 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 50b7dae..1fa3e87 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # MeaMailPlus - Grasscutter Mail enhancements MeaMailPlus is a plugin of [Grasscutter](https://github.com/Grasscutters/Grasscutter), you can use this plugin to send your mail conveniently. -English | 简体中文 (正在写) +English | [简体中文](./README_CN.md) ## 💡Feature @@ -41,8 +41,8 @@ Run command `/meamail reload` in console to reload the config. ``` { "updateTime": [4, 0, 0], // set the server's start time for send mail of the day, default is 04:00:00(24 hours system) - "initialMail": [ 1001 ], // set the initial mail id, you can set multiple mail ids like [1001, 1002, 1003] - "birthDayMail": [ 1004 ], // set the birthday mail id, you can set multiple mail too! + "initialMail": [ 1001 ], // set the initial mail template id, you can set multiple mail ids like [1001, 1002, 1003] + "birthDayMail": [ 1004 ], // set the birthday mail template id, you can set multiple mail too! "dailySignInMail": [ // players can only receive once a day, and will not send if they are not online. { @@ -68,7 +68,7 @@ Run command `/meamail reload` in console to reload the config. }, { // multiple mail... "onlineOnly": true, - "triggerTime": [6, 0, 0], // 16:00:00 + "triggerTime": [16, 0, 0], // 16:00:00 "templateId": 1003, "minLevel": 0 }, @@ -83,11 +83,11 @@ Run command `/meamail reload` in console to reload the config. ``` #### Template file You can make multiple template files in `template` folder, only supports `JSON`. -like this: +like this: TemplateExample.json ``` { - "templateId": 1001, // Your template id + "templateId": 1001, // Your template id, can't be repeated "title": "Mail title", // Your Mail title "sender": "KiritaniIwako", // Your sender name, you can set "Server" "expireTime": 0, // Your mail expire time, will be explained in detail later. @@ -99,7 +99,7 @@ TemplateExample.json { "id": 223, // item id "count": 1, // amount - "level": 1 // item level(1-90?) + "level": 1 // item level(0-90?) } ] } diff --git a/README_CN.md b/README_CN.md index 1c6164a..d628d32 100644 --- a/README_CN.md +++ b/README_CN.md @@ -34,7 +34,139 @@ Root ### 怎么用? -🤔 正在写...... +在插件目录中的`MeaMailPlus`目录下, 包含 `template` 文件夹和 `config.json` 配置文件 +#### 配置文件设置 +配置文件是一个 `JSON` 格式的文件。你可以通过修改配置文件来控制插件的行为。 +配置完后,在Console中输入`/meamail reload`即可重载配置文件。 +``` +{ + "updateTime": [4, 0, 0], // 设置服务器的邮件推送时间,这里设置的是 04:00:00 (24小时时间制) + "initialMail": [ 1001 ], // 设置新玩家第一次进服时接收的邮件TemplateId,可以设置很多个,例如: [1001, 1002, 1003] + "birthDayMail": [ 1004 ], // 设置玩家生日邮件TemplateId,当然也可以设置很多个(如果玩家有点贪) + + "dailySignInMail": [ // 玩家每日登录的邮件,会在每天推送时间或者是玩家上线时发送,一天只能领取一次,不上线就没有。 + { + "templateId": 1002, // 邮件的TemplateId + "minLevel": 0 // 设置冒险等级限制,0表示不限制,小于这个冒险等级的玩家不会收到邮件 + }, + { + "templateId": 1003, // 设置多个邮件... + "minLevel": 25 + }, + { + "templateId": 1004, // 设置多个邮件... + "minLevel": 55 + } + ], + + "dailyRepetitionMail": [ // 设置每日定时邮件 + { + "onlineOnly": false, // 是否只有在线玩家能接收邮件,如果设置成离线,则所有玩家都能接收到 + "triggerTime": [12, 0, 0], // 触发时间 这里是 12:00:00 + "templateId": 1003, // 邮件templateId + "minLevel": 0 // 设置冒险等级限制,0表示不限制,小于这个冒险等级的玩家不会收到邮件 + }, + { // 设置多个邮件... + "onlineOnly": true, + "triggerTime": [16, 0, 0], // 16:00:00 + "templateId": 1003, + "minLevel": 0 + }, + { // 设置多个邮件... + "onlineOnly": true, + "triggerTime": [0, 0, 0], // 24:00:00 + "templateId": 1003, + "minLevel": 0 + } + ] +} +``` +#### Template 模板文件 +你可以自行创建模板文件放进 `template` 文件夹, 同样只支持 `JSON`文件. +举个栗子: +TemplateExample.json +``` +{ + "templateId": 1001, // 你的邮件TemplateID,不能重复。 + "title": "Mail title", // 邮件标题 + "sender": "KiritaniIwako", // 邮件发送人,你可以设置为 "Server" + "expireTime": 0, // 过期时间,稍后会详细介绍 + "remainTime": 2592000, // 剩余时间,如果你设置了剩余时间,则过期时间不会生效 + "importance": 0, // 邮件重要等级,0为默认,1为收藏 + "body": { // 邮件内容,稍后会详细介绍 + "content": "Mail content", + "items": [ + { + "id": 223, // 物品id + "count": 1, // 数量 + "level": 1 // 等级(0-90?) + } + ] + } +} +``` +1. 如何设置过期时间 `expireTime` 或者是剩余时间 `remainTime`? +- [时间戳转换器](https://tool.lu/timestamp/) +``` +{ + "expireTime": 1651571451, + // use 10 digits timestamp, like this: + // you can use convert tool to convert the timestamp to 10 digits timestamp, + // https://tool.lu/timestamp/ + + "remainTime": 2592000 + // time in second + // 2592000 is the seconds of 30 days: + // 2592000 = (d) * 24(h) * 60(m) * 60(s) + // if you are not sure, you can use two 10 digits timestamp subtraction: + // 2592000 = 1651568400 (2022-5-3 9:00:00GMT) - 1648976400 (2022-4-3 9:00:00GMT) +} +``` + +2. How to set the mail `body/content`? +``` +{ + "body": { + "content": "Mail content", + // you can set the content of the mail, + // you can use the variable: + // `{playerName}`: (Testing) player name + // `\r\n`: line feed + // you can use link to open Webview in-game & Browser: + // ``: open a Browser, tag name is "Discord". + // ``: open a Browser, tag name is "Discord". + + "items": [ // items in the mail, if you set `[]`, no item will be sent + { + "id": 223, + "count": 1, + "level": 1 + } + { + "id": 223, // item id + "count": 1, // amount + "level": 1 // item level(1-90?) + }, + { + "id": 224, // Multiple items... + "count": 1, + "level": 1 + }, + { + "id": 202, // Multiple items... + "count": 10000000, + "level": 1 + } + ] + } +} +``` + +Hyperlinks in the mail content: +``` + + +``` ### 命令和权限 Command: