Hi! I've been trying to get into Skript and have started with custom items, right now I'm working on an item to search a radius around the player for ore blocks, and then send a message. Everything works besides being able to sense the ores.
"
It's also doing the same with a 3x3 pickaxe. The loop-block isnt checking for the blocks.
Code:
on rightclick:
"%lore of player's held item%" contains "&eOre Enchament"
loop blocks in radius 10 around player:
if loop-block is iron ore, or coal ore, or gold ore, or diamond ore, or lapis ore, or redstone ore:
send "&eThere are ores nearby!" to the player
exit
else:
send "&e There's nothing nearby!" to the player
exit
It's also doing the same with a 3x3 pickaxe. The loop-block isnt checking for the blocks.
Code:
on mine:
"%lore of player's held item%" contains "&eGiant Pickaxe":
set {_1} to location of event-block
set {_2} to location of event-block
if player's pitch is between -50 and 50:
add 1 to y-coord of {_1}
subtract 1 from y-coord of {_2}
if player's horizontal facing is west or east:
add 1 to z-coord of {_1}
subtract 1 from z-coord of {_2}
loop blocks within {_1} to {_2}:
if loop-block is not bedrock, or water, or lava:
if loop-block is stone, or andesite, or granite, or diorite, or obsidian, or cobblestone, or sandstone, or stone bricks, or chiseled stone bricks:
break loop-block using player's tool
else if player's horizontal facing is north or south:
add 1 to x-coord of {_1}
subtract 1 from x-coord of {_2}
loop blocks within {_1} to {_2}:
if loop-block is not bedrock, or water, or lava:
if loop-block is stone, or andesite, or granite, or diorite, or obsidian, or cobblestone, or sandstone, or stone bricks, or chiseled stone bricks:
break loop-block using player's tool
else:
add 1 to x-coord of {_1}
add 1 to z-coord of {_1}
subtract 1 from x-coord of {_2}
subtract 1 from z-coord of {_2}
loop blocks within {_1} to {_2}:
if loop-block is not bedrock, or water, or lava:
if loop-block is stone, or andesite, or granite, or diorite, or obsidian, or cobblestone, or sandstone, or stone bricks, or chiseled stone bricks:
break loop-block using player's tool