Heliomance

Rain manager

Jan 31st, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. while true do
  2.     event, param1 = os.pullEvent()
  3.     if event == "redstone" then
  4.         if redstone.getInput("left") == true and redstone.getInput("top") == true then
  5.             redstone.setBundledOutput("right", colors.yellow)
  6.             print ("Dissipating rain.")
  7.             sleep(2)
  8.             redstone.setBundledOutput("right", 0)
  9.             sleep(20)
  10.         elseif redstone.getInput("left") == false and redstone.getInput("top") == false then
  11.             redstone.setBundledOutput("right", colors.magenta)
  12.             print ("Seeding clouds.")
  13.             sleep(2)
  14.             redstone.setBundledOutput("right", 0)
  15.             sleep(30)
  16.         end
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment