Advertisement
ecco7777

turtle-Fernsteuerung

Mar 16th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.57 KB | None | 0 0
  1. rednet.open("right")
  2. x=8767
  3.  while true do
  4.         local sEvent, param = os.pullEvent("key")
  5.        
  6.             if param == 200 then
  7.                 print("Forward")
  8.         rednet.send(x,"Forward")
  9.                 sleep(0.2)
  10.         end
  11.  
  12.             if param == 203 then
  13.                 print("Left")
  14.         rednet.send(x,"Left")
  15.                 sleep(0.2)
  16.         end
  17.  
  18.             if param == 205 then
  19.                 print("Right")
  20.         rednet.send(x,"Right")
  21.                 sleep(0.2)
  22.         end
  23.  
  24.             if param == 208 then
  25.                 print("Back")
  26.         rednet.send(x,"Back")
  27.                 sleep(0.2)
  28.         end
  29.  
  30.             if param == 52 then
  31.                 print("Dig")
  32.         rednet.send(x,"Dig")
  33.                 sleep(0.2)
  34.         end
  35.  
  36.             if param == 12 then
  37.                 print("Place")
  38.         rednet.send(x,"Place")
  39.                 sleep(0.2)
  40.         end
  41.  
  42.             if param == 17 then
  43.                 print("Up")
  44.         rednet.send(x,"Up")
  45.                 sleep(0.2)
  46.         end
  47.  
  48.             if param == 31 then
  49.                 print("Down")
  50.         rednet.send(x,"Down")
  51.                 sleep(0.2)
  52.         end
  53.  
  54.             if param == 20 then
  55.                 print("Shutdown")
  56.         rednet.send(x,"Shutdown")
  57.                 sleep(0.2)
  58.         end
  59.  
  60.             if param == 2 then
  61.                 print("Slot1")
  62.         rednet.send(x,"Slot1")
  63.                 sleep(0.2)
  64.         end
  65.  
  66.             if param ==3 then
  67.                 print("Slot2")
  68.         rednet.send(x,"Slot2")
  69.                 sleep(0.2)
  70.         end
  71.  
  72.             if param == 4 then
  73.                 print("Slot3")
  74.         rednet.send(x,"Slot3")
  75.                 sleep(0.2)
  76.         end
  77.  
  78.             if param == 5 then
  79.                 print("Slot4")
  80.         rednet.send(x,"Slot4")
  81.                 sleep(0.2)
  82.         end
  83.  
  84.             if param == 6 then
  85.                 print("Slot5")
  86.         rednet.send(x,"Slot5")
  87.                 sleep(0.2)
  88.         end
  89.  
  90.             if param == 7 then
  91.                 print("Slot6")
  92.         rednet.send(x,"Slot6")
  93.                 sleep(0.2)
  94.         end
  95.  
  96.             if param == 8 then
  97.                 print("Slot7")
  98.         rednet.send(x,"Slot7")
  99.                 sleep(0.2)
  100.         end
  101.  
  102.             if param == 9 then
  103.                 print("Slot8")
  104.         rednet.send(x,"Slot8")
  105.                 sleep(0.2)
  106.         end
  107.  
  108.             if param == 10 then
  109.                 print("Slot9")
  110.         rednet.send(x,"Slot9")
  111.                 sleep(0.2)
  112.         end
  113.  
  114.             if param == 19 then
  115.                 print("Redstone")
  116.         rednet.send(x,"Redstone")
  117.                 sleep(0.2)
  118.         end
  119.            
  120.        
  121.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement