minecraft-expanded-datapack/data/undeadm-m2/functions/villager_talk/by_profession/interaction/armorer.mcfunction

46 lines
4.1 KiB
Mcfunction

# PRE SNAPSHOT
function undeadm-m2:villager_talk/by_profession/interaction/armorer_trades
# 0 - buy coal
execute if score $value rnd_random matches 0 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.0"}]
# 1 - buy iron ingot
execute if score $value rnd_random matches 1 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.1"}]
# 2 BUY DIAMOND
# BEFORE selling diamond armor
execute if score $value rnd_random matches 2 if entity @s[nbt={VillagerData:{level:3}}] run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.2a"}]
# AFTER selling some diamond armor
execute if score $value rnd_random matches 2 if entity @s[nbt={VillagerData:{level:4}}] run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.2b"}]
# AFTER selling all diamond armor
execute if score $value rnd_random matches 2 if entity @s[nbt={VillagerData:{level:5}}] run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.2c"}]
# 3 - buy lava bucket
execute if score $value rnd_random matches 3 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.3"}]
# 4 - sell bell
execute if score $value rnd_random matches 4 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.4"}]
# 5 - sell shield
execute if score $value rnd_random matches 5 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.5"}]
# 6 - sell iron helmet
execute if score $value rnd_random matches 6 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.6"}]
# 7 - sell iron chestplate
execute if score $value rnd_random matches 7 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.7"}]
# 8 - sell iron leggings
execute if score $value rnd_random matches 8 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.8"}]
# 9 - sell iron boots
execute if score $value rnd_random matches 9 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.9"}]
# 10 - sell chainmail helmet
execute if score $value rnd_random matches 10 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.10"}]
# 11 - sell chainmail chestplate
execute if score $value rnd_random matches 11 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.11"}]
# 12 - sell chainmail leggings
execute if score $value rnd_random matches 12 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.12"}]
# 13 - sell chainmail boots
execute if score $value rnd_random matches 13 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.13"}]
# 14 - sell diamond helmet
execute if score $value rnd_random matches 14 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.14"}]
# 15 - sell diamond chestplate
execute if score $value rnd_random matches 15 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.15"}]
# 16 - sell diamond leggings
execute if score $value rnd_random matches 16 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> "},{"translate":"entity.villager.talk.armorer.16"}]
# 17 - sell diamond boots
execute if score $value rnd_random matches 17 run tellraw @a[distance=..16] [{"text":"<"},{"selector":"@s"},{"text":"> ."},{"translate":"entity.villager.talk.armorer.17"}]