New Turtle Code for MineCraft

Well the past few nights I have been playing MineCraft and I have been playing around with my turtle on it his name is Leo. I was using the Tunneling program that is built into the turtles and have found out that it very minimal it will only make a 2 tall by 3 wide box. So I decided to make one that allows you to make custom tunneling program. This is the code I have so far, it is all done in Lua. I know that there is not much to it except the fact it asks you 4 questions. The questions are How Deep would you like to dig? How Tall would you like to Dig? How far to the Left do you want to Dig? And How far to the right do you want to dig? They will create the statements that will say how big of a opening you want and how deep of a tunnel you want it to be.

The code will be developed over the next few months to be a truly custom Tunneling program please check back often to see how it grows.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--[[
 
  Custom Tunneling Program v0.1
  Created: 2/28/2013 20:00 PST
  Updated:
  Created By: Proopai (Eric Vasquez)
  Description: This program is to use the Turtles to make wider Tunnels then 2x3.  
                 It will allow you to state how tall you want the tunnel to go 
                 and how wide you would like it to go along with placing a Torch.
 
  3/1/2013 00:01 PST
  ------------------------
  This will be expanded little by little till it is completed.  It will be able 
    to make a tunnel that goes in one direction for a set time limit.  Refueling 
    is planed to be put in but is yet to be entered into the application. Right 
    now all this does is have the menu setup working on getting the rest of the 
    functions setup.
 
--]]
 
function load()
 
  term.clear()
  term.setCursorPos(1,1)
  print("Tunneling version v0.1")
  print("How Deep of a Tunnel Do you want?")
  write("#")
  deep = read()
  print("How Tall of a Tunnel do you want?")
  write("#")
  tall = read()
  print("How far out on the left do you want?")
  write("#")
  left = read()
  print("How far out on the right do you want?")
  write("#")
  right = read()
 
end
 
function leave()
 
  term.clear()
  term.setCursorPos(1,1)
  term.restore()
 
end
 
function startTunnel()
 
  a = deep
  b = tall
  c = left
  d = right
 
 
end
 
load()
print("I will dig "..deep.." blocks in")
print("I will dig "..tall.." blocks high")
print("I will dig "..left.." blocks to the left")
print("I will dig "..right.." blocks to the right")
startTunnel()
leave()

Leave a Reply