创建一个新的任务

创建一个新的任务 Swiming Man

  • 任务目标为游泳 100m

  • 必须在 'world' 世界内

  • 将任务添加至 DailyQuest

开始编写任务

1.编写任务目标

你会发现,似乎没有游泳这个目标类型?

所以这时候我们需要用到 conditions 来实现它 任务目标列表

goals:
  swim:
    type: MOVE
    value: '' #该目标类型可以不设置 value.
    amount: 100 #100m
    conditions:
    - "[world]world" #检测当前世界是否为 world
    #如果你的服务端版本高于1.13
    - "[swim]" #检测玩家是否在游泳
    #如果低于1.13
    - "[stand]WATER" #检测玩家是否在水中

到此, 任务目标部分编写完成

2.编写任务基础部分

display: "&fSwiming Man"
material: IRON_BOOTS
amount: 1
model: 0
description:
  # 因为任务目标的id我们设置为 swim 所以这里用 %progress_swim% 来表示该任务的进度
  - " &7&l· &#bcd2ee游泳100m &f(&c%progress_swim%/100&f)"
reward_description:
  - " &7&l· &#9AFF9A游戏币 ×100"
goals:
  swim:
    type: MOVE
    value: ''
    amount: 100
    conditions:
    - "[world]world"
    - "[swim]"
reward:
  run:
    - 'console_command;eco give %player% 100'

3.保存文件

保存该任务文件到 Quests 文件夹并将其命名为 Swimming_Man.yml

4.将任务添加到任务周期 DailyQuests 配置文件内

打开位于 CategoriesDailyQuests.yml

将该任务的文件名写入 settings.quests

settings:
  display: '&eDaily Quests'
  refresh: 1
  amount: 5
  quests:
    - Butcher
    - Golden_Miner
    - Material_Shortage_1
    - Material_Shortage_2
    - Stonemason
    - Happy_Trade
    - Hunger
    - Running_Man
    - Adventurer
    - Adventurer_2
    - Adventurer_3
    - Adventurer_4
    - Hungriness
    - Farmer
    - Farmer_2
    - Goodbye_World
    - FishMan
    - FishMan2
    - Breeder
    - Blacksmith
    - Clother
    - Warrior
    - Enchanter
    - Timer
    - Refiner
    - Swimming_Man #在此 在此 在此

5.重载插件

之后你就可以随机到该任务了!

Last updated