Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg1, arg2, arg3, arg4 = ...
- local plrXPos, plrYPos, plrZPos = gps.locate()
- local plrYPos = plrYPos - 1
- local plrXPos = math.floor(plrXPos)
- local plrYPos = math.floor(plrYPos)
- local plrZPos = math.floor(plrZPos)
- local plrPos = {plrXPos, plrYPos, plrZPos}
- local miningDimensions = {arg1, arg2, arg3, arg4}
- local PCID = os.getComputerID()
- rednet.open("back")
- for i,v in pairs(plrPos) do
- print(i..":"..v)
- end
- function receiveHomePCID()
- HomePCID = nil
- local k
- local l
- repeat
- sleep(1)
- HomePCID, l, k = rednet.receive()
- until HomePCID ~= nil
- print("Debug: "..HomePCID)
- end
- function receiveTurtlePCIDs()
- tableTurtlePCID = nil
- local k
- local j
- repeat
- k, tabelTurtlePCID, j = rednet.recieve()
- sleep(1)
- until tableTurtlePCID ~= nil
- end
- function receiveTurtleCountNeeded()
- turtleCountNeeded = nil
- local k
- local l
- repeat
- sleep(1)
- turtleCountNeeded, l, k = rednet.receive()
- until turtleCountNeeded ~= nil
- print("Debug: "..turtleCountNeeded)
- end
- function sendPhonePCID()
- rednet.broadcast(PCID)
- end
- function sendPlrPos(Str)
- if Str == nil then
- rednet.broadcast(plrPos)
- else
- rednet.send(Str, plrPos)
- end
- end
- function sendMiningDimensionsSignal(Str)
- rednet.send(Str, miningPosition)
- end
- packet = {PCID, plrPos[1], plrPos[2], plrPos[3], miningDimensions[1], miningDimensions[2], miningDimensions[3], miningDimensions[4]}
- sleep(5)
- rednet.broadcast(packet)
Add Comment
Please, Sign In to add comment