Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ttv = false --true if drill is at top
- local tbv = false --true if drill is at bot
- local tr = false --actual top drill check left
- local br = false --actual bot drill check right
- local atbot = false --top
- local together = false --back
- while true do
- os.sleep(0.1) --every 2 ticks
- tr = redstone.getInput("left")
- br = redstone.getInput("right")
- atbot = redstone.getInput("top")
- together = redstone.getInput("back")
- ttv = not tr and not br
- tbv = tr and not br
- if not ttv and not tbv and not together then
- if atbot then --- doesn't really need this check
- redstone.setAnalogueOutput("front", 9)
- print("vstate 9")
- end
- elseif not ttv and not tbv and together then
- redstone.setAnalogueOutput("front", 1)
- print("vstate 1")
- elseif not ttv and tbv and not together then
- if atbot then
- redstone.setAnalogueOutput("front", 8)
- print("vstate 8")
- else
- redstone.setAnalogueOutput("front", 2)
- print("vstate 2")
- end
- elseif not ttv and tbv and together then
- redstone.setAnalogueOutput("front", 3)
- print("vstate 3")
- elseif ttv and not tbv and not together then
- if atbot then
- redstone.setAnalogueOutput("front", 10)
- print("vstate 10")
- else
- redstone.setAnalogueOutput("front", 4)
- print("vstate 4")
- end
- elseif ttv and not tbv and together then
- redstone.setAnalogueOutput("front", 5)
- print("vstate 5")
- elseif ttv and tbv and not together then
- redstone.setAnalogueOutput("front", 6)
- print("vstate 6")
- elseif ttv and tbv and together then
- redstone.setAnalogueOutput("front", 7)
- print("vstate 7")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment