点数
点数是数字,按分类存,永久跟着玩家,适合声望、好感度、阵营分数。一个玩家可以有很多分类。
例子
每天的委托加声望,声望到 100 解锁商店任务:
plugins/StarQuest/quests/委托/送信委托.yml
format: 1
id: 送信委托
name: '&e送信委托'
category: 委托
icon: PAPER
settings:
start: {command: true}
repeat: {mode: daily, reset-time: '04:00'}
rewards:
- {type: point, point: 星月村声望, mode: add, amount: 10, notify: true}
nodes:
开始:
type: start
x: 0
y: 100
next: [送信]
送信:
type: objective
x: 260
y: 100
track-text: 把信送到铁匠铺
goals:
- {type: npc, npc: 铁匠, display: '把信交给铁匠'}
next: [完成]
完成:
type: end
x: 520
y: 100
result: complete
完成时奖励栏有「星月村声望 +10」,接着提示「星月村声望 现在是 40」。商店任务的接取条件写:
requirements:
- {type: point, point: 星月村声望, compare: '>=', value: 100, message: '&e星月村声望要 100'}
改点数
动作 point:
mode:add增加(默认)、subtract减少、set设为、multiply乘以、delete删除amount:可以写变量notify:true= 提示玩家现在是多少
- {type: point, point: 好感度, mode: subtract, amount: 5}
- {type: point, point: 好感度, mode: multiply, amount: 0.5}
管理员手动改:
/sq admin point <玩家> give 星月村声望 50
/sq admin point <玩家> take 星月村声望 20
/sq admin point <玩家> set 星月村声望 0
判断和显示
- 条件
point:比较点数,见 变量类条件 - 目标
point:点数累积到某个值,见 数据与其他目标 - 文字里
{point:星月村声望},没有时显示 0 - PlaceholderAPI:
%starquest_point_星月村声望%,可以放在计分板或称号上
会踩的坑
点数可以减到负数,插件不会帮你挡。不想变负的话,减之前用 if 动作检查。
只有 add 会出现在奖励栏(「星月村声望 +10」),减少、设为这些不会显示。
目标 point 的进度是当下的点数,不是接任务后加了多少。接任务前已经有 100 的玩家,一接就完成。