theTANCO

Strip Mine v1.1

Dec 11th, 2019 (edited)
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. -- If your computer does not have my API, this program will automatically download it.
  2. if not fs.exists("raiu") then
  3.     shell.run("pastebin","get","pgHT115i","raiu")
  4. end
  5. os.loadAPI("raiu")
  6.  
  7. local args = {...}
  8. -- This program digs out the maximum distance needed to place a torch to prevent mob spawning.
  9. -- The first argument needs to be based on how many torches you want placed.
  10. -- If t == torches and d == distance of your mine then d = t * 13.
  11. if #args < 1 then
  12.     error("First argument must be the number of torches.")
  13. end
  14.  
  15. -- The second argument is optional.
  16. -- Pass "true" or "false" to the second argument to run the Vein Miner program.
  17. -- Leaving this blank will default to "false".
  18. -- Other data types will throw an error.
  19. if args[2] == nil then
  20.     args[2] = false
  21. elseif type(textutils.unserialize(args[2])) == "boolean" then
  22.     args[2] = textutils.unserialize(args[2])
  23. else
  24.     error("Second argument must be nil or boolean.")
  25. end
  26.  
  27. for a = 1, args[1] do
  28.     raiu.hallway(-1,13, args[2])
  29.     turtle.select(1)
  30.     turtle.placeDown()
  31. end
  32.  
  33. -- 8/31/2021 - v1.1
  34. -- Added optional argument to use my vein miner program which will be automatically downloaded by the API.
Add Comment
Please, Sign In to add comment