Advertisement
mortarsynth

mainSM

Jul 18th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. -- Init
  2. print("Enter the excavate diameter")
  3. local size = read()
  4. size = tonumber(size)
  5. if size < 1 then
  6.     print("Excavate diameter must be positive")
  7.     return
  8. end
  9.  
  10. print("Enter the excavate max depth (current yPos minus desired yPos)")
  11. local max_depth = read()
  12. max_depth = tonumber(max_depth)
  13. if max_depth < 1 then
  14.     print("Excavate maximun depth must be positive")
  15.     return
  16. end
  17.  
  18. print("Enter the length of a chunk")
  19. local chunk_len = read()
  20. chunk_len = tonumber(chunk_len)
  21. if chunk_len < 1 then
  22.     print("This number must be positive as well")
  23.     return
  24. end
  25.  
  26. print("Enter the number of chunks to scan")
  27. local num_of_chunks = read()
  28. num_of_chunks = tonumber(num_of_chunks)
  29. if num_of_chunks < 1 then
  30.     print("This number must be positive as well")
  31.     return
  32. end
  33.  
  34. -- Load excavate and tunnel scripts
  35. os.loadAPI("/ByNaruto/excavateSM")
  36. os.loadAPI("/ByNaruto/tunnelSM")
  37.  
  38. -- Run!
  39. for chunk_count = 1, num_of_chunks do
  40.     excavateSM.excavate(size, max_depth)
  41.     tunnelSM.tunnel(chunk_len)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement