整合条件
用其他插件的数据当条件。这一页的 2 种类型在编辑器的「整合」分类里。
例子
mcMMO 挖矿 50 级以上才能接矿工公会的任务:
plugins/StarQuest/quests/示例/矿工公会.yml
format: 1
id: 矿工公会
name: '&7矿工公会入会考核'
category: 示例
icon: IRON_PICKAXE
settings:
start: {command: true}
repeat: {mode: once}
requirements:
- {type: placeholder, placeholder: '%mcmmo_level_mining%', compare: '>=', value: 50, message: '&e挖矿等级要 50 级'}
rewards:
- {type: exp, mode: give, amount: 200}
nodes:
开始:
type: start
x: 0
y: 100
next: [考核]
考核:
type: objective
x: 260
y: 100
track-text: 入会考核
goals:
- {type: break, material: [DEEPSLATE], amount: 128}
next: [完成]
完成:
type: end
x: 520
y: 100
result: complete
PAPI 变量 placeholder
比较任意 PlaceholderAPI 变量:职业、mcMMO、Jobs、AuraSkills、公会都能用。需要 PlaceholderAPI。
placeholder(变量):必填,例如%player_level%compare(比较):默认>=。可选>=>=!=<<=,以及contains包含、regex正则表达式、ignorecase忽略大小写相等value(值):必填
- {type: placeholder, placeholder: '%vault_eco_balance%', compare: '>=', value: 100}
- {type: placeholder, placeholder: '%player_world%', compare: ignorecase, value: World}
星月天职职业 vocation
需要星月天职 StarVocation。
class(职业 ID):必填,可写多个,写职业 ID 或职业名称都可以level(至少等级):默认 0 = 不限
- {type: vocation, class: [warrior, knight], level: 20}
会踩的坑
PAPI 变量要先装好对应的扩展(/papi ecloud download …),没装时变量原样返回,数字比较一律不成立。先用 /papi parse me %变量% 看看拿到的是什么。
有些变量会带千分位或单位(例如 1,000、12级),数字比较读不了。换一个不带格式的变量,或改用 contains、regex 比较文字。
插件自动产生的不满足原因对 PAPI 变量是空的,记得写 message。