跳到主要内容

固定 10 个奖品、抽完重来

这篇做一个「星月藏宝阁」:里面固定 10 个奖品,每个玩家抽走一个就少一个,10 抽一定拿完全部。第一抽 1 把钥匙、每抽多 1 把,拿完第 10 个后奖品补满、价钱回到 1 把,开始下一轮。

做法是两件事一起设:每个奖品 limit: 1(每人只能拿 1 次),加上递增花费的 reset: empty(奖池抽完时重来)。

第 1 步:写奖池文件​

新建 plugins/StarCrate/crates/cangbao.yml:

display-name: '<gradient:#C77DFF:#5EC8FF>星月藏宝阁</gradient>'
type: normal
animation: roulette
ten-animation: cards
cost:
type: key
single: 1
key-name: '<light_purple>藏宝钥匙'
escalate:
enabled: true
step: 1
max: 0
reset: empty
prizes:
- {id: bread, item: {material: BREAD, amount: 32}, weight: 10, rarity: common, limit: 1}
- {id: iron, item: {material: IRON_INGOT, amount: 16}, weight: 10, rarity: common, limit: 1}
- {id: coal, item: {material: COAL, amount: 32}, weight: 10, rarity: common, limit: 1}
- {id: gold, item: {material: GOLD_INGOT, amount: 8}, weight: 10, rarity: rare, limit: 1}
- {id: emerald, item: {material: EMERALD, amount: 8}, weight: 10, rarity: rare, limit: 1}
- {id: lapis, item: {material: LAPIS_LAZULI, amount: 32}, weight: 10, rarity: rare, limit: 1}
- {id: apple, item: {material: GOLDEN_APPLE, amount: 4}, weight: 10, rarity: epic, limit: 1}
- {id: diamond, item: {material: DIAMOND, amount: 4}, weight: 10, rarity: epic, limit: 1}
- {id: totem, item: {material: TOTEM_OF_UNDYING}, weight: 10, rarity: legendary, limit: 1}
- {id: elytra, item: {material: ELYTRA}, weight: 10, rarity: mythic, limit: 1}

一轮要花 1 + 2 + … + 10 = 55 把钥匙。权重决定先抽到哪个,全部一样就是每个机会相同;想让鞘翅晚点出,把它的权重调低。

只想「抽完重来」、不想涨价,把 step 写 0,每抽都是 1 把。

第 2 步:重载并测试​

/sc reload
/sc key cangbao 64
/sc open cangbao
  1. 每个奖品说明下面写「已获得 0/1」。
  2. 单抽一次,抽到的那个变成「已达获得上限 1/1」,概率变 0%,其他 9 个的概率变大;单抽花费变成 2 把。
  3. 一直抽到第 10 个,抽完后再打开预览,10 个奖品都回到「已获得 0/1」,单抽花费回到 1 把。

/sc steps 你的名字 cangbao 可以看现在算到第几抽。

在游戏里设也可以​

/sc edit cangbao:

  1. 左键每个奖品 → 「每人上限」左键输入 1,10 个都要设。
  2. 「⚙ 奖池设置」→ 「花费类型」点到「钥匙」→ 点「递增花费」打开 → 「每抽增加」输入 1 → 「花费重置」切到「奖池抽完」。

会踩的坑​

只要有一个奖品没设 limit,奖池就永远抽不完,也就永远不会重来。另外 reset 不是 empty 时,玩家抽完 10 个就没东西可以抽了,会提示「这个奖池里已经没有你能抽到的奖品了」。

reset: empty 要开着递增花费才有作用,而且花费类型不能是免费。不想涨价就用 step: 0,不要把递增关掉。

十连只能在一轮刚开始时用。已经抽了 3 个,剩 7 个,再点十连会提示「这个奖池你最多只能再抽 7 次」,不扣钱,请玩家改用单抽。

每个玩家各自一轮。管理员的免费代抽会拿走奖品,但不会让价钱上涨。

0:000:00