Could someone make program for turtle that
1. asks number,
2. then goes straight that amount of blocks,
3. then drops tnt/industrialcraft nuke it is carrying,
4. (optionally) comes back to start location.
--#get distance
local dist
repeat
term.write( "Distance: " )
dist = tonumber( read() )
until dist
--#check fuel
if turtle.getFuelLevel() < dist * 2 then
error( "Turtle does not have sufficient fuel to accomplish mission", 0 )
end
--#move forward
for i = 1, dist do
turtle.forward()
end
--#find and drop tnt
for i = 1, 16 do
turtle.select( i )
if turtle.getItemCount( i ) > 0 then
turtle.placeDown()
rs.setOutput( "bottom", true )
break
end
end
--#come back
for i = 1, dist do
turtle.back()
end
If you have the http api enabled, upload to pastebin and take note of the paste idNow could someone just tell me how to paste that to computercraft turtle?
www.pastebin.com/*thispart*
pastebin get *thispart* name
name
And does this work with IC nuke also, or just with tnt? because i intended it for tekkit classic warfare
So it does work with nukes. And it is so easy to f*ck up with dirt-blocks in its inventory that it isn't even overpowered. Thank you :)/>
-snip-
You could make it so if the block changes so its not equal to the nuke/tnt block it would stop and ask for tnt/nuke instead. Or you could have it return if it runs out of nukes/tnt or is removed from inventory.