Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Args = {...}
- function printusage()
- print("Usage:")
- print("Place iron blocks in first slot.")
- print("Type darkiron <amount>")
- end
- function darkiron(num)
- turtle.select(1)
- for i=1,num do
- if turtle.getItemCount(1) == 0 then
- print("Cannot find any iron blocks.")
- printusage()
- return
- end
- turtle.place()
- if turtle.getItemCount(1) == 0 then
- os.sleep(3)
- else
- while turtle.compare() do
- os.sleep(0.5)
- end
- end
- turtle.dig()
- os.sleep(0.5)
- end
- end
- if #Args ~= 1 or tonumber(Args[1]) == 0 then
- printusage()
- else
- darkiron(tonumber(Args[1]))
- end
Advertisement
Add Comment
Please, Sign In to add comment