Don't like ads? PRO users don't see any ads ;-)
Guest

elevatorup

By: fizzy6868 on Sep 22nd, 2012  |  syntax: Lua  |  size: 0.81 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. rednet.open("top")
  2. x = 0
  3. y = 0
  4. rside = "right"
  5.  
  6. while y ~= "exit" do
  7. x = 0
  8.     id,message = rednet.receive(10)
  9.  
  10.     if id == 0 and message == "bottomground" then
  11.         while x ~= 51 do
  12.             redstone.setOutput(rside,true)
  13.                         sleep(0.5)
  14.             redstone.setOutput(rside,false)
  15.                         sleep(0.5)
  16.             x = x + 1
  17.                         end
  18.     end
  19.        
  20.         if id == 0 and message == "halfground" then
  21.         while x ~= 39 do
  22.             redstone.setOutput(rside,true)
  23.                         sleep(0.5)
  24.             redstone.setOutput(rside,false)
  25.                         sleep(0.5)
  26.             x = x + 1
  27.                         end
  28.     end
  29.        
  30.         if id == 0 and message == "bottomhalf" then
  31.         while x ~= 12 do
  32.             redstone.setOutput(rside,true)
  33.                         sleep(0.5)
  34.             redstone.setOutput(rside,false)
  35.                         sleep(0.5)
  36.             x = x + 1
  37.                         end
  38.     end
  39.        
  40. end