跳到主要内容

玩家目标

说暗号、敲指令、练等级、挂时间,这一页的 10 种类型在编辑器的「玩家」分类里。

例子​

守门人要暗号,在聊天栏说出「星月同辉」才放行:

plugins/StarQuest/quests/示例/守门人的暗号.yml
format: 1
id: 守门人的暗号
name: '&e守门人的暗号'
category: 示例
icon: OAK_SIGN
settings:
start: {command: true}
repeat: {mode: once}
rewards:
- {type: exp, mode: give, amount: 20}
nodes:
开始:
type: start
x: 0
y: 100
actions:
- {type: message, text: '&7守门人:口令?'}
next: [说暗号]
说暗号:
type: objective
x: 260
y: 100
track-text: 对守门人说出口令
goals:
- {type: chat, text: 星月同辉, mode: equals, display: '在聊天栏说出口令'}
next: [完成]
完成:
type: end
x: 520
y: 100
result: complete
message: '&7守门人:进去吧。'

接任务后在聊天栏输入「星月同辉」,这句话不会被别人看到,任务直接完成。

在聊天栏说出 chat​

  • text(内容):必填,可以写变量
  • mode(比对):equals 完全相同(默认)、contains 包含、regex 正则表达式
  • ignore-case(忽略大小写):默认 true
  • hide(不让别人看到):默认 true,说对的那句话会被拦下来,不发到公屏
goals:
- {type: chat, text: '^(星|月)$', mode: regex, display: '回答谜题'}

执行指令 command​

  • command(指令,不用 /):必填
  • exact(完全相同):默认 false,spawn 也会算 spawn 2;true 就只算一模一样的
  • cancel(拦下这个指令):true = 算到之后不让这个指令真的执行
  • amount(数量)
goals:
- {type: command, command: warp 主城, display: '用 /warp 主城 回到主城'}

/sq 和 /starquest 开头的指令不算。

打开云界面画面 cloudui-open​

玩家打开云界面某个画面时算一次。需要云界面 1.6.5 以上。

  • screen(画面 ID):必填,就是 screens 里的文件名。可以用 * 结尾,逗号分开多个,例如 cosmetics,starcrate*
goals:
- {type: cloudui-open, screen: cosmetics, display: '打开一次时装界面'}

达到等级 level​

进度就是现在的经验等级。

  • amount(等级):编辑器添加时填 10
goals:
- {type: level, amount: 30, display: '升到 30 级 {progress}/{amount}'}

获得经验 exp-gain​

接任务之后累计拿到多少经验值。

  • amount(经验值):编辑器添加时填 100
goals:
- {type: exp-gain, amount: 500}

游玩时间 play-time​

在线累计多少分钟,每满 60 秒加 1。

  • amount(分钟):编辑器添加时填 10
goals:
- {type: play-time, amount: 30, display: '在线 {progress}/{amount} 分钟'}

进服 join​

玩家进服时算一次。当开始触发用,就是「进服自动接任务」。

  • amount(数量):平常不用写
triggers:
- {type: join}

离线 quit​

玩家离开服务器时算一次,没有参数。常配合目标节点的 mode: any,让「中途下线」走另一个出口:

护送:
type: objective
mode: any
goals:
- {type: reach, location: 'world,300,70,40', next: [送到了]}
- {type: quit, hidden: true, next: [中途离开]}

完成进度 advancement​

完成原版进度(成就)时算。配方类进度不算。

  • advancement(进度 ID):例如 story/mine_diamond,不写 minecraft: 会自动补。不写 = 任意进度
goals:
- {type: advancement, advancement: story/mine_diamond, display: '拿到「钻石!」进度'}

资源包状态 resource-pack​

  • status(状态):SUCCESSFULLY_LOADED 载入成功(默认)、DECLINED 拒绝、FAILED_DOWNLOAD 下载失败、ACCEPTED 接受
triggers:
- {type: resource-pack, status: DECLINED}

会踩的坑​

「游玩时间」只在玩家有进行中的任务时才累计,离线的时间不算。

「在聊天栏说出」默认会吞掉那句话。用 contains 时要小心,玩家正常聊天里刚好带到那几个字,也会被吞掉。

「进服」在玩家进服大约 2 秒后才算,要等任务数据载入完。

0:000:00