Guest User

Untitled

a guest
Dec 31st, 2022
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. -- startup.lua v1.0
  2. -- Author: Egobooster
  3.  
  4. enabled = true
  5. if enabled then
  6. function mysplit (inputstr, sep)
  7. if sep == nil then
  8. sep = "%s"
  9. end
  10. local t={}
  11. for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  12. table.insert(t, str)
  13. end
  14. return t
  15. end
  16.  
  17. run_conf = fs.open("run.conf","r")
  18. line = run_conf.readLine()
  19. if run_conf == nil or line == nil or line == "" then
  20. error("nothing to resume;this is not an error don't worry about it")
  21. end
  22.  
  23. run_conf.close()
  24.  
  25. c = mysplit(line,";")
  26.  
  27. facing = c[1]
  28. radius = c[2]
  29. starting_y = c[3]
  30. search_ore = c[4]
  31.  
  32. shell.run("geomine.lua",
  33. facing,
  34. radius,
  35. starting_y,
  36. search_ore,
  37. "--resume")
  38. end
Add Comment
Please, Sign In to add comment