Right I now see what you guys are saying about the South problem, I don't believe that is the cause though. I will test it though.
Its also a massive frame drill, turtles are disabled for non donators on the server I play on :(/>
Is there any sort of remote control device also available?
Right I changed a few bits around, and it seems to of stopped the random x component increasing, but still the Z is increasing too much. (It jumped from 10 to 40) The machine moved 10 blocks normally, drilled down to bed rock, came back up, but then wanted to move 30 blocks which its not meant to.
local Pos = vector.new(0,0,0) --Base Position
local Side = "bottom"
local LastPos = vector.new(0,0,0) -- Keep Y = 0
function North(int)
print("North: "..int)
for I=1,int do
Pos = Pos:sub(vector.new(0,0,1))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,8)
sleep(1.5)
end
end
function East(int)
print("East: "..int)
for I=1,int do
Pos = Pos:add(vector.new(1,0,0))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,1)
sleep(1.5)
end
end
function South(int)
print("South: "..int)
for I=1,int do
Pos = Pos:sub(vector.new(0,0,1))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,4)
sleep(1.5)
end
end
function West(int)
print("West: "..int)
for I=1,int do
Pos = Pos:sub(vector.new(1,0,0))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,2)
sleep(1.5)
end
end
function Up(int)
print("Up: "..int)
for I=1,int do
Pos = Pos:add(vector.new(0,1,0))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,16)
sleep(1.5)
end
end
function Down(int,bool)
print("Down: "..int)
for I=1,int do
Pos = Pos:sub(vector.new(0,1,0))
redstone.setBundledOutput(Side,0)
sleep(1.5)
redstone.setBundledOutput(Side,32)
sleep(1.5)
if bool == true then
if Pos.y < -8 then --ADJUSTABLE
redstone.setOutput("top",true)
end
end
end
redstone.setOutput("top",false)
end
function MoveToPos(vec)
local x = vec.x
local y = vec.y
local z = vec.z
if y > Pos.y then
Up(y - Pos.y)
elseif y < Pos.y then
Down(Pos.y - y,false)
end
if x > Pos.x then
East(x - Pos.x)
elseif x < Pos.x then
West(Pos.x - x)
end
if z > Pos.z then
South(z - Pos.z)
elseif z < Pos.z then
North(Pos.z - z)
end
end
function Mine()
Down(63,true) --ADJUSTABLE
sleep(1.5)
Up(63) --ADJUSTABLE
end
while true do
if redstone.getInput("front") then
LastPos.z = LastPos.z + 10
MoveToPos(LastPos)
print("LastPos = "..LastPos:tostring())
if redstone.getInput("front") then
Mine()
end
else
if Pos ~= vector.new(0,0,0) then
MoveToPos(vector.new(0,0,0))
end
sleep(10)
end
end