-- レバーがONの時に攻撃
while true do
if redstone.getInput('top') == true then
turtle.attack()
turtle.dropDown()
end
os.sleep(0.5)
end
-- レバーがOFFの時に攻撃
while true do
if redstone.getInput('top') == false then
turtle.attack()
turtle.dropDown()
end
os.sleep(0.5)
end
-- アイテムを同時にチェストに入れるプログラム
while true do
if redstone.getInput('top') == true then
turtle.attack()
for i = 1, 16 do
turtle.select(i)
turtle.dropDown()
end
end
os.sleep(0.5)
end
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme