legg0028

strip

Mar 16th, 2021 (edited)
1,218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.55 KB | None | 0 0
  1. function store()
  2.     if turtle.getItemDetail(16)["name"] == "enderstorage:ender_chest" and turtle.getItemCount(15) > 0 then
  3.         turtle.select(16)
  4.         repeat
  5.             sleep(0.1)
  6.         until turtle.digUp() == false
  7.         turtle.placeUp()
  8.         for x = 1,15 do
  9.             turtle.select(x)
  10.             if turtle.getItemCount(x) > 0 then
  11.                 if turtle.getItemDetail(x)["name"] == "minecraft:cobblestone" then
  12.                   turtle.select(x)
  13.                   turtle.dropDown()
  14.                   sleep(0.1)
  15.                 else
  16.                   turtle.select(x)
  17.                   turtle.dropUp()
  18.                   sleep(0.1)
  19.                 end
  20.             end
  21.         end
  22.         turtle.select(16)
  23.         turtle.digUp()
  24.     end
  25. end
  26.  
  27. function goForward()
  28.   store()
  29.   while (not turtle.forward()) do
  30.         local success, data = turtle.inspect()
  31.         if success and data["name"] == "forbidden_arcanus:stella_arcanum" then
  32.             os.reboot()
  33.         else
  34.             turtle.dig()
  35.             turtle.attack()
  36.             sleep(0.1)
  37.         end
  38.   end
  39. end
  40.  
  41. function dig()
  42.     local success, data = turtle.inspectUp()
  43.     if success and data["name"] == "forbidden_arcanus:stella_arcanum" then
  44.    
  45.     else
  46.         repeat
  47.             sleep(0.1)
  48.         until not turtle.digUp()
  49.     end
  50.     local success, data = turtle.inspectDown()
  51.     if success and data["name"] == "forbidden_arcanus:stella_arcanum" then
  52.    
  53.     else
  54.         turtle.digDown()
  55.     end
  56.     goForward()
  57. end
  58.  
  59. function branch()
  60.         for x = 1,101 do
  61.             dig()
  62.         end
  63.         turtle.turnLeft()
  64.         for x = 1,3 do
  65.             dig()
  66.         end
  67.         turtle.turnLeft()
  68.         for x = 1,203 do
  69.             dig()
  70.         end
  71.         turtle.turnRight()
  72.         for x = 1,3 do
  73.             dig()
  74.         end
  75.         turtle.turnRight()
  76.         for x = 1,101 do
  77.             dig()
  78.         end
  79. end
  80.  
  81. for y=1,10 do
  82.     branch()
  83. end
Add Comment
Please, Sign In to add comment