Advertisement
Guest User

farm.lua

a guest
Apr 4th, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local channel = 1
  2. local modem = peripheral.wrap("top")
  3. local traitsRsSide = "left"
  4. local matureRsSide = "front"
  5.  
  6. print("Computer listening for redstone from the " .. traitsRsSide .. " and " .. matureRsSide)
  7.  
  8. while true do
  9.     os.pullEvent("redstone")
  10.     if rs.getAnalogInput(traitsRsSide) == 15 then
  11.         modem.transmit(channel, channel, "finish")
  12.     elseif rs.getAnalogInput(traitsRsSide) > 0 then
  13.         modem.transmit(channel, channel, "replace")
  14.     elseif rs.getInput(matureRsSide) then
  15.         modem.transmit(channel, channel, "placeSticks")
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement