Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for l=1,10 do
- if fs.exists("sugurapi/gt") == false then do
- print("downloading goto api")
- shell.run("mkdir","sugurapi")
- shell.run("cd","sugurapi")
- shell.run("pastebin","get","a3GBewNp","gt")
- shell.run("cd","..")
- if fs.exists("sugurapi/gt") == true then
- print("download complete")
- elseif fs.exists("sugurapi/gt") == false then
- print("download failed")
- end
- end
- else do
- os.loadAPI("sugurapi/gt")
- while true do
- --wait time
- wait_time = 0.83
- --chest location
- chtgetloc = {300, 67, 333, "s"}
- --chest2 location
- chtputloc = {302, 66, 330, "e"}
- if turtle.getItemCount(2) ~= 0
- then do
- turtle.select(2)
- turtle.turnLeft()
- gt.goto(chtputloc)
- while turtle.getItemCount(2) ~= 0 do
- turtle.drop()
- turtle.turnRight()
- end
- end
- else do
- if turtle.getItemCount(1) ~= 0
- then do
- --turtle.turnLeft()
- --gt.goto(chtgetloc)
- turtle.select(2)
- turtle.craft()
- end
- else do
- turtle.select(1)
- if turtle.getItemCount(1) == 0
- then do
- gt.goto(chtgetloc)
- while turtle.getItemCount(1) == 0 do
- turtle.suck()
- if turtle.getItemCount(1) == 0 then
- sleep(wait_time)
- end
- end
- turtle.turnLeft()
- end
- if turtle.getItemCount(1) == 0
- then do
- print("nothing")
- --sleep(10)
- end
- print("grab")
- end
- else do
- end
- gt.goto(chtgetloc)
- os.reboot()
- end
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement