Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ZCount = "front"
- XCount = "right"
- ZDupe = "left"
- XDupe = "back"
- networkSide = "bottom"
- function accel(nX,nZ)
- redstone.setAnalogOutput(XCount,13)
- redstone.setAnalogOutput(ZCount,13)
- sleep(0.8)
- running = true
- while running do
- running = false
- if nX >= 10 then
- redstone.setOutput(XDupe,true)
- sleep(0.05)
- redstone.setOutput(XDupe,false)
- sleep(0.1)
- nX = nX-10
- running = true
- else
- sleep(0.15)
- end
- if nZ >= 10 then
- redstone.setOutput(ZDupe,true)
- sleep(0.05)
- redstone.setOutput(ZDupe,false)
- sleep(0.1)
- nZ = nZ-10
- running = true
- else
- sleep(0.15)
- end
- end
- redstone.setAnalogOutput(XCount,nX+3)
- redstone.setAnalogOutput(ZCount,nZ+3)
- sleep(0.8)
- redstone.setOutput(XDupe,true)
- sleep(0.05)
- redstone.setOutput(XDupe,false)
- sleep(0.1)
- redstone.setOutput(ZDupe,true)
- sleep(0.05)
- redstone.setOutput(ZDupe,false)
- sleep(5)
- rednet.broadcast({command="accelerator.done"})
- end
- rednet.open(networkSide)
- while rednet.isOpen() do
- id,msg = rednet.receive()
- if msg.command == "accelerator.accel" then
- accel(msg.countX,msg.countZ)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement