Skip to content

interface字段配置

具体参照MaaFW文档: 3.3 Project Interface V2 协议 | 节点通知处理

MFAA interface字段配置

字段类型默认值说明
namestring-任务显示名称
entrystring-任务入口接口
default_checkbooleanfalse是否默认选中
descriptionstringnull任务说明文档(支持富文本)
repeatablebooleanfalse是否可重复执行
repeat_countnumber1默认重复次数
标记效果示例
[color:颜色]...[/color]文字颜色[color:red]红色文字[/color]
[b]...[/b]粗体[b]粗体文字[/b]
[i]...[/i]斜体[i]斜体文字[/i]
[u]...[/u]下划线[u]下划线文字[/u]
[s]...[/s]删除线[s]删除线文字[/s]

option字段配置

  • input字段配置
json
{
  "option": {
    "账号前3位": {
      "type": "input",
      "inputs": [
        {
          "name": "account",
          "label": "帐号前3位中的任意内容",
          "pipeline_type": "string",
          "default": "xxx"
        }
      ],
      "pipeline_override": {
        "选择登录账号": {
          "recognition": {
            "param": {
              "expected": "{account}"
            }
          }
        }
      }
    },
  }
}
  • select字段配置
json
{
 "option": {
  "自动做物资支援": {
      "type": "select",
      "cases": [
        {
          "name": "只做有建材箱的",
          "pipeline_override": {
            "识别包含建材的物资支援": {
              "enabled": true
            },
            "识别物资支援": {
              "enabled": false
            }
          }
        },
        {
          "name": "没有建材箱的也做",
          "pipeline_override": {
            "识别物资支援": {
              "enabled": true
            }
          }
        },
        {
          "name": "关闭",
          "pipeline_override": {
            "识别包含建材的物资支援": {
              "enabled": false
            },
            "识别物资支援": {
              "enabled": false
            }
          }
        }
      ]
    },
  }
}
  • switch字段配置
json
{
 "option": {
  "固定切换到自动战斗": {
      "type": "switch",
      "cases": [
        {
          "name": "Yes",
          "pipeline_override": {
            "开一下自动": {
              "enabled": true
            }
          }
        },
        {
          "name": "No",
          "pipeline_override": {
            "开一下自动": {
              "enabled": false
            }
          }
        }
      ]
    },
  }
}

MaaYuan 为免费开源项目,欢迎前往 GitHub 关注文档更新。