Cwackers

stairs.lua

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