DiaManD

RedNetReceivingFunction

Aug 28th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. t = turtle
  2. rn = rednet
  3. function forward1()
  4.  for i = 15,n
  5.  t.forward()
  6.  end
  7. end
  8. function chunkload()
  9.  local msg = "start"
  10.  if rn.isOpen("right") == nil then
  11.  rn.open("right")
  12.  end
  13. print("Prepeared to work")
  14. sleep(3)
  15.  if rn.receive("dghfjd","2000") == msg then
  16.  sleep(17)
  17.  t.select(2)
  18.  t.forward1()
  19.  t.placeUp()
  20.  t.turnRight()
  21.  t.turnRight()
  22.  t.forward1()
  23.  t.digUp()
  24.  t.turnLeft()
  25.  t.turnLeft()
  26.  t.forward1()
  27.  t.forward()
  28.  t.select(1)
  29.  t.placeUp()
  30.  t.turnRight()
  31.  t.turnRight()
  32.  t.forward1()
  33.  t.digUp()
  34.  t.turnLeft()
  35.  t.turnLeft()
  36.  t.forward1()
  37.  end
  38.  if not rn.receive("lighter1","2000") then
  39.  sleep(5)
  40.  end
  41. end
  42. while true do
  43. chunkload()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment