Zaflis

turtlestartup

Jan 19th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. name = os.getComputerLabel()
  2. if name == "" then
  3.   print("This turtle is unnamed. Use:")
  4.   print("label set newname")
  5.   print("Breaking unnamed turtle will discard its memory!")
  6. else
  7.   print(os.getComputerLabel().." greets you!")
  8. end
  9.  
  10. if fs.exists("_status") and fs.exists("_area") then
  11.   f = fs.open("_status", "rb")
  12.   m = f.read()
  13.   f.close()
  14.   print("Mode "..m)
  15.   if m == 1 then
  16.     shell.run("quarry")
  17.   elseif m == 2 then
  18.     shell.run("orequarry")
  19.   elseif m == 3 then
  20.     shell.run("cut")
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment