移动与位置目标
带玩家去某个地方、走一段路、睡一觉,这一页的 6 种类型在编辑器的「移动与位置」分类里。
例子
plugins/StarQuest/quests/示例/去瞭望塔.yml
format: 1
id: 去瞭望塔
name: '&a去瞭望塔'
category: 示例
icon: FILLED_MAP
settings:
start: {command: true}
repeat: {mode: once}
rewards:
- {type: exp, mode: give, amount: 30}
nodes:
开始:
type: start
x: 0
y: 100
next: [出发]
出发:
type: objective
x: 260
y: 100
track-text: 爬上东边的瞭望塔
goals:
- {type: reach, location: {world: world, x: 220, y: 96, z: -35}, radius: 4, display: '到达瞭望塔顶'}
next: [完成]
完成:
type: end
x: 520
y: 100
result: complete
接任务后追踪栏显示「到达瞭望塔顶」。走进那个点 4 格内就完成。「到达地点」带位置,追踪栏的导航会指向它,见 导航。
到达地点 reach
location(位置):必填radius(半径):默认 5 格ignore-y(不看高度):true= 只看水平距离,站在塔下也算
goals:
- {type: reach, location: 'world,220,96,-35', radius: 4}
进入 / 离开区域 region
需要 WorldGuard。
region(区域):必填,WorldGuard 区域 IDmode(条件):enter在区域里(默认)、leave不在区域里
goals:
- {type: region, region: 迷雾森林, mode: enter, display: '走进迷雾森林'}
靠近 NPC npc-range
npc(NPC):必填radius(距离):默认 5 格
goals:
- {type: npc-range, npc: 守林人, radius: 6, display: '找到守林人'}
和「跟 NPC 说话」不同,走近就算,不用点。
跳跃 jump
amount(数量)
goals:
- {type: jump, amount: 20}
睡觉 sleep
成功躺上床时算一次,晚上才睡得了。
amount(数量)
goals:
- {type: sleep, amount: 1, display: '在旅店睡一晚'}
移动距离 walk
走、跑、游泳、骑乘累计多少格。
amount(格数):编辑器添加时填 100
goals:
- {type: walk, amount: 500, display: '巡逻 {progress}/{amount} 格'}
会踩的坑
「到达地点」「进入区域」「靠近 NPC」是状态目标,amount 不要写大于 1。玩家接任务时已经站在那里,一进节点就完成。
「移动距离」每秒算一次,一秒内移动超过 60 格的那一段(多半是传送)不算,换世界也不算。
region 没装 WorldGuard 时永远不会完成。区域 ID 要跟 WorldGuard 里的一样,大小写不用管。