Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- func = args[1]
- function listen()
- msg = 0
- while msg == 0 do
- id, msg = rednet.receive()
- end
- end
- os.loadAPI("API/move")
- move.report(func.." order received.")
- if func == "recall" then
- move.goHome()
- move.unload()
- os.reboot()
- elseif func == "travel" then
- location = args[2]
- if args[3] ~= nil then
- move.moveToLoc(location, "l")
- else
- move.moveToLoc(location)
- end
- elseif func == "updateLocs" then
- chunk = args[2]
- xPos = tonumber(args[3])
- yPos = tonumber(args[4])
- zPos = tonumber(args[5])
- hPos = tonumber(args[6])
- move.addLoc(chunk, xPos, yPos, zPos, hPos)
- elseif func == "updateChests" then
- chestTab = textutils.unserialize(args[2])
- data = fs.open("Tables/chests", "w")
- data.writeLine(textutils.serialize(chestTab))
- data.close()
- elseif func == "updateBP" then
- label = args[2]
- listen()
- data = fs.open("Blueprints/"..label, "w")
- data.writeLine(msg)
- data.close()
- move.report(label.." blueprint data stored.")
- elseif func == "mine" then
- location = args[2]
- length = tonumber(args[3])
- width = tonumber(args[4])
- move.quarry(length, width)
- elseif func == "clear" then
- location = args[2]
- length = tonumber(args[3])
- width = tonumber(args[4])
- height = tonumber(args[5])
- move.moveToLoc(location)
- move.findY(height)
- for i = 1, 6 do
- move.setReturnPoint("gridStart")
- move.digGrid(length, width)
- move.moveToLoc("gridStart")
- move.up(3)
- end
- elseif func == "build" then
- location = args[2]
- bpName = args[3]
- move.buildBP(location, bpName)
- elseif func == "plant" then
- location = args[2]
- bpName = args[3]
- move.buildBP(location, bpName)
- elseif func == "sort" then
- location = args[2]
- move.myTab.opt1 = location
- print(move.myTab.opt1)
- move.saveMyData()
- move.report("Turtle lookup")
- move.listen()
- move.sortChest()
- move.goHome()
- move.unload()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement