Advertisement
Guest User

out

a guest
Sep 19th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local monitor = peripheral.wrap("right")
  2. term.redirect(monitor)
  3. local blah
  4. local x
  5. local y
  6. paintutils.drawPixel(4, 2, colors.blue)
  7. paintutils.drawPixel(4, 4, colors.yellow)
  8. paintutils.drawPixel(2, 3, colors.red)
  9. paintutils.drawPixel(6, 3, colors.green)
  10. rednet.open("top")
  11. while true do
  12.    blah, blah, x, y = os.pullEvent("monitor_touch")
  13.    if x == 4 and y == 4 then
  14.       rednet.broadcast("backward")
  15.    end
  16.    if x == 4 and y == 2 then
  17.       rednet.broadcast("forward")
  18.    end
  19.    if x == 2 and y == 3 then
  20.       rednet.broadcast("left")
  21.    end
  22.    if x == 6 and y == 3 then
  23.       rednet.broadcast("right")
  24.    end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement