Advertisement
BruceWplays

Sugur V2

Sep 8th, 2022 (edited)
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for l=1,10 do
  2.     if fs.exists("sugurapi/gt") == false then do
  3.         print("downloading goto api")
  4.         shell.run("mkdir","sugurapi")
  5.         shell.run("cd","sugurapi")
  6.         shell.run("pastebin","get","a3GBewNp","gt")
  7.         shell.run("cd","..")
  8.          if fs.exists("sugurapi/gt") == true then
  9.             print("download complete")
  10.         elseif fs.exists("sugurapi/gt") == false then
  11.             print("download failed")
  12.          end
  13.     end
  14.     else do
  15.     os.loadAPI("sugurapi/gt")
  16.     while true do
  17.    
  18.  
  19.  
  20. --wait time
  21.  wait_time = 0.83
  22. --chest location
  23. chtgetloc = {300, 67, 333, "s"}
  24.  
  25.                
  26. --chest2 location                      
  27. chtputloc = {302, 66, 330, "e"}
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.     if turtle.getItemCount(2) ~= 0
  38.     then do
  39.     turtle.select(2)
  40.     turtle.turnLeft()
  41.     gt.goto(chtputloc)
  42.     while turtle.getItemCount(2) ~= 0 do
  43.     turtle.drop()
  44.     turtle.turnRight()
  45.     end
  46.     end
  47.     else do
  48.    
  49.     if turtle.getItemCount(1) ~= 0
  50.     then do
  51.     --turtle.turnLeft()
  52.     --gt.goto(chtgetloc)
  53.     turtle.select(2)
  54.     turtle.craft()
  55.     end
  56.     else do
  57.    
  58.     turtle.select(1)
  59.      
  60.     if turtle.getItemCount(1) == 0
  61.     then do
  62.      
  63.         gt.goto(chtgetloc)
  64.         while turtle.getItemCount(1) == 0 do
  65.             turtle.suck()                                        
  66.             if turtle.getItemCount(1) == 0 then                          
  67.                 sleep(wait_time)
  68.             end
  69.         end
  70.     turtle.turnLeft()
  71.     end
  72.     if turtle.getItemCount(1) == 0
  73.     then do
  74.     print("nothing")
  75.     --sleep(10)
  76.     end
  77.     print("grab")
  78.     end
  79.    
  80.     else do
  81.     end
  82.      
  83.     gt.goto(chtgetloc)
  84.      
  85.     os.reboot()
  86.     end
  87.     end
  88.     end
  89.     end
  90.     end
  91.     end
  92.     end
  93.     end
  94.     end
  95.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement