G2A Many GEOs
SHARE
TWEET

chunkDig7

kssr3951 Mar 12th, 2016 (edited) 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dofile("turtleMoveApi")
  2. local CHEST_SLOT  = 1
  3. local COBBLE_SLOT = 2
  4. function test()
  5.   if turtle.getFuelLevel() <= 1000 then
  6.     refuelPrompt()
  7.   end
  8.   local count = 0
  9.   while true do
  10.     turtle.digDown()
  11.     if true == turtle.down() then
  12.       count = count + 1
  13.       if 2 == count then
  14.         turtle.select(COBBLE_SLOT)
  15.         turtle.placeUp()
  16.       end
  17.     else
  18.       break
  19.     end
  20.   end
  21.   for i = 1, count do
  22.     turtle.digUp()
  23.     turtle.up()
  24.   end
  25.   turtle.select(COBBLE_SLOT)
  26.   turtle.placeDown()
  27.   print("count = " .. tostring(count))
  28. end
  29. function dropUpAll()
  30.   for i = 3, 16 do
  31.     turtle.select(i)
  32.     turtle.dropUp()
  33.   end
  34. end
  35. function seekAndDropUpAll()
  36.   local cnt = 0
  37.   turtle.select(CHEST_SLOT)
  38.   while true do
  39.     b()
  40.     cnt = cnt + 1
  41.     if true == turtle.compareUp() then
  42.       dropUpAll()
  43.       break
  44.     end
  45.   end
  46.   for i = 1, cnt do
  47.     f()
  48.   end
  49. end
  50. function selectChestSlot()
  51.   turtle.select(CHEST_SLOT)
  52. end
  53. registFunction("test", test)
  54. registFunction("dropUpAll", dropUpAll)
  55. registFunction("selectChestSlot", selectChestSlot)
  56. registFunction("seekAndDropUpAll", seekAndDropUpAll)
  57. registScript(
  58.   rep(16,
  59.     test,selectChestSlot,p0,dropUpAll,e1,f,
  60.     test,selectChestSlot,p0,dropUpAll,e1,f,
  61.     rep(13,test,seekAndDropUpAll,e1,f),
  62.     test,
  63.     breakLast,
  64.     swOddEven({r,e1,f,r},{l,e1,f,l})
  65.   )
  66. )
  67. loadData()
  68. executeScript()
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top