Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local scaffoldn = 1
- local sprayn = 2
- local stonen = 3
- local t = turtle
- function scaffold()
- t.select(scaffoldn)
- t.place()
- end
- function spray()
- t.select(sprayn)
- t.place()
- end
- function sand()
- redstone.setOutput("right", true)
- sleep(0.5)
- redstone.setOutput("right", false)
- t.select(stonen)
- if t.compare() == 0 then
- redstone.setOutput("right", true)
- sleep(0.5)
- redstone.setOutput("right", false)
- end
- t.select(sprayn)
- end
- function stone()
- t.select(stonen)
- if t.compare() == 1 then
- t.dig()
- else
- sleep(0.5)
- if t.compare() == 1 then
- t.dig()
- else
- sleep(0.5)
- t.dig()
- end
- end
- end
- function pullstone()
- t.select(stonen)
- t.dropUp(1)
- end
- function main()
- scaffold()
- sleep(0.5)
- spray()
- sleep(0.5)
- sand()
- sleep(1)
- stone()
- pullstone()
- sleep(0.5)
- end
- function count()
- if t.getItemCount(scaffoldn)>t.getItemCount(stonen) then
- main()
- end
- end
- while true do
- local event = os.pullEvent("redstone")
- main()
- count()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement