Jump to content




Mass Mine


1 reply to this topic

#1 dorky106

  • Members
  • 19 posts

Posted 08 November 2012 - 05:06 AM

This is a 3 step program that runs off of rednet.
First real program, and I bet there are alot better versions out there then this.
But meh sharing it anyways.

Hope some people enjoy this.
Mines 27 stacks (Normal chest) then places the cobble every stack into a chest placed to the left of the turtle


Requires:
Make sure you have rednet open on all the mining turtle
All Mining turtles IDs must be bunched together 1-10 no 1-3, 5-7, 9-10 (Though it is do able with a bit of editing)

Main Computer
Start
local stop = false
local num = X
while stop == false do
if num == Y then
  stop = true
else
  rednet.send(num,"Mine",true)
  num = num + 1
end
end
print("Done!")
Change
num = X to the first turtle ID #
num == Y to the last turtle ID #

Turtles
Wait
x,y,z=rednet.receive()
if y == "Mine" then
shell.run("Mine")
end
print("Started")

Mine
local stor = 0
local bool = false
local kill = 0
while bool == false do
if kill == 27 then
  bool = true
else
  if stor == 64 then
   turtle.turnLeft()
   turtle.drop(64)
   turtle.turnRight()
   stor = turtle.getItemCount(1)
   kill = kill + 1
  else
   turtle.dig()
   stor = turtle.getItemCount(1)
  end
end
end
print("Finished!")


#2 slay_mithos

  • New Members
  • 22 posts

Posted 09 November 2012 - 02:04 AM

A couple of things from an other amateur:
1. Use table for turtle ids, it enables to have different ids, not necessarily all connected.
2. Your program only seems to run with cobble generator, or did I miss something? (I see no "move" commands)
If it is, then it's of limited use, but nice first program I guess.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users