Why is the condition on line 31 not working?
if player's tool is a pickaxe:
if tool is a wood pickaxe:
set {_check} to checkSkill("mining", "wood", 0, event-player)
if tool is a stone pickaxe:
set {_check} to checkSkill("mining", "stone", 5, event-player)
if tool is a iron pickaxe:
set {_check} to checkSkill("mining", "iron", 15, event-player)
if tool is a gold pickaxe:
set {_check} to checkSkill("mining", "gold", 25, event-player)
if tool is a diamond pickaxe:
set {_check} to checkSkill("mining", "diamond", 35, event-player)
if tool is a netherite pickaxe:
set {_check} to checkSkill("mining", "netherite", 50, event-player)
cancelEvent({_check})
if player's tool is a axe:
send "This is a axe!" to player
function checkSkill(skill_name: text, message: text, skill_req: number, p: offline player) :: boolean:
#*
set {_skill_level} to placeholder "ecoskills_%{_skill_name}%" from {_p}
send action bar "This is %{_message}% pickaxe and level %{_skill_name}% is %{_skill_level}%" to {_p}
if {_skill_level} is greater than or equal to {_skill_req}:
send "Skill Yes" to {_p}
else:
send "Skill No" to {_p}
#*
function cancelEvent(cancel_event: boolean):
if {_cancel_event} is true:
cancel the event```
If you need to tell me something, then I’m on the server.