玩家目标
说暗号、敲指令、练等级、挂时间,这一页的 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(忽略大小写):默认truehide(不让别人看到):默认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 秒后才算,要等任务数据载入完。