Advertisement
ecco7777

Fernsteuerbare turtle

Mar 16th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1.     rednet.open("right")
  2.     while true do
  3.     x,y,z=rednet.receive()
  4.  
  5.     if y=="Forward" then
  6.     turtle.forward()
  7.     end
  8.  
  9.     if y=="Back" then
  10.     turtle.back()
  11.     end
  12.  
  13.     if y=="Left" then
  14.     turtle.turnLeft()
  15.     end
  16.  
  17.     if y=="Right" then
  18.     turtle.turnRight()
  19.     end
  20.  
  21.     if y=="Up" then
  22.     turtle.up()
  23.     end
  24.  
  25.     if y=="Down" then
  26.     turtle.down()
  27.     end
  28.  
  29.     if y=="Dig" then
  30.     turtle.dig()
  31.     end
  32.  
  33.     if y=="Place" then
  34.     turtle.place()
  35.     end
  36.  
  37.     if y=="Shutdown" then
  38.     if peripheral.getType("front")=="computer" or peripheral.getType("front")=="turtle" then
  39.     c=peripheral.wrap("front")
  40.     c.shutdown()
  41.     end
  42.     end
  43.  
  44.         if y=="Slot1" then
  45.         turtle.select(1)
  46.         end
  47.         if y=="Slot2" then
  48.         turtle.select(2)
  49.         end
  50.         if y=="Slot3" then
  51.         turtle.select(3)
  52.         end
  53.         if y=="Slot4" then
  54.         turtle.select(4)
  55.         end
  56.         if y=="Slot5" then
  57.         turtle.select(5)
  58.         end
  59.         if y=="Slot6" then
  60.         turtle.select(6)
  61.         end
  62.         if y=="Slot7" then
  63.         turtle.select(7)
  64.         end
  65.         if y=="Slot8" then
  66.         turtle.select(8)
  67.         end        
  68.     if y=="Slot9" then
  69.         turtle.select(9)
  70.         end
  71.  
  72.     if y=="Redstone" then
  73.     rs.setOutput("front",true)
  74.     sleep(0.5)
  75.     rs.setOutput("front",false)
  76.     end
  77.  
  78.     sleep(0.2)
  79.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement