Exylar

telecomande

Jun 26th, 2016
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. rednet.open("back")
  2. channel = 1517
  3. while true do
  4.   event, p1, p2, p3, p4, p5 = os.pullEvent()      
  5.   if event == "key" then
  6.     if p1 == 44 then
  7.         rednet.send(channel, "forward")
  8.       end
  9.       if p1 == 31 then
  10.         rednet.send(channel, "back")
  11.       end
  12.       if p1 == 16 then
  13.         rednet.send(channel, "turnleft")
  14.       end
  15.       if p1 == 32 then
  16.         rednet.send(channel, "turnright")
  17.       end
  18.       if p1 == 57 then
  19.         rednet.send(channel, "up")
  20.       end
  21.       if p1 == 42 then
  22.         rednet.send(channel, "down")
  23.       end
  24.       if p1 == 22 then
  25.         rednet.send(channel, "drop")
  26.       end
  27.       if p1 == 23 then
  28.         rednet.send(channel, "suck")
  29.       end
  30.       if p1 ==  80 then
  31.         rednet.send(channel, "dig")
  32.       end
  33.       if p1 == 76 then
  34.         rednet.send(channel, "place")
  35.       end
  36.       if p1 == 79 then
  37.         rednet.send(channel, "digup")
  38.       end
  39.       if p1 == 81 then
  40.         rednet.send(channel, "digdown")
  41.       end
  42.       if p1 == 75 then
  43.         rednet.send(channel, "placeup")
  44.       end
  45.       if p1 == 77 then
  46.         rednet.send(channel, "placedown")
  47.       end
  48.       if p1 == 15 then
  49.         rednet.send(channel, "redstone")
  50.       end
  51.       if p1 == 25 then
  52.         rednet.send(channel, "rebootfront")
  53.       end  
  54.     end
  55.   end
  56. end
Add Comment
Please, Sign In to add comment