kreezxil

preload

Jul 23rd, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. -- put the pastebin.com programs as "hash name" in variable table called
  2. -- pastebin_progs, remember to enclose each in quotes and seperate from one
  3. -- another with commas as I have done below.
  4.  
  5. -- by default I have chosen my dig, do, flip, masscopy, suck and b programs, plus
  6. -- MIZE's f,l,r,d,u and quarry_setup programs
  7. -- Also I have chosen Megabuild's bore program
  8. -- da404lewzer's TACO program editor
  9. -- and AustinKK's quarry program
  10. -- and last but not least TurtleScripts.com very own TurtleMarket program
  11.  
  12. -- this program will preload into your turtle all of the programs listed in
  13. -- both arrays.
  14.  
  15. -- if you use this with a floppy drive attachment, the masscopy program
  16. -- can be used to copy everything in one path to another, ie
  17. -- masscopy / /disk/
  18. -- will load everything from the turtle's top directory to the floppy in
  19. -- the floppy drive.
  20. -- reverse that to load up another turtle.
  21. function explode(div,str)
  22. if(div=='') then return false end
  23. local pos,arr = 0,{}
  24.  
  25. for st,sp in function() return string.find(str,div,pos,true) end do
  26. table.insert(arr,string.sub(str,pos,st-1))
  27. pos=sp+1
  28. end
  29. table.insert(arr,string.sub(str,pos))
  30. return arr
  31. end
  32.  
  33. function preDelete(txt)
  34. return explode(" ",txt)[2]
  35. end
  36.  
  37. pastebin_progs={"h9Ct7VGM apartments","hxeZ5Wui bHouse","unPPhDpQ buildMobFarm","sVnkHJ4n quarry","RAHj4r2K shape_builder","tQutzmaX osXtndr","pa8LvVWe swarm","yQzAq3Ed chat","CEuzpJii back","cMfB876K dig","pGCqPnfW do","AyPGRaKz dump","aTH46EFv fencebuilder","f48cHZ16 flip","nkrrGPCL goto","wXWHAUXA masscopy","g1ET6kDD place","wsVknbkn platform","81J0zk95 stairs","Cdc9zjs6 suck","NJBXZQ6c NearEDGE-Functions","P0yThxen bore","JbFMHaNg verticleMine"}
  38.  
  39. -- we start with the pastebin programs as that where 'market' is and we need
  40. -- that for the turtleMarket programs.
  41.  
  42. for i=1,#pastebin_progs do
  43. shell.run("rm "..preDelete(pastebin_progs[i]))
  44. shell.run("pastebin get "..pastebin_progs[i].." y")
  45. end
  46.  
  47. print("All Done with PRELOAD!")
Add Comment
Please, Sign In to add comment