MatthewGB

AutoMine

Jul 21st, 2020
1,675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. slot_energy = 16
  2. slot_rf = 15
  3. slot_bridge = 14
  4. slot_mj = 13
  5. slot_miner = 12
  6. slot_fuel = 11
  7. slot_chests = 10
  8. turtle.select(slot_fuel)
  9. turtle.refuel()
  10.  
  11. function oneRight()
  12.     turtle.turnRight()
  13.     turtle.select(1)
  14.     turtle.dig()
  15.     turtle.forward()
  16.     turtle.turnLeft()
  17. end
  18.  
  19. function oneLeft()
  20.     turtle.turnLeft()
  21.     turtle.forward()
  22.     turtle.turnRight()
  23. end
  24.  
  25. function selectPlace(slot)
  26.     turtle.select(1)
  27.     turtle.dig()
  28.     turtle.select(slot)
  29.     turtle.place()
  30. end
  31.  
  32. function selectDig(slot)
  33.     turtle.select(slot)
  34.     turtle.dig()
  35. end
  36.  
  37. while true do
  38.     selectPlace(slot_miner)
  39.     turtle.up()
  40.     selectPlace(slot_chests)
  41.     turtle.down()
  42.     oneRight()
  43.     selectPlace(slot_mj)
  44.     oneRight()
  45.     selectPlace(slot_bridge)
  46.     oneRight()
  47.     selectPlace(slot_rf)
  48.     oneRight()
  49.     selectPlace(slot_energy)
  50.     i = 0
  51.     while i < 10 do
  52.         print(i)
  53.         sleep(5)
  54.         i = i + 5
  55.     end
  56.     selectDig(slot_energy)
  57.     oneLeft()
  58.     selectDig(slot_rf)
  59.     oneLeft()
  60.     selectDig(slot_bridge)
  61.     oneLeft()
  62.     selectDig(slot_mj)
  63.     oneLeft()
  64.     selectDig(slot_miner)
  65.    
  66.     turtle.forward()
  67.     turtle.forward()
  68. end
Advertisement
Add Comment
Please, Sign In to add comment