Advertisement
ninja_axiom

Farm Plant Seeds

Sep 8th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local monitor = peripheral.wrap("bottom")
  2.  
  3. while true do
  4.     monitor.setBackgroundColor(colors.green)
  5.     monitor.setCursorPos(2,2)
  6.     monitor.write("Plant")
  7.     monitor.setCursorPos(2,3)
  8.     monitor.write("     ")
  9.     monitor.setCursorPos(2,4)
  10.     monitor.write("Seeds")
  11.    
  12.     local event, side, xPos, yPos = os.pullEvent("monitor_touch")
  13.     if ( (xPos >= 1) and (xPos <= 7) and ( (yPos >= 2) or (yPos <= 4) ) ) then
  14.         shell.run("plantSeeds")
  15.     end
  16.    
  17.     monitor.setBackgroundColor(colors.black)
  18.     monitor.clear()
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement