Advertisement
chibudesu

Turtle Update

Feb 19th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local tArgs = { ... }
  2.  
  3. local files = { }
  4.  
  5. files.update = {
  6.   paste = "ENRVjPSR",
  7.   desc = "You're loking at it! Update programs to latest version"
  8. }
  9. files.excavate = {
  10.   paste = "DyCQ1q5G",
  11.   desc = "Modified excavate program with a few extra options"
  12. }
  13. files.quarry = {
  14.   paste = "nsMZBEMy",
  15.   desc = "Automatic Quarry: quarry the whole world!"
  16. }
  17. files.harvest = {
  18.   paste = "vmJmPWWA",
  19.   desc = "Harvest 4 crops around the turtle and place into a chest below. No fuel used!"
  20. }
  21.  
  22.  
  23. if #tArgs == 1 then
  24.   name = tArgs[1]
  25.  
  26.   shell.run("rm "..name)
  27.   shell.run("pastebin get "..files[name].paste.." "..name)
  28.  
  29. elseif #tArgs == 2 then
  30.   print(tArgs[1]..':')
  31.   print("    Pastebin: "..files[tArgs[1]].paste)
  32.   print("    About: "..files[tArgs[1]].desc)
  33.  
  34. else
  35.   print("Chibu's ComputerCraft Programs:")
  36.   for name,info in pairs(files) do
  37.     print("    "..name)
  38.   end
  39.   print("    ")
  40.   print("Usage: update [name] [info]")
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement