Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a=require("robot")local b=0 local function c()local f=a.durability()while not f do print("No valid tool. Please place one in the tool slot and press enter.")io.read()f=a.durability()end a.swing()end local function d()for f=1,4 do c()a.turnRight()end a.dropDown()print("Cycles done: "..b)b=b+1 end local function e()print("# Andrew's Cobblestone Generator #")print("# Copyright 2018 Andrew Lalis #")print("#--------------------------------#")print("Please enter the number of cycles to perform, or -1 to continue forever.")local f=tonumber(io.read())if(f==nil or f==-1)then print("Beginning infinite cycles.")while true do d()end else print("Beginning "..f.." cycles.")for g=1,f do d()end end print("#------Program completed.--------#")end e()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement