Guest User

stairs.lua

a guest
Jul 22nd, 2021
5,864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.58 KB | None | 0 0
  1. -- Digs a staircase around a quarry
  2. -- Run "stairs help"
  3. -- Or dig a staircase to bedrock
  4. -- Run "stairs"
  5. -- Please email me if you have any
  6. -- bugs or suggestions!
  7.  
  8. -----------------------------------
  9. --  /¯\  || ||  /\  |¯\ |¯\ \\// --
  10. -- | O | ||_|| |  | | / | /  \/  --
  11. --  \_\\  \__| |||| | \ | \  ||  --
  12. -----------------------------------
  13. -- /¯¯\ [¯¯]  /\  [¯¯] |¯\ /¯¯\  --
  14. -- \_¯\  ||  |  |  ][  | / \_¯\  --
  15. -- \__/  ||  |||| [__] | \ \__/  --
  16. -----------------------------------
  17.  
  18. -- Names of tools
  19. local name_torch = {
  20.    "torch", "lantern", "lamp", "light" }
  21. local name_bench = {
  22.    "minecraft:crafting_table",
  23.    "forge:workbench" }
  24. local name_chest = { "chest" }
  25. local name_box = {
  26.    "shulker_box", "travelersbackpack" }
  27.  
  28. -- Stair blocks crafting material
  29. local name_cobble = {
  30.   "minecraft:cobblestone",
  31.   "forge:cobblestone" }
  32.  
  33.  
  34. -- Side that swaps with crafting bench
  35. local tool_side = "none"
  36. if not peripheral.find("workbench") then
  37.  tool_side = "left"
  38.  if peripheral.getType("left") == "modem" then
  39.   tool_side = "right"
  40.  end --if
  41. end --if
  42.  
  43.  
  44. -- Load APIs
  45. os.loadAPI("flex.lua")
  46. os.loadAPI("dig.lua")
  47. dig.setFuelSlot(1)
  48. dig.setBlockSlot(2)
  49. dig.setBlockStacks(4)
  50.  
  51.  
  52. function dump()
  53.  local slot = turtle.getSelectedSlot()
  54.  local keepers = { name_cobble, name_box,
  55.     name_torch, name_bench, name_chest,
  56.     "stairs" }
  57.  local x,a = 0,false
  58.  
  59.  for x=1,16 do
  60.   if flex.isItem(name_box,x) then
  61.    turtle.select(x)
  62.    a = turtle.placeUp()
  63.    break
  64.   end --if
  65.  end --for
  66.  
  67.  if not a then
  68.   keepers[#keepers+1] = "diamond"
  69.   keepers[#keepers+1] = "ancient_debris"
  70.  end --if
  71.  
  72.  local blocksPresent = dig.getBlockStacks()
  73.  for x=4,16 do
  74.   if not flex.isItem(keepers,x) then
  75.    if dig.isDumpItem(x) then
  76.     if blocksPresent <= 0 then
  77.      turtle.drop()
  78.     else
  79.      blocksPresent = blocksPresent - 1
  80.     end --if/else
  81.    else
  82.     turtle.select(x)
  83.     if a then
  84.      turtle.dropUp()
  85.     else
  86.      turtle.drop()
  87.     end --if/else
  88.    end --if/else
  89.   end --if
  90.  end --for
  91.  
  92.  turtle.select(slot)
  93.  if a then turtle.digUp() end
  94.  dig.checkBlocks()
  95.  flex.condense()
  96. end --function
  97.  
  98.  
  99.  
  100. -- Program parameter(s)
  101. local args={...}
  102.  
  103. -- Tutorial, kind of
  104. if #args > 0 and args[1] == "help" then
  105.  flex.printColors("Place just to the "..
  106.    "left of a turtle quarrying the same "..
  107.    "dimensions.",colors.lightBlue)
  108.  flex.printColors("Include a crafting "..
  109.    "table and a chest in turtle's "..
  110.    "inventory to auto-craft a staircase",
  111.    colors.yellow)
  112.  flex.printColors("Usage: stairs "..
  113.    "[length] [width] [depth]",colors.pink)
  114.  return
  115. end --if
  116.  
  117.  
  118. -- What Goes Where
  119. flex.printColors("Slot 1: Fuel\n"..
  120.   "Slot 2: Blocks\nSlot 3: Torches\n"..
  121.   "Anywhere: Crafting Bench, Chest\n"..
  122.   "Optional: Shulker Box / Backpack",
  123.   colors.lightBlue)
  124. flex.printColors("Press Enter",
  125.   colors.pink)
  126. while flex.getKey() ~= keys.enter do
  127.  sleep(0.1)
  128. end --while
  129.  
  130.  
  131. -- Convert Inputs
  132. local dx,dy,dz,n,x,y,z
  133. local height = 5
  134. dz = tonumber(args[1]) or 256
  135. dx = tonumber(args[2]) or dz
  136. dy = tonumber(args[3]) or 256
  137. -- -1 to match Quarry depth
  138.  
  139.  
  140. --------------------------------------
  141. -- |¯\ [¯¯] /¯¯] /¯¯][¯¯]|\ || /¯¯] --
  142. -- |  | ][ | [¯|| [¯| ][ | \ || [¯| --
  143. -- |_/ [__] \__| \__|[__]|| \| \__| --
  144. --------------------------------------
  145.  
  146. flex.send("Digging staircase...",
  147.   colors.yellow)
  148.  
  149. -- Staircase Digging Functions
  150.  
  151. local torchNum = 9
  152.  
  153. function placeTorch()
  154.  turtle.select(3)
  155.  if flex.isItem(name_torch) then
  156.  
  157.   if not turtle.place() then
  158.    if not dig.fwd() then return false end
  159.    turtle.select(2)
  160.    dig.place()
  161.    if not dig.back() then return false end
  162.    
  163.    turtle.select(3)
  164.    if not dig.place() then
  165.     if not dig.fwd() then return false end
  166.     turtle.select(2)
  167.     dig.placeUp()
  168.     if not dig.back() then return false end
  169.     turtle.select(3)
  170.     dig.place()
  171.    end --if/else
  172.   end --if
  173.  end --if
  174.  
  175.  turtle.select(2)
  176. end --function
  177.  
  178.  
  179. function stepDown()
  180.  local x
  181.  
  182.  turtle.select(2)
  183.  dig.right()
  184.  for x=1,height-2 do
  185.   dig.blockLava()
  186.   if not dig.up() then return false end
  187.  end --for
  188.  dig.blockLava()
  189.  dig.blockLavaUp()
  190.  
  191.  dig.left()
  192.  dig.blockLava()
  193.  dig.left()
  194.  if not dig.fwd() then return false end
  195.  dig.blockLavaUp()
  196.  dig.blockLava()
  197.  dig.right()
  198.  dig.blockLava()
  199.  dig.left()
  200.  
  201.  if torchNum >= 3 then
  202.   if not dig.back() then return false end
  203.   placeTorch()
  204.   if not dig.down() then return false end
  205.   if not dig.fwd() then return false end
  206.   torchNum = 0
  207.  else
  208.   dig.blockLava()
  209.   if not dig.down() then return false end
  210.   torchNum = torchNum + 1
  211.  end --if/else
  212.  
  213.  for x=1,height-2 do
  214.   dig.blockLava()
  215.   if not dig.down() then return false end
  216.  end --for
  217.  dig.blockLava()
  218.  if not dig.placeDown() then return false end
  219.  
  220.  dig.right(2)
  221.  if not dig.fwd() then return false end
  222.  dig.blockLava()
  223.  if not dig.placeDown() then return false end
  224.  dig.left()
  225.  
  226.  if turtle.getItemCount(16) > 0 then
  227.   dig.left()
  228.   dump()
  229.   dig.right()
  230.  end --if/else
  231.  
  232.  if not dig.fwd() then return false end
  233.  
  234.  return true
  235. end --function
  236.  
  237.  
  238. local function turnRight()
  239.  turtle.select(2)
  240.  dig.right()
  241.  if not dig.up(height-2) then return false end
  242.  dig.blockLavaUp()
  243.  
  244.  dig.left()
  245.  if not dig.down() then return false end
  246.  if not dig.fwd() then return false end
  247.  dig.blockLavaUp()
  248.  for x=1,height-3 do
  249.   dig.blockLava()
  250.   if not dig.down() then return false end
  251.  end --for
  252.  dig.blockLava()
  253.  if not dig.placeDown() then return false end
  254.  
  255.  dig.left()
  256.  if not dig.fwd() then return false end
  257.  for x=1,height-3 do
  258.   dig.blockLava()
  259.   if not dig.up() then return false end
  260.  end --for
  261.  dig.blockLava()
  262.  dig.blockLavaUp()
  263.  
  264.  dig.right()
  265.  for x=1,height-3 do
  266.   dig.blockLava()
  267.   if not dig.down() then return false end
  268.  end --for
  269.  dig.blockLava()
  270.  if not dig.placeDown() then return false end
  271.  
  272.  dig.left(2)
  273.  if not dig.fwd() then return false end
  274.  dig.right()
  275.  if not dig.placeDown() then return false end
  276.  for x=1,height-2 do
  277.   dig.blockLava()
  278.   if not dig.up() then return false end
  279.  end --for
  280.  dig.blockLava()
  281.  dig.blockLavaUp()
  282.  
  283.  dig.right(2)
  284.  if not dig.fwd() then return false end
  285.  if not dig.down(height-1) then return false end
  286.  if not dig.placeDown() then return false end
  287.  dig.left()
  288.  if not dig.fwd() then return false end
  289.  dig.blockLava()
  290.  if not dig.placeDown() then return false end
  291.  if not dig.back() then return false end
  292.  dig.right()
  293.  if not dig.fwd() then return false end
  294.  
  295.  torchNum = torchNum + 1
  296.  return true
  297. end --function
  298.  
  299.  
  300. function endcap(h,stop)
  301.  stop = ( stop ~= nil )
  302.  h = h or 0 -- Height to dig layer
  303.  local x
  304.  
  305.  dig.right()
  306.  if not dig.placeDown() then return false end
  307.  dig.checkBlocks()
  308.  for x=1,height-2-h do
  309.   dig.blockLava()
  310.   if not dig.up() then return false end
  311.  end --for
  312.  dig.blockLava()
  313.  dig.blockLavaUp()
  314.  
  315.  dig.left(2)
  316.  if not dig.fwd() then return false end
  317.  dig.blockLavaUp()
  318.  for x=1,height-2-h do
  319.   dig.blockLava()
  320.   if not dig.down() then return false end
  321.  end --for
  322.  dig.blockLava()
  323.  if not dig.placeDown() then return false end
  324.  dig.checkBlocks()
  325.  if not dig.back() then return false end
  326.  
  327.  dig.right()
  328.  
  329.  if stop then
  330.   dig.blockLava()
  331.   for x=1,height-2-h do
  332.    if not dig.up() then return false end
  333.    dig.blockLava()
  334.   end --for
  335.   dig.blockLavaUp()
  336.   dig.left()
  337.  
  338.   if not dig.fwd() then return false end
  339.   dig.blockLavaUp()
  340.   dig.right()
  341.   dig.blockLava()
  342.   for x=1,height-2-h do
  343.    if not dig.down() then return false end
  344.    dig.blockLava()
  345.   end --for
  346.  
  347.   dig.left()
  348.   if not dig.back() then return false end
  349.   dig.right()
  350.  
  351.  end --if
  352.  
  353.  return true
  354. end --function
  355.  
  356.  
  357.  
  358. local direction
  359.  
  360. function avoidBedrock()
  361.  if dig.isStuck() then
  362.   -- Hit Bedrock/Void
  363.   if dig.getStuckDir() == "fwd" then
  364.    dig.up()
  365.    dig.placeDown()
  366.    dig.checkBlocks()
  367.    dig.setymin(dig.gety())
  368.    dig.fwd()
  369.   elseif dig.getStuckDir() == "down" then
  370.    dig.setymin(dig.gety())
  371.   end --if
  372.  end --if
  373.  
  374.  -- Get X and Z on the inner stair block
  375.  if dig.getx() >= dx+2 then
  376.   dig.gotox(dx+1)
  377.  
  378.  elseif dig.getx() <= -1 then
  379.   dig.gotox(0)
  380.  
  381.  end --if/else
  382.  
  383.  if dig.getz() >= dz+1 then
  384.   dig.gotoz(dz)
  385.  
  386.  elseif dig.getz() <= -2 then
  387.   dig.gotoz(-1)
  388.  
  389.  end --if/else
  390.  
  391.  dig.gotor(direction)
  392.  dig.gotoy(dig.getymin())
  393. end --function
  394.  
  395.  
  396.  
  397. -- Start Digging
  398.  
  399. turtle.select(2)
  400.  
  401. x = 0
  402. direction = dig.getr()
  403. while true do
  404.  
  405.  for n=0,dz-1 do
  406.   if not stepDown() then break end
  407.   x = x + 1
  408.   if x >= dy then break end
  409.  end
  410.  if dig.isStuck() or x >= dy then break end
  411.  if not turnRight() then break end
  412.  x = x + 1
  413.  
  414.  direction = dig.getr()
  415.  for n=0,dx-1 do
  416.   if not stepDown() then break end
  417.   x = x + 1
  418.   if x >= dy then break end
  419.  end
  420.  if dig.isStuck() or x >= dy then break end
  421.  if not turnRight() then break end
  422.  x = x + 1
  423.  
  424.  direction = dig.getr()
  425. end
  426.  
  427. avoidBedrock()
  428. if not dig.fwd() then avoidBedrock() end
  429. if not endcap(1) then avoidBedrock() end
  430. if not dig.fwd() then avoidBedrock() end
  431. if not endcap(1,true) then avoidBedrock() end
  432.  
  433. dig.left(2)
  434. while not turtle.detect() do
  435.  dig.fwd()
  436. end --while
  437. dig.back()
  438.  
  439. -- This bit compensates for random Bedrock (mostly)
  440. if #dig.getKnownBedrock() > 0 then
  441.  for x=1,4 do
  442.   dig.placeDown()
  443.   dig.right()
  444.   dig.fwd()
  445.  end --for
  446. end --for
  447.  
  448.  
  449.  
  450. ----------------------------------------------
  451. --  /¯] |¯\  /\  |¯¯] [¯¯] [¯¯] |\ ||  /¯¯] --
  452. -- | [  | / |  | | ]   ||   ][  | \ | | [¯| --
  453. --  \_] | \ |||| ||    ||  [__] || \|  \__| --
  454. ----------------------------------------------
  455.  
  456. -- Return locations of bench/chest
  457. local function checkTools()
  458.  local bench,chest = 0,0
  459.  local x
  460.  for x=1,16 do
  461.   turtle.select(x)
  462.   if flex.isItem(name_bench) then
  463.    bench = x
  464.   elseif flex.isItem(name_chest) then
  465.    chest = x
  466.   end --if/else
  467.  end --for
  468.  return bench,chest
  469. end --function
  470.  
  471.  
  472. local oldTool
  473. local success = true
  474.  
  475. local function equip()
  476.  if tool_side == "right" then
  477.   return turtle.equipRight()
  478.  elseif tool_side == "left" then
  479.   return turtle.equipLeft()
  480.  end --if/else
  481. end --function
  482.  
  483.  
  484. -- Equip Crafting Bench
  485. local function setTool()
  486.  if tool_side == "none" then return end
  487.  
  488.  flex.condense()
  489.  local x,y = checkTools()
  490.  
  491.  if x == 0 then
  492.   flex.send("Crafting Bench not found",
  493.     colors.red)
  494.   success = false
  495.   return false
  496.  end --if
  497.  
  498.  turtle.select(x)
  499.  y = turtle.getItemCount()
  500.  if y > 1 then
  501.   turtle.transferTo(math.min(
  502.     x+1,16),y-1)
  503.  end --if
  504.  
  505.  if not equip() then
  506.   return false
  507.  end --if
  508.  
  509.  if turtle.getItemCount() > 0 then
  510.   oldTool = turtle.getItemDetail()["name"]
  511.  end --if
  512.  
  513.  flex.send("Crafting Bench equipped",
  514.    colors.yellow)
  515.  return true
  516. end --function setTool()
  517.  
  518.  
  519. -- Unequip Crafting Bench
  520. local function restoreTool()
  521.  if tool_side == "none" then return end
  522.  
  523.  flex.condense()
  524.  local slot = turtle.getSelectedSlot()
  525.  local x,y
  526.  for x=1,16 do
  527.   turtle.select(x)
  528.   y = turtle.getItemCount()
  529.  
  530.   if oldTool == nil then
  531.    -- If no tool, put Bench in empty slot
  532.    if y == 0 then
  533.     return equip()
  534.    end --if
  535.    
  536.   else
  537.    if y > 0 then
  538.     if turtle.getItemDetail()["name"]
  539.        == oldTool then
  540.      if equip() then
  541.          flex.send("Tool restored",
  542.            colors.lightBlue)
  543.          turtle.select(slot)
  544.       return true
  545.      end --if
  546.     end --if
  547.    end --if
  548.   end --if
  549.  end --for
  550.  
  551.  flex.send("Unable to restore tool",
  552.    colors.red)
  553.  success = false
  554.  return false
  555. end --function restoreTool()
  556.  
  557.  
  558. local depth = -dig.gety()
  559. local bench, chest = checkTools()
  560. local stairsNeeded = depth*2
  561. local craftNum
  562.  
  563. -- Count existing stair blocks
  564. local numStairs = 0
  565. for x=1,16 do
  566.  turtle.select(x)
  567.  y = turtle.getItemCount()
  568.  if y > 0 then
  569.   if flex.isItem("stairs") then
  570.    numStairs = numStairs + y
  571.   end --if
  572.  end --if
  573. end --for
  574.  
  575. -- Count Cobblestone
  576. local numCobble = 0
  577. for x=1,16 do
  578.  turtle.select(x)
  579.  if flex.isItem(name_cobble) then
  580.   numCobble = numCobble + turtle.getItemCount()
  581.  end --if
  582. end --for
  583. turtle.select(1)
  584.  
  585. craftNum = math.ceil((stairsNeeded-numStairs)/4)
  586.  
  587.  
  588. -- Check against cobble needed
  589. if numCobble < craftNum*6
  590.    or stairsNeeded > 64*4 then
  591.  
  592.  x = math.floor(numCobble/6)
  593.  x = math.min(x,64)
  594.  y = math.ceil(stairsNeeded/4)
  595.  z = math.floor(100*x/y)
  596.  
  597.  flex.send("#1Only enough cobblestone "
  598.    .."to craft #4"..tostring(z)
  599.    .."#0%#1 of stairs")
  600.  success = false
  601.  
  602.  craftNum = x
  603. end --if
  604.  
  605. if craftNum < 0 then
  606.  craftNum = 0
  607. end --if
  608.  
  609.  
  610.  
  611. -- If Crafting needs to (and can) happen
  612. if craftNum > 0 and chest > 0 and
  613.    ( bench > 0 or tool_side == "none" ) then
  614.  
  615.  local stairSlots = {1,5,6,9,10,11}
  616.  local freeSlots = {2,3,4,7,8,12,13,14,15,16}
  617.  
  618.  -- Equip Crafing Banch and place Chest
  619.  setTool()
  620.  turtle.select(chest)
  621.  turtle.place()
  622.  
  623.  -- Everything except Cobble into Chest
  624.  for x=1,16 do
  625.   turtle.select(x)
  626.   if turtle.getItemCount() > 0 then
  627.    if not flex.isItem(name_cobble)
  628.       or flex.isItem("stairs") then
  629.     turtle.drop()
  630.    end --if
  631.   end --if
  632.  end --for
  633.  flex.condense()
  634.  
  635.  -- Collect Cobble to Craft
  636.  for x=1,11 do
  637.   turtle.select(x)
  638.   if x <= 5 then
  639.    turtle.transferTo(x+11)
  640.   elseif x == 6 then
  641.    turtle.transferTo(4)
  642.   elseif x == 7 then
  643.    turtle.transferTo(8)
  644.   else
  645.    turtle.drop()
  646.   end --if/else
  647.   if turtle.getItemCount() > 0 then
  648.    turtle.drop()
  649.   end --if
  650.  end --for
  651.  
  652.  -- Arrange Cobble into Recipe
  653.  z = 16
  654.  for x=1,#stairSlots do
  655.   turtle.select(z)
  656.   while turtle.getItemCount() < craftNum do
  657.    if z > 12 then
  658.     z = z-1
  659.    else
  660.     z = z-4
  661.    end --if
  662.    if z < 1 then break end
  663.    turtle.select(z)
  664.   end --while
  665.   if z < 1 then break end
  666.   turtle.select(z)
  667.   turtle.transferTo(stairSlots[x],
  668.     craftNum)
  669.  end --for
  670.  
  671.  -- Drop excess cobble into chest
  672.  for x=1,#freeSlots do
  673.   turtle.select(freeSlots[x])
  674.   turtle.drop()
  675.  end --for
  676.  
  677.  -- Main Event! Craft Function! =D
  678.  local cb = peripheral.wrap("left") or
  679.             peripheral.wrap("right")
  680.  if cb.craft(craftNum) then
  681.   flex.send("Stairs crafted",colors.lightBlue)
  682.  else
  683.   flex.send("Crafting error",colors.red)
  684.   success = false
  685.  end --if
  686.  
  687.  -- Restore inventory in correct order
  688.  for x=1,16 do
  689.   turtle.select(x)
  690.   turtle.drop()
  691.  end --for
  692.  turtle.select(1)
  693.  while turtle.suck() do end
  694.  restoreTool()
  695.  turtle.dig()
  696.  flex.condense()
  697.  
  698. end --if (crafting needed)
  699.  
  700.  
  701.  
  702.  
  703.  
  704. -----------------------------------------------
  705. -- |¯\ || || [¯¯] ||   |¯\  [¯¯] |\ ||  /¯¯] --
  706. -- | < ||_||  ][  ||_  |  |  ][  | \ | | [¯| --
  707. -- |_/  \__| [__] |__] |_/  [__] || \|  \__| --
  708. -----------------------------------------------
  709.  
  710.  
  711. local function placeStairs()
  712.  local x,y,z,slot
  713.  slot = turtle.getSelectedSlot()
  714.  y = turtle.getItemCount()
  715.  z = true
  716.  
  717.  if y < 2 or not flex.isItem("stairs") then
  718.   for x=1,16 do
  719.    turtle.select(x)
  720.    y = turtle.getItemCount()
  721.    if y >= 2 and flex.isItem("stairs") then
  722.     z = false
  723.     break
  724.    end --if
  725.   end --for
  726.  
  727.   if z then
  728.    turtle.select(slot)
  729.    return false
  730.   end --if
  731.  end --if
  732.  
  733.  dig.placeDown()
  734.  dig.right()
  735.  dig.fwd()
  736.  dig.left()
  737.  dig.placeDown()
  738.  dig.left()
  739.  dig.fwd()
  740.  dig.right()
  741. end --function
  742.  
  743.  
  744. flex.send("Returning to surface",
  745.   colors.yellow)
  746.  
  747. function isDone()
  748.  -- Reached Surface
  749.  return dig.gety() >= 0
  750. end
  751.  
  752. -- Follow the Spiral [and place Stairs]
  753. while not isDone() do
  754.  
  755.  if dig.getr()%360 == 0 then
  756.   while dig.getz() < dig.getzmax()-1 do
  757.    dig.fwd()
  758.    dig.up()
  759.    placeStairs()
  760.    if isDone() then break end
  761.   end --while
  762.  
  763.  elseif dig.getr()%360 == 90 then
  764.   while dig.getx() < dig.getxmax()-1 do
  765.    dig.fwd()
  766.    dig.up()
  767.    placeStairs()
  768.    if isDone() then break end
  769.   end --while
  770.  
  771.  elseif dig.getr()%360 == 180 then
  772.   while dig.getz() > dig.getzmin()+1 do
  773.    dig.fwd()
  774.    dig.up()
  775.    placeStairs()
  776.    if dig.gety() > -4 and dig.getz()
  777.       == dig.getzmin()+1 then
  778.     -- Up at the top
  779.     dig.fwd()
  780.     dig.up()
  781.     placeStairs()
  782.    end --if
  783.    if isDone() then break end
  784.   end --while
  785.  
  786.  elseif dig.getr()%360 == 270 then
  787.   while dig.getx() > dig.getxmin()+1 do
  788.    dig.fwd()
  789.    dig.up()
  790.    placeStairs()
  791.    if isDone() then break end
  792.   end --while
  793.  
  794.  end --if/else
  795.  
  796.  if not isDone() then dig.left() end
  797.  
  798. end --while
  799.  
  800.  
  801. -- All Done!
  802. turtle.select(1)
  803. dig.goto(0,0,0,0)
  804.  
  805. if success then
  806.  flex.send("Stairway finished!",
  807.    colors.lightBlue)
  808. else
  809.  flex.send("Reached Origin",
  810.    colors.lightBlue)
  811. end --if
  812.  
  813. flex.modemOff()
  814. os.unloadAPI("dig.lua")
  815. os.unloadAPI("flex.lua")
  816.  
Advertisement
Add Comment
Please, Sign In to add comment