Advertisement
eonsv

dig_startup

Dec 25th, 2012
1,967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. local filename, fileList;
  2. local X, Y, d, x, y, z, s, r, auto, avoid, autofuel, top, plug;
  3.  
  4. --Finds the filename of the dig program.
  5. fileList = fs.list("");
  6. for _, file in ipairs(fileList) do
  7.     if(file ~= 'rom' and file ~= 'startup' and file ~= 'ProtLib' and file ~= 'save') then
  8.         filename = file;
  9.         break;
  10.     end;
  11. end;
  12.  
  13. file = io.open('save', 'r');
  14. X = file:read('*l');
  15. Y = file:read('*l');
  16. d = file:read('*l');
  17. x = file:read('*l');
  18. y = file:read('*l');
  19. z = file:read('*l');
  20. s = file:read('*l');
  21. r = file:read('*l');
  22. auto = file:read('*l');
  23. avoid = file:read('*l');
  24. autofuel = file:read('*l');
  25. top = file:read('*l');
  26. plug = file:read('*l');
  27. shell.run(filename, X, Y, d, x, y, z, s, r, auto, avoid, autofuel, top, plug);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement