Posted 27 February 2014 - 11:32 PM
hey guys, I'm pretty new to coding and computercraft. I have already written a code that mines steps down for a number of blocks that you input as well as places torches a set number of blocks that you entered. now I am trying to write another code for a simple strip mine
this is just a function that i am writing for the code
(not tested and not the full code)
the trouble I'm having is getting the right code to turn around and place torches every 6 blocks.
Also if you see and mistakes such as misspelt words I am on my phone.
–code starts–
startScreen()
firstFuel()
for i = 1, 100 do
quickFuel()
quickInfo()
if turtle.detect() then
turtle.dig()
sleep(.5)
elseif turtle.detect() == false then
turtle.digUp()
turtle.digDown
turtle.forward()
end
if turtle.detectUp () then
turtle.digUp ()
end
if turtle.detectDown () then
turtle.digDown ()
end
—-torch placing script goes here—
end
– code ends–
if you could help that would be awesome. If you need to see the full script I'll have to wait until I'm home to past it to pastebin
this is just a function that i am writing for the code
(not tested and not the full code)
the trouble I'm having is getting the right code to turn around and place torches every 6 blocks.
Also if you see and mistakes such as misspelt words I am on my phone.
–code starts–
startScreen()
firstFuel()
for i = 1, 100 do
quickFuel()
quickInfo()
if turtle.detect() then
turtle.dig()
sleep(.5)
elseif turtle.detect() == false then
turtle.digUp()
turtle.digDown
turtle.forward()
end
if turtle.detectUp () then
turtle.digUp ()
end
if turtle.detectDown () then
turtle.digDown ()
end
—-torch placing script goes here—
end
– code ends–
if you could help that would be awesome. If you need to see the full script I'll have to wait until I'm home to past it to pastebin