Advertisement
itachi1706

DW20 PneumaticCraft drone

Sep 26th, 2015
2,777
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.93 KB | None | 0 0
  1. rednet.open("back")
  2. os.loadAPI("button")
  3. local droneControlID = 2
  4. local m = term
  5. local areaShown = false
  6.  
  7. local setx = 0
  8. local sety = 0
  9. local setz = 0
  10. local setx2 = 0
  11. local sety2 = 0
  12. local setz2 = 0
  13. local currx = 0
  14. local curry = 0
  15. local currz = 0
  16.  
  17. local importChest = {}
  18. importChest["x"] = 0
  19. importChest["y"] = 0
  20. importChest["z"] = 0
  21.  
  22. local exportChest = {}
  23. exportChest["x"] = 0
  24. exportChest["y"] = 0
  25. exportChest["z"] = 0
  26.  
  27. local home = {}
  28. home["x"] = 0
  29. home["y"] = 0
  30. home["z"] = 0
  31.  
  32. --local homex = 0
  33. --local homey = 0
  34. --local homez = 0
  35. --local chestx = 0
  36. --local chesty = 0
  37. --local chestz = 0
  38.  
  39. local menuType = "mainMenu"
  40. local areaType = "Filled"
  41. local moveMode = "Normal"
  42.  
  43. local teleportMode = false
  44. local autoApply = true
  45.  
  46.  
  47. function sendMessage(message)
  48.     rednet.send(droneControlID, message)
  49. end
  50.  
  51. function mainMenu()
  52.     m.clear()
  53.     button.clearTable()
  54.     button.setTable("Come Here", comeHere, "", 3, 13, 1, 1)
  55.     button.setTable("Go Home", goHome, "", 15, 25, 1, 1)
  56.     button.setTable("Set Area", setXYZMenu, "", 3, 13, 3, 3)
  57.     button.setTable("GoTo", goTo, "", 15, 25, 3, 3)
  58.     button.setTable("Dig", dig, "", 3, 13, 5, 5)
  59.     button.setTable("Build", place, "", 15, 25, 5, 5)
  60.     button.setTable("ItemPickup", pickup, "", 3, 13, 7, 7)
  61.     button.setTable("Attack", attack, "", 15,25,7,7)
  62.     button.setTable("Ent Pickup", entityPickup, "", 3, 13, 9, 9)
  63.     button.setTable("Ent Drop", entityDrop, "", 15, 25, 9, 9)
  64.     button.setTable("GetItems", getItems, "", 3, 13, 11,11)
  65.     button.setTable("Get Pick", getPickaxe, "", 15, 25, 11, 11)
  66.     button.setTable("ItemsChest", dropItems, "", 3, 13, 13, 13)
  67.     button.setTable("Stop", stopAction, "", 3, 13, 16, 16)
  68.     button.setTable("Teleport", toggleTeleport, "", 15, 25, 16, 16)
  69.     button.setTable("Favorites", setFavoritesMenu, "", 3, 13, 18, 18)
  70. --  button.setTable("Set Home", setHome, "", 15, 25, 18, 18)   
  71.     button.setTable("Show Area", showAreaToggle, "", 15, 25, 20, 20)
  72.     button.setTable("Status", setStatusMenu, "", 3, 13, 20, 20)
  73.    
  74.     if teleportMode then
  75.         button.toggleButton("Teleport")
  76.     end
  77.     button.setButton("Show Area", areaShown)
  78.     button.screen()
  79. end
  80.  
  81. function statusMenu()
  82.     local x,y,z = getPosition()
  83.     m.clear()
  84.     button.clearTable()
  85.     button.setTable("Back", setMainMenu, "", 1, 6, 1, 1)
  86.     button.setTable("Refresh", displayScreen, "", 2, 25, 20,20)
  87.     button.label(1,3,"Pressure: "..getPressure())
  88.     button.label(1,4,"Position: "..math.floor(x)..","..math.floor(y)..","..math.floor(z))
  89.     button.label(1,5,"Action:   "..tostring(not isDone()))
  90.     button.label(1,6,"Last Act: "..getAction())
  91.     button.label(1,7,"Home:     "..home["x"]..", "..home["y"]..", "..home["z"])
  92.     button.label(1,8,"Imp Chest "..importChest["x"]..", "..importChest["y"]..", "..importChest["z"])
  93.     button.label(1,9,"Exp Chest "..exportChest["x"]..", "..exportChest["y"]..", "..exportChest["z"])
  94.     button.label(1,10,"LSet: "..(currx+setx)..", "..(curry+sety)..", "..(currz+setz))
  95.     button.label(1,11,"LSet2: "..(currx+setx2)..", "..(curry+sety2)..", "..(currz+setz2))
  96. --  button.setTable("ShowHome", showHome, "", 3,13,18,18)
  97. --  button.setTable("ShowImportChest", showImportChest, "", 15, 25, 18,18)
  98. --  button.label(1,6,"Pickaxe:  "..tostring(hasPickaxe()))
  99.     button.screen()
  100. end
  101.  
  102. function favoritesMenu()
  103.     m.clear()
  104.     button.clearTable()
  105.     button.setTable("Back", setMainMenu, "", 1, 6, 1, 1)
  106.     button.label(1,2, "Show Favorites")
  107.     button.setTable("Home.", showHome, "", 3,13,3,3)
  108.     button.label(1,4, "Chests")
  109.     button.setTable("Import.", showImportChest, "", 3, 13, 5,5)
  110.     button.setTable("Export.", showExportChest, "", 15, 25, 5,5)
  111.     button.label(1,15,"Set Favorites")
  112.     button.setTable("Home", setHome, "", 3, 13, 16, 16)
  113.     button.label(3,17,"Chests")
  114.     button.setTable("Import", setImportChest, "", 3, 13, 18, 18)
  115.     button.setTable("Export", setExportChest, "", 15, 25, 18, 18)
  116.    
  117.     button.screen()
  118. end
  119.  
  120. function xyzMenu()
  121.     m.clear()
  122.     button.clearTable()
  123.     button.label(1,1,"Position: "..currx..","..curry..","..currz)
  124.     button.setTable("Back", setMainMenu, "", 1, 6, 2, 2)
  125.     button.setTable(moveMode, toggleMoveMode, "", 10, 20, 2, 2)
  126.     button.label(1,4,"X: ")
  127.     button.setTable("x-10", changeX, -10, 4, 7, 4, 4)
  128.     button.setTable("x-1", changeX, -1, 9, 11, 4, 4)
  129.     button.label(15, 4, setx)
  130.     button.setTable("x+1", changeX, 1, 18, 20, 4, 4)
  131.     button.setTable("x+10", changeX, 10, 22, 25, 4, 4)
  132.     button.label(1,6,"Y: ")
  133.     button.setTable("y-10", changeY, -10, 4, 7, 6, 6)
  134.     button.setTable("y-1", changeY, -1, 9, 11, 6, 6)
  135.     button.label(15, 6, sety)
  136.     button.setTable("y+1", changeY, 1, 18, 20, 6, 6)
  137.     button.setTable("y+10", changeY, 10, 22, 25, 6, 6)
  138.     button.label(1,8,"Z: ")
  139.     button.setTable("z-10", changeZ, -10, 4, 7, 8, 8)
  140.     button.setTable("z-1", changeZ, -1, 9, 11, 8, 8)
  141.     button.label(15, 8, setz)
  142.     button.setTable("z+1", changeZ, 1, 18, 20, 8, 8)
  143.     button.setTable("z+10", changeZ, 10, 22, 25, 8, 8)
  144.     if moveMode == "Normal" then
  145.         button.label(1,10,"X2: ")
  146.         button.setTable("a-10", changeX2, -10, 4, 7, 10, 10)
  147.         button.setTable("a-1", changeX2, -1, 9, 11, 10, 10)
  148.         button.label(15, 10, setx2)
  149.         button.setTable("a+1", changeX2, 1, 18, 20, 10, 10)
  150.         button.setTable("a+10", changeX2, 10, 22, 25, 10, 10)
  151.         button.label(1,12,"Y2: ")
  152.         button.setTable("b-10", changeY2, -10, 4, 7, 12, 12)
  153.         button.setTable("b-1", changeY2, -1, 9, 11, 12, 12)
  154.         button.label(15, 12, sety2)
  155.         button.setTable("b+1", changeY2, 1, 18, 20, 12, 12)
  156.         button.setTable("b+10", changeY2, 10, 22, 25, 12, 12)
  157.         button.label(1,14,"Z2: ")
  158.         button.setTable("c-10", changeZ2, -10, 4, 7, 14, 14)
  159.         button.setTable("c-1", changeZ2, -1, 9, 11, 14, 14)
  160.         button.label(15, 14, setz2)
  161.         button.setTable("c+1", changeZ2, 1, 18, 20, 14, 14)
  162.         button.setTable("c+10", changeZ2, 10, 22, 25, 14, 14)
  163.     end
  164.     button.setTable("Reset", resetXYZ, "", 10, 20, 16, 16)
  165.     button.setTable(areaType, toggleAreaType, "", 3, 13, 18, 18)
  166.     button.setTable("Show Area", showAreaToggle, "", 15, 25, 18, 18)
  167.     button.setTable("Auto Apply", setAutoApply, "", 3, 13, 20, 20)
  168.     button.setTable("Apply", refreshArea, "", 15, 25, 20, 20)
  169.     button.setButton("Show Area", areaShown)
  170.     button.setButton("Auto Apply", autoApply)
  171.     button.screen()
  172. end
  173.  
  174. function getAction()
  175.     local data = {}
  176.     data[0] = "getAction"
  177.     sendMessage(textutils.serialize(data))
  178.     local id, message, distance, protocol = rednet.receive(5)
  179.     if message then
  180.         return(message)
  181.     else
  182.         return("Nothing")
  183.     end
  184. end
  185.  
  186. function showHome()
  187.     button.toggleButton("Home.")
  188.     setArea(home["x"], home["y"], home["z"], home["x"], home["y"], home["z"], "Filled")
  189.     showArea(true)
  190.     sleep(2)
  191.     button.toggleButton("Home.")
  192.     refreshArea()
  193. end
  194.  
  195. function showImportChest()
  196.     button.toggleButton("Import.")
  197.     setArea(importChest["x"], importChest["y"]-1, importChest["z"], importChest["x"], importChest["y"]+1, importChest["z"], "Filled")
  198.     showArea(true)
  199.     sleep(2)
  200.     button.toggleButton("Import.")
  201.     refreshArea()
  202. end
  203.  
  204. function showExportChest()
  205.     button.toggleButton("Export.")
  206.     setArea(exportChest["x"], exportChest["y"]-1, exportChest["z"], exportChest["x"], exportChest["y"]+1, exportChest["z"], "Filled")
  207.     showArea(true)
  208.     sleep(2)
  209.     button.toggleButton("Export.")
  210.     refreshArea()
  211. end
  212.  
  213. function setAutoApply()
  214.     autoApply = not autoApply
  215. end
  216.  
  217. function toggleMoveMode()
  218.     if moveMode == "Normal" then
  219.         moveMode = "Move"
  220.     elseif moveMode == "Move" then
  221.         moveMode = "Expand"
  222.     elseif moveMode == "Expand" then
  223.         moveMode = "Normal"
  224.     end
  225. end
  226.  
  227. function toggleTeleport()
  228.     teleportMode = not teleportMode
  229. end
  230.  
  231. function getPressure()
  232.     local data = {}
  233.     data[0] = "getPressure"
  234.     sendMessage(textutils.serialize(data))
  235.     local id, message, distance, protocol = rednet.receive(5)
  236.     return(message)
  237. end
  238.  
  239. function getPosition()
  240.     local data = {}
  241.     data[0] = "getPosition"
  242.     sendMessage(textutils.serialize(data))
  243.     local id, message, distance, protocol = rednet.receive(5)
  244.     local returnData = textutils.unserialize(message)
  245.     return returnData[1], returnData[2], returnData[3]
  246. end
  247.  
  248. function toggleAreaType()
  249.     if areaType == "Filled" then
  250.         areaType = "Frame"
  251.     elseif areaType == "Frame" then
  252.         areaType = "Walls"
  253.     elseif areaType == "Walls" then
  254.         areaType = "Filled"
  255.     else
  256.         areaType = "Filled"
  257.     end
  258.     refreshArea()
  259. end
  260.  
  261. function resetXYZ()
  262.     setx = 0
  263.     sety = 0
  264.     setz = 0
  265.     setx2 = 0
  266.     sety2 = 0
  267.     setz2 = 0
  268.     currx,curry,currz = gpsLocate()
  269.     refreshArea()
  270. end
  271.  
  272. function setXYZMenu()
  273.     if curry==0 then
  274.         currx,curry,currz = gpsLocate()
  275.     end
  276.     menuType = "xyzMenu"
  277. end
  278.  
  279. function setMainMenu()
  280.     menuType = "mainMenu"
  281. end
  282.  
  283. function setStatusMenu()
  284.     menuType = "statusMenu"
  285. end
  286.  
  287. function setFavoritesMenu()
  288.     menuType = "favoritesMenu"
  289. end
  290.  
  291. function refreshArea()
  292.     setAreaGlobal()
  293.     showArea(false)
  294.     showArea(true)
  295.     areaShown = true
  296. end
  297.  
  298. function setImportChest()
  299.     button.flash("Import")
  300.     importChest["x"] = currx+setx
  301.     importChest["y"] = curry+sety
  302.     importChest["z"] = currz+setz
  303.     writeImportChest()
  304. end
  305.  
  306. function setExportChest()
  307.     button.flash("Export")
  308.     exportChest["x"] = currx+setx
  309.     exportChest["y"] = curry+sety
  310.     exportChest["z"] = currz+setz
  311.     writeExportChest()
  312. end
  313.  
  314. function setHome()
  315.     button.flash("Home")
  316.     home["x"] = currx+setx
  317.     home["y"] = curry+sety
  318.     home["z"] = currz+setz
  319.     writeHome()
  320. end
  321.  
  322. function writeHome()
  323.     file = io.open("homeCoords", "w")
  324.     file:write(textutils.serialize(home))
  325.     file:close()
  326. end
  327.  
  328. function readHome()
  329.     file = io.open("homeCoords", "r")
  330.     if file then
  331.         home = textutils.unserialize(file:read("*a"))
  332.         file:close()
  333.     end
  334. end
  335.  
  336. function writeImportChest()
  337.     file = io.open("chestImportCoords", "w")
  338.     file:write(textutils.serialize(importChest))
  339.     file:close()
  340. end
  341.  
  342. function readImportChest()
  343.     file = io.open("chestImportCoords", "r")
  344.     if file then
  345.         importChest = textutils.unserialize(file:read("*a"))
  346.         file:close()
  347.     end
  348. end
  349.  
  350. function writeExportChest()
  351.     file = io.open("chestExportCoords", "w")
  352.     file:write(textutils.serialize(exportChest))
  353.     file:close()
  354. end
  355.  
  356. function readExportChest()
  357.     file = io.open("chestExportCoords", "r")
  358.     if file then
  359.         exportChest = textutils.unserialize(file:read("*a"))
  360.         file:close()
  361.     end
  362. end
  363.  
  364. function setAreaGlobal()
  365.     clearArea()
  366.     local data = {}
  367.     data[0] = "setArea"
  368.     data[1] = currx+setx
  369.     data[2] = curry+sety
  370.     data[3] = currz+setz
  371.     data[4] = currx+setx2
  372.     data[5] = curry+sety2
  373.     data[6] = currz+setz2
  374.     data[7] = areaType
  375.     sendMessage(textutils.serialize(data))
  376. end
  377.  
  378. function showAreaToggle()
  379.    areaShown = not areaShown
  380.    showArea(areaShown)
  381. end
  382.  
  383. function changeX(change)
  384.     setx = setx + change
  385.     if moveMode == "Move" then
  386.         setx2 = setx2 + change
  387.     elseif moveMode == "Expand" then
  388.         setx2 = setx2 - change
  389.     end
  390.     if autoApply then
  391.         refreshArea()
  392.     end
  393. end
  394.  
  395. function changeY(change)
  396.    sety = sety+change
  397.    if moveMode == "Move" then
  398.         sety2 = sety2 + change
  399.     elseif moveMode == "Expand" then
  400.         sety2 = sety2 - change
  401.     end
  402.     if autoApply then
  403.         refreshArea()
  404.     end
  405. end
  406.  
  407. function changeZ(change)
  408.     setz = setz+change
  409.     if moveMode == "Move" then
  410.         setz2 = setz2 + change
  411.     elseif moveMode == "Expand" then
  412.         setz2 = setz2 - change
  413.     end
  414.     if autoApply then
  415.         refreshArea()
  416.     end
  417. end
  418.  
  419. function changeX2(change)
  420.    setx2 = setx2 + change
  421.    if autoApply then
  422.         refreshArea()
  423.     end
  424. end
  425.  
  426. function changeY2(change)
  427.    sety2 = sety2+change
  428.    if autoApply then
  429.         refreshArea()
  430.     end
  431. end
  432.  
  433. function changeZ2(change)
  434.     setz2 = setz2+change
  435.     if autoApply then
  436.         refreshArea()
  437.     end
  438. end
  439.  
  440. function gpsLocate()
  441.    local x,y,z = gps.locate()
  442.    return math.floor(x), math.floor(y), math.floor(z)
  443. end
  444.  
  445. function comeHere()
  446.     button.flash("Come Here")
  447.     local data = {}
  448.     local x,y,z = gpsLocate()
  449.     if teleportMode then
  450.         data[0] = "teleport"
  451.     else
  452.         data[0] = "goto"
  453.     end
  454.     data[1] = x
  455.     data[2] = y
  456.     data[3] = z
  457.     sendMessage(textutils.serialize(data))
  458.     setAreaGlobal()
  459. end
  460.  
  461. function setSpot(x,y,z)
  462.     clearArea()
  463.     local data = {}
  464.     data[0] = "setSpot"
  465.     data[1] = x
  466.     data[2] = y
  467.     data[3] = z
  468.     sendMessage(textutils.serialize(data))
  469. end
  470.  
  471. function setArea(x1,y1,z1,x2,y2,z2, areaType)
  472.     clearArea()
  473.     local data = {}
  474.     data[0] = "setArea"
  475.     data[1] = x1
  476.     data[2] = y1
  477.     data[3] = z1
  478.     data[4] = x2
  479.     data[5] = y2
  480.     data[6] = z2
  481.     data[7] = areaType
  482.     sendMessage(textutils.serialize(data))
  483. end
  484.  
  485. function hasItem(itemName)
  486.     local data = {}
  487.     data[0] = "hasItem"
  488.     data[1] = itemName
  489.     sendMessage(textutils.serialize(data))
  490.     local id, message, distance, protocol = rednet.receive(5)
  491.     return(message)
  492. end
  493.  
  494. function inventoryImport(itemName)
  495.     local data = {}
  496.     data[0] = "inventoryImport"
  497.     data[1] = itemName
  498.     sendMessage(textutils.serialize(data))
  499. end
  500.  
  501. function inventoryExport(itemName)
  502.     local data = {}
  503.     data[0] = "inventoryExport"
  504.     data[1] = itemName
  505.     sendMessage(textutils.serialize(data))
  506. end
  507.  
  508. function showArea(show)
  509.     local data = {}
  510.     data[0] = "showArea"
  511.     data[1] = show
  512.     sendMessage(textutils.serialize(data))
  513. end
  514.  
  515. function clearArea()
  516.     local data = {}
  517.     data[0] = "clearArea"
  518.     sendMessage(textutils.serialize(data))
  519.     areaShown = false
  520.     showArea(areaShown)
  521. end
  522.  
  523. function pickup()
  524.     button.flash("ItemPickup")
  525.     local data = {}
  526.     data[0] = "pickup"
  527.     sendMessage(textutils.serialize(data))
  528. end
  529.  
  530. function dig()
  531.     button.flash("Dig")
  532.     local data = {}
  533.     data[0] = "dig"
  534.     sendMessage(textutils.serialize(data))
  535. end
  536.  
  537. function entityPickup()
  538.     button.flash("Ent Pickup")
  539.     local data = {}
  540.     data[0] = "entityImport"
  541.     sendMessage(textutils.serialize(data))
  542. end
  543.  
  544. function stopAction()
  545.     button.flash("Stop")
  546.     local data = {}
  547.     data[0] = "exitPiece"
  548.     sendMessage(textutils.serialize(data))
  549. end
  550.  
  551. function entityDrop()
  552.     button.flash("Ent Drop")
  553.     local data = {}
  554.     data[0] = "entityExport"
  555.     sendMessage(textutils.serialize(data))
  556. end
  557.  
  558. function place()
  559.     button.flash("Build")
  560.     local data = {}
  561.     data[0] = "place"
  562.     data[1] = currx+setx
  563.     data[2] = curry+sety
  564.     data[3] = currz+setz
  565.     data[4] = currx+setx2
  566.     data[5] = curry+sety2
  567.     data[6] = currz+setz2
  568.     data[7] = areaType
  569.     sendMessage(textutils.serialize(data))
  570. end
  571.  
  572. function attack()
  573.     button.flash("Attack")
  574.     local data = {}
  575.     data[0] = "attack"
  576.     sendMessage(textutils.serialize(data))
  577. end
  578.  
  579.  
  580. function isDone()
  581.     local data = {}
  582.     data[0] = "isDone"
  583.     sendMessage(textutils.serialize(data))
  584.     local id, message, distance, protocol = rednet.receive(5)
  585.     return(message)
  586. end
  587.  
  588. function waitDone()
  589.     while not isDone() do
  590.         sleep(1)
  591.     end
  592. end
  593.  
  594. function hasPickaxe()
  595.     return(hasItem("minecraft:diamond_pickaxe"))
  596. end
  597.  
  598. function getPickaxe()
  599.     button.flash("Get Pick")
  600.     if importChest["y"] ~= 0 then
  601.         setSpot(importChest["x"], importChest["y"], importChest["z"])
  602.         inventoryImport("minecraft:diamond_pickaxe")
  603.         setAreaGlobal()
  604.     else
  605.         button.label(1,20,"No importChest Location Set.")
  606.         sleep(1)
  607.     end
  608. end
  609.  
  610. function getItems()
  611.     button.flash("GetItems")
  612.     if importChest["y"] ~= 0 then
  613.         setSpot(importChest["x"], importChest["y"], importChest["z"])
  614.         inventoryImport("")
  615.         setAreaGlobal()
  616.     else
  617.         button.label(1,20,"No importChest Location Set.")
  618.         sleep(1)
  619.     end
  620. end
  621.  
  622. function dropItems()
  623.     button.flash("ItemsChest")
  624.     if importChest["y"] ~= 0 then
  625.         setSpot(exportChest["x"], exportChest["y"], exportChest["z"])
  626.         inventoryExport("")
  627.         setAreaGlobal()
  628.     else
  629.         button.label(1,20,"No exportChest Location Set.")
  630.         sleep(1)
  631.     end
  632. end
  633.  
  634. function tempShowArea()
  635.     showArea(true)
  636.     sleep(3)
  637.     showArea(false)
  638. end
  639.  
  640. function setRadius(xRad, zRad, yUp, yDown)
  641.    local x,y,z = gpsLocate()
  642.    x = x
  643.    y = y
  644.    print(x..y..z)
  645.    setArea(x-xRad, y-yDown, z-zRad, x+xRad, y+yUp, z+zRad)
  646.    tempShowArea()
  647. end
  648.  
  649. function setXYZ()
  650.    local x,y,z = gpsLocate()
  651.    x = x
  652.    y = y
  653.    
  654.    setArea(x-xRad, y-yDown, z-zRad, x+xRad, y+yUp, z+zRad)
  655.    
  656. end
  657.  
  658. function goHome()
  659.     local data = {}
  660.     button.flash("Go Home")
  661.     if teleportMode then
  662.         data[0] = "teleport"
  663.     else
  664.         data[0] = "goto"
  665.     end
  666.     data[1] = home["x"]
  667.     data[2] = home["y"]
  668.     data[3] = home["z"]
  669.     sendMessage(textutils.serialize(data))
  670.     setAreaGlobal()
  671. end
  672.  
  673. function goTo()
  674.     button.flash("GoTo")
  675.     local data = {}
  676.     if teleportMode then
  677.         data[0] = "teleport"
  678.     else
  679.         data[0] = "goto"
  680.     end
  681.     data[1] = currx+setx
  682.     data[2] = curry+sety
  683.     data[3] = currz+setz
  684.     sendMessage(textutils.serialize(data))
  685. end
  686.  
  687. function teleport()
  688.     local data = {}
  689.     data[0] = "teleport"
  690.     data[1] = currx+setx
  691.     data[2] = curry+sety
  692.     data[3] = currz+setz
  693.     sendMessage(textutils.serialize(data))
  694. end
  695.  
  696. function displayScreen()
  697.     if menuType == "mainMenu" then
  698.         mainMenu()
  699.     elseif menuType == "xyzMenu" then
  700.         xyzMenu()
  701.     elseif menuType == "statusMenu" then
  702.         statusMenu()
  703.     elseif menuType == "favoritesMenu" then
  704.         favoritesMenu()
  705.     end
  706.     local event, side, x, y
  707.     event, side, x, y = os.pullEvent()
  708.     while event ~= "mouse_click" do
  709.         event, side, x, y = os.pullEvent()
  710.     end
  711.     button.checkxy(x,y)
  712. end
  713.  
  714. readHome()
  715. readImportChest()
  716. readExportChest()
  717. while true do
  718.     displayScreen()
  719. end
  720.  
  721. --clearArea()  
  722. --dropItems()
  723. --getPickaxe()
  724. --setRadius(3,3,1,2)
  725. --dig()
  726. --waitDone()
  727. --clearArea()
  728. --setRadius(5,5,2,3)
  729. --pickup()
  730. --waitDone()
  731. --dropItems()
  732.  
  733. --comeHere()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement