diff --git a/minehost.lua b/minehost.lua index 87b2cc1..704cdfa 100644 --- a/minehost.lua +++ b/minehost.lua @@ -19,6 +19,8 @@ local HEADING = "heading" local QUARRYCHUNK = "quarry" local TASK = "task" local FAILED = "failed" +-- Constant local actions +local MOVEHERE = "movehere" -- Constant messsage types local LOG = "LOG" local REQUEST = "REQ" @@ -86,6 +88,10 @@ local function listenForCommands() sendDirective(LEADER, HEADING) elseif string.find(input, QUARRYCHUNK) == 1 then sendDirective(LEADER, input) + elseif string.find(input, MOVEHERE) == 1 then + local x,y,z = gps.locate() + y = y + 1 + sendDirective(LEADER, MOVETO, x, y, z) end end end