SHARE
TWEET

turtlecntrl

xivs Dec 9th, 2019 (edited) 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("left")
  2. rednet.host("xivs","ban")
  3.  
  4. function dropAll(f)
  5.     for i = 1,16 do
  6.         turtle.select(i)
  7.         if f == 1 then turtle.drop() end
  8.         if f == 2 then turtle.dropUp() end
  9.         if f == 3 then turtle.dropDown() end
  10.         end
  11.         turtle.select(1)
  12.         end
  13.  
  14. function stealAll(f)
  15.     for i = 1,16 do
  16.         turtle.select(i)
  17.         if f == 1 then turtle.suck() end
  18.         if f == 2 then turtle.suckUp() end
  19.         if f == 3 then turtle.suckDown() end
  20.         end
  21.         turtle.select(1)
  22.         end
  23. while true do
  24.     id,msg = rednet.receive("xivs")
  25.     if msg == "f" then turtle.forward() end
  26.     if msg == "b" then turtle.back() end
  27.     if msg == "u" then turtle.up() end
  28.     if msg == "d" then turtle.down() end
  29.     if msg == "tl" then turtle.turnLeft() end
  30.     if msg == "tr" then turtle.turnRight() end
  31.     if msg == "drop" then dropAll(1) end  
  32.     if msg == "dropd" then dropAll(3) end
  33.     if msg == "dropu" then dropAll(2) end
  34.     if msg == "steal" then stealAll(1)  end
  35.     if msg == "steald" then stealAll(3)  end
  36.     if msg == "stealu" then stealAll(2) end
  37.     if msg == "dig" then turtle.dig()  end
  38.     if msg == "digd" then turtle.digDown()  end
  39.     if msg == "digu" then turtle.digUp()  end
  40.     if msg == "exit" then break  end
  41.     end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top