Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Circle 2.0 Controller
- --NAPTlME
- rednet.open('right')
- function isOdd(n)
- if n%2==1 then
- return true
- else
- return false
- end
- end
- while true do
- print("Please enter a diameter between 4 and 88")
- print("Or type down")
- repeat
- input = read()
- if input == "down" then
- rednet.broadcast(input)
- end
- diameter = tonumber(input)
- until diameter
- if diameter then
- rednet.broadcast(diameter)
- radius = math.floor(diameter/2)
- print("Placing Cylinder with radius of "..radius..".")
- if isOdd(diameter) then
- print("Please use 4 turtles with one placed at the corner of a chunk and the others making a 15x15 square")
- else
- print("Please use 4 turtles placed at corners of central chunk.")
- end
- print("And ensure that desired block is in the last slot")
- print("Turtles will place blocks from left to right.")
- if diameter > 80 then
- print("Remain in center chunk to prevent chunk unloading")
- end
- repeat
- term.clearLine()
- id, msg = rednet.receive()
- if msg == "empty" then
- term.write("Please insert more blocks")
- end
- maximum = tonumber(msg)
- until maximum
- print()
- print("Please enter a height between 1 and "..maximum)
- print("Or type 'cancel'")
- repeat
- var = read()
- if var == "cancel" then
- break
- end
- input = tonumber(var)
- until input
- rednet.broadcast(input)
- print("Constructing a cylinder with diameter of "..diameter.." and height of "..input)
- end
- if var ~= 'cancel' then
- repeat
- id,msg = rednet.receive()
- until msg == "Done"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement