Im trying to make a custom enchant rather than using vanilla enchants for fortune. exp gain and block break.. does anyone know how to connect variables of text to specific numbers so the player can get the correct number of items per fortune? Is there then a way I can add math to the number variable to get alternate variables?
Code:
#Options:
material.mine.stone: stone button named "&7Stone Chunk"
material.mine.coal: coal named "&7Coal Chunk"
material.mine.fossil: quartz named "&7Fossil"
material.crop.desc: &8[&b&8] › &7Common Crop
material.mine.desc: &8[&b&8] › &7Common Deposit
material.fish.desc: &8[&b&8] › &7Common Catch
material.combat.desc: &8[&b&8] › &7Common Loot
add "&8[&7Mining Tool&8] &c &f&nI"
&8[&7Mining Tool&8] &c &f&nII : 2 : {II}
&8[&7Mining Tool&8] &c &f&nIII : 3 : {II}
&8[&7Mining Tool&8] &c &f&nIV : 4 : {IV}
&8[&7Mining Tool&8] &c &f&nV : 5 : {V}
tier.null: &8[&7✦✦✦✦✦&8]
tier.common: &8[&6✦&7✦✦✦✦&8]
tier.uncommon: &8[&6✦✦&7✦✦✦&8]
tier.rare: &8[&6✦✦✦&7✦✦&8]
tier.reowned: &8[&6✦✦✦✦&7✦&8]
tier.legendary: &8[&6✦✦✦✦&7✦&8]
tier.titan: &8「&c✯&8」
tier.cosmetic: &8[&d✦✦✦✦✦&8]
icon.tool: &8[&7&6⛏&8]
icon.material: &8[&b&8]
icon.experience: &8[&7&a✨&8]
# MINING
command /pickaxe:
description: Recieve another pickaxe. CD: 1 day.
permission: lost.pickaxe
executable by: players
cooldown: a day
cooldown storage: {hoe::%player's uuid%}
cooldown message: These picks don't grow on trees! Try again %remaining time% later.
cooldown bypass: hoe.infinity
trigger:
if the player has space for a wooden pickaxe:
give 1 wooden pickaxe named "&8[&7Mining Tool&8] &c &f&nV" with the lore "{@icon.tool}&8 › &7Sturdy &8[&7I&8]", "{@icon.material}&8 › &7Fortune &8[&7I&8]" and "{@icon.experience}&8 › &7Mastery &8[&7{_0}&8]" to player
else:
send "You do not have enough space in your inventory to hold the wooden hoe!"
cancel the cooldown
Variables:
{tool.mining.level} =
{material.mining.stone} = {tool.mining.level}
{tool}.mining})
{"&8[&7Mining Tool&8] &c &f&nI"} = {_0}
{_0} = 1
{"&8[&7Mining Tool&8] &c &f&nII"} = {_0}
{_0} = 2
{"&8[&7Mining Tool&8] &c &f&nIII"} = {_0}
{_0} = 3
{"&8[&7Mining Tool&8] &c &f&nIV"} = {_0}
{_0} = 4
{"&8[&7Mining Tool&8] &c &f&nV"} = {_0}
{_0} = 5
on break of stone:
cancel event
if {})
set event-block to stone
if name of player's tool is "&8[&7Mining Tool&8] &c &f&nI", "&8[&7Mining Tool&8] &c &f&nII", "&8[&7Mining Tool&8] &c &f&nIII", "&8[&7Mining Tool&8] &c &f&nIV" or "&8[&7Mining Tool&8] &c &f&nV":
if lore of item contains "{@icon.material}&8 › &7Fortune &8[&7I&8]":
give player {_0} {@material.mine.stone} with lore "{@material.mine.desc}" and "{@tier.uncommon}"
if lore of item contains "{@icon.material}&8 › &7Fortune &8[&7II&8]":
give player {_0} {@material.mine.stone} with lore "{@material.mine.desc}" and "{@tier.uncommon}"
if lore of item contains "{@icon.material}&8 › &7Fortune &8[&7III&8]":
give player {_0} {@material.mine.stone} with lore "{@material.mine.desc}" and "{@tier.uncommon}"
if lore of item contains "{@icon.material}&8 › &7Fortune &8[&7IV&8]":
give player {_0} {@material.mine.stone} with lore "{@material.mine.desc}" and "{@tier.uncommon}"
if lore of item contains "{@icon.material}&8 › &7Fortune &8[&7V&8]":
give player {_0} {@material.mine.stone} with lore "{@material.mine.desc}" and "{@tier.uncommon}"