jonassvensson4

crane

May 27th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. print("Crane starting up")
  2.  
  3. while true do
  4.     local message = read()
  5.     local args = { ... }
  6.     local dist = tonumber(args[1])
  7.        
  8.         if message == "upp" then
  9.         for i=1,dist,1 do
  10.             redstone.setBundledOutput("right", colors.blue)
  11.             sleep(1)
  12.             redstone.setBundledOutput("right", 0)
  13.     end
  14.         if message == "ner" then
  15.         for i=1,dist,1 do
  16.             redstone.setBundledOutput("right", colors.red)
  17.             sleep(1)
  18.             redstone.setBundledOutput("right", 0)
  19.     end
  20.         if message == "in_a" then
  21.         for i=1,dist,1 do
  22.             redstone.setBundledOutput("right", colors.blue)
  23.             sleep(1)
  24.             redstone.setBundledOutput("right", 0)
  25.     end
  26.         if message == "ut_a" then
  27.         for i=1,dist,1 do
  28.             redstone.setBundledOutput("right", colors.blue)
  29.             sleep(1)
  30.             redstone.setBundledOutput("right", 0)
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment