bigtwisty

ResumeQuarry

Jul 6th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. args = {...}
  2.  
  3. if #args ~= 2 then
  4. print("Usage: Resume <x> <z>")
  5. exit()
  6. end
  7.  
  8. if not fs.exists("location") then
  9. print("Only functions after started with Begin")
  10. exit()
  11. end
  12.  
  13. h = fs.open("location","r")
  14. size = tonumber(h.readLine())
  15. startX = tonumber(h.readLine())
  16. startZ = tonumber(h.readline())
  17.  
  18. x = tonumber(args[1]) - startX + 1
  19. z = tonumber(args[2]) - startZ + 1
  20.  
  21. write(string.format("Resuming quarry of size %d at %d, %d in: ",size,startX,startY))
  22. for i=1,5 do
  23. write(6-i)
  24. os.sleep(1)
  25. end
  26. shell.run("run",size,x,z)
Advertisement
Add Comment
Please, Sign In to add comment