15 posts
Posted 27 September 2012 - 09:05 PM
Hi all, Today i was on a tekkit server that i go on. I was hoping if anyone can help me out! I was looking for a automatic cobblestone mining program, As in i make a cobblestone generator and then it automatically mines, And when it is full it drops (down preferably, since i will place my obsidian pipes under it. The code i tried didnt work and here it is:
http://computercraft...obble_GeneratorCan someone please help me :P/>/> Thanks!
P.S I used a auto typer so the typing may have been messed up
521 posts
Location
Stockholm, Sweden
Posted 27 September 2012 - 09:54 PM
A cobblestone generator is really simple, a easy one here:
local x = 1
turtle.select(x)
while true do
while turtle.getItemSpace(x) < 1 do
if x == 16 then
print("Finished!")
sleep(5) -- 5 seconds
os.shutdown()
end
if x < 16 then x = x + 1 end
turtle.select(x)
end
if turtle.detect() then turtle.dig() end
end
15 posts
Posted 27 September 2012 - 10:50 PM
Getting this error: ""bios:206: [string "cobble2"]:14: '=' expected ""
521 posts
Location
Stockholm, Sweden
Posted 28 September 2012 - 05:55 AM
Getting this error: ""bios:206: [string "cobble2"]:14: '=' expected ""
Well row 14 is the last
end, so that can't be right.
When I tried the code it worked just fine!
I can see that you updated your information, so I'll try do write a script for that…
818 posts
Posted 28 September 2012 - 05:59 AM
I think you might have missed a () when yoiu copied over, at turtle.dig()?
521 posts
Location
Stockholm, Sweden
Posted 28 September 2012 - 06:19 AM
Here, this will do the job (worked for me)
local x = 1
turtle.select(x)
while true do
while turtle.getItemSpace(x) < 1 do
for i = 1, 16 do
turtle.select(i)
if turtle.getItemSpace(i) > 0 then x = i turtle.select(i)
break end
if turtle.getItemSpace(i) < 1 and i == 16 then
for i = 1, 16 do
turtle.select(i)
turtle.dropDown()
end
turtle.select(1)
end
end
end
if turtle.detect() then turtle.dig() end
end
Also on pastebin:
EjehsSyz
15 posts
Posted 28 September 2012 - 10:13 PM
Getting this error: ""bios:206: [string "cobble2"]:14: '=' expected ""
Well row 14 is the last
end, so that can't be right.
When I tried the code it worked just fine!
I can see that you updated your information, so I'll try do write a script for that…
I didnt edit anything, It might've been the auto typer - Trying the new script
Edit: The auto typer typed too fast- made a few mistakes, But when i tried it out the cc turtle wasnt mining, What do i have to op? I tried [computercraft]
P.S The server i play on uses griefprevention so i have to "/trust" them - i cant op