Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fs.delete("aware.current")
- os.loadAPI("aware")
- a=aware
- function block(endblock)
- for i=1,endblock do
- turtle.select(i)
- if turtle.compareDown() then
- turtle.digDown()
- return i
- end
- end
- -- destroy unknown blocks
- turtle.digDown()
- return 0
- end
- function place(i)
- if (i > 0) then
- turtle.select(i)
- if (not turtle.compareDown()) then
- -- remove wrong block
- turtle.digDown()
- if (turtle.getItemCount(i) < 2 ) then
- print("Sleeping while waiting for refill in slot " .. i)
- while (turtle.getItemCount(i) < 2 ) do
- os.sleep(15)
- end
- end
- if (not turtle.placeDown()) then
- error("Unable to place")
- end
- end
- end
- end
- function ml()
- a.l()
- a.df()
- a.r()
- end
- function mr()
- a.r()
- a.df()
- a.l()
- end
- function t180()
- a.r()
- a.r()
- end
- function save(table,name)
- local file = fs.open(name,"w")
- file.write(textutils.serialize(table))
- file.close()
- end
- function load(name)
- local file = fs.open(name,"r")
- local data = file.readAll()
- file.close()
- return textutils.unserialize(data)
- end
- function awarecleanup()
- fs.delete("aware.current")
- fs.delete("aware.start")
- end
Advertisement
Add Comment
Please, Sign In to add comment