SHOW:
|
|
- or go back to the newest paste.
1 | slot1 = 2 | |
2 | slot2 = 3 | |
3 | function treibstoff() | |
4 | turtle.select(1) | |
5 | turtle.refuel(1) | |
6 | end | |
7 | function hindernisvor() | |
8 | while turtle.detect() do | |
9 | turtle.dig() | |
10 | end | |
11 | end | |
12 | function hindernisauf() | |
13 | while turtle.detectUp() do | |
14 | turtle.digUp() | |
15 | end | |
16 | end | |
17 | function hindernisab() | |
18 | while turtle.detectDown() do | |
19 | turtle.digDown() | |
20 | end | |
21 | end | |
22 | function vor() | |
23 | if turtle.getFuelLevel() < 10 then | |
24 | treibstoff() | |
25 | end | |
26 | while turtle.forward() == false do | |
27 | hindernisvor() | |
28 | turtle.attack() | |
29 | end | |
30 | end | |
31 | function auf() | |
32 | if turtle.getFuelLevel() < 10 then | |
33 | treibstoff() | |
34 | end | |
35 | while turtle.up() == false do | |
36 | hindernisauf() | |
37 | turtle.attackUp() | |
38 | end | |
39 | end | |
40 | function ab() | |
41 | if turtle.getFuelLevel() < 10 then | |
42 | treibstoff() | |
43 | end | |
44 | while turtle.down() == false do | |
45 | hindernisab() | |
46 | turtle.attackDown() | |
47 | end | |
48 | end | |
49 | function setzen() | |
50 | if turtle.getItemCount(slot1) == 0 then | |
51 | slot1 = slot1 + 2 | |
52 | end | |
53 | turtle.select(slot1) | |
54 | turtle.placeDown() | |
55 | end | |
56 | function setzenzaun() | |
57 | if turtle.getItemCount(slot2) == 0 then | |
58 | slot2 = slot2 + 2 | |
59 | end | |
60 | turtle.select(slot2) | |
61 | turtle.placeDown() | |
62 | end | |
63 | term.clear() | |
64 | term.setCursorPos(1,1) | |
65 | - | textutils.slowPrint("#######################################") |
65 | + | print("Please put fuel in slot 1!") |
66 | - | textutils.slowPrint("########Brueckenbauer aktiviert########") |
66 | + | print("Please place platform or roof material in slot 2, 4, 6, 8, 10, 12, 14 and 16!") |
67 | - | textutils.slowPrint("#######################################") |
67 | + | print("If the fence mode is activated, please place the fence material in slot 3, 5, 7, 9, 11, 13 and 15!") |
68 | print("Press any key to continue!") | |
69 | os.pullEvent("key") | |
70 | shell.run("clear") | |
71 | - | print("Bitte Treibstoff in Slot 1 legen!") |
71 | + | print("How long should the bridge be?") |
72 | - | print("Bitte Platform- oder Dachmaterial in Slot 2,4,6,8,10,12,14 und 16 legen!") |
72 | + | |
73 | - | print("Wenn der zaunmodus aktiviert ist,bitte Zaunmaterial in Slot 3,5,7,9,11,13 und 15 legen!") |
73 | + | |
74 | - | print("Druecken sie eine beliebige Taste,um fortzufahren!") |
74 | + | |
75 | write("Length:") | |
76 | laenge = tonumber(read()) | |
77 | - | print("Wie lang soll die Bruecke sein?") |
77 | + | |
78 | term.setCursorPos(1,1) | |
79 | term.clearLine() | |
80 | print("Length:"..laenge) | |
81 | - | write("Laenge:") |
81 | + | print("How wide should the bridge be?") |
82 | write("Width:") | |
83 | breite = tonumber(read()) | |
84 | term.clearLine() | |
85 | term.setCursorPos(1,2) | |
86 | - | print("Laenge:"..laenge) |
86 | + | |
87 | - | print("Wie breit soll die Bruecke sein?") |
87 | + | print("Width:"..breite) |
88 | - | write("Breite:") |
88 | + | print("In which direction should the turtle build? (Left or right)") |
89 | write("Direction:") | |
90 | richtung = read() | |
91 | term.clearLine() | |
92 | term.setCursorPos(1,3) | |
93 | - | print("Breite:"..breite) |
93 | + | |
94 | - | print("In welche Richtung soll die Turtle bauen?(Links oder Rechts)") |
94 | + | print("Direction:"..richtung) |
95 | - | write("Richtung:") |
95 | + | |
96 | richtung = "turnRight" | |
97 | end | |
98 | if string.lower(richtung) == "links" then | |
99 | richtung = "turnLeft" | |
100 | - | print("Richtung:"..richtung) |
100 | + | |
101 | print("Should the turtle build a:") | |
102 | print("1) platform") | |
103 | Print("2) a bridge with a fence") | |
104 | Print("3) a covered bridge") | |
105 | Print("1, 2 or 3") | |
106 | write("Number:") | |
107 | - | print("Soll die Turtle eine Platform,eine Bruecke mit Zaun oder eine ueberdachte Bruecke bauen?(Platform,Zaun oder Ueberdacht)") |
107 | + | |
108 | - | write("Modus:") |
108 | + | |
109 | term.clearLine() | |
110 | print("Number:"..zaun) | |
111 | term.setCursorPos(1,5) | |
112 | - | print("Modus:"..zaun) |
112 | + | |
113 | term.setCursorPos(1,6) | |
114 | term.clearLine() | |
115 | term.setCursorPos(1,7) | |
116 | term.clearLine() | |
117 | term.setCursorPos(1,8) | |
118 | term.clearLine() | |
119 | if string.lower(zaun) == "1" then | |
120 | turtle.placeDown() | |
121 | - | if string.lower(zaun) == "zaun" then |
121 | + | |
122 | turtle[richtung]() | |
123 | for x = 2, breite do | |
124 | setzen() | |
125 | vor() | |
126 | end | |
127 | setzen() | |
128 | auf() | |
129 | setzenzaun() | |
130 | for asdf = 0,1 do | |
131 | turtle[richtung]() | |
132 | end | |
133 | for c = 2, breite do | |
134 | vor() | |
135 | end | |
136 | setzenzaun() | |
137 | turtle[richtung]() | |
138 | vor() | |
139 | ab() | |
140 | end | |
141 | end | |
142 | ||
143 | if string.lower(zaun) == "2" then | |
144 | for d = 1, laenge do | |
145 | - | if string.lower(zaun) == "platform" then |
145 | + | |
146 | turtle[richtung]() | |
147 | for y = 2, breite do | |
148 | vor() | |
149 | setzen() | |
150 | end | |
151 | for ad = 0,2 do | |
152 | turtle[richtung]() | |
153 | end | |
154 | vor() | |
155 | for af = 0,2 do | |
156 | turtle[richtung]() | |
157 | end | |
158 | for f = 2, breite do | |
159 | vor() | |
160 | end | |
161 | turtle[richtung]() | |
162 | end | |
163 | end | |
164 | ||
165 | if string.lower(zaun) == "3" then | |
166 | turtle.placeDown() | |
167 | - | if string.lower(zaun) == "ueberdacht" then |
167 | + | |
168 | turtle[richtung]() | |
169 | for x = 2, breite do | |
170 | setzen() | |
171 | vor() | |
172 | end | |
173 | setzen() | |
174 | auf() | |
175 | setzenzaun() | |
176 | for xy = 1,2 do | |
177 | turtle[richtung]() | |
178 | end | |
179 | for c = 2, breite do | |
180 | vor() | |
181 | end | |
182 | setzenzaun() | |
183 | auf() | |
184 | setzenzaun() | |
185 | for xy = 1,2 do | |
186 | turtle[richtung]() | |
187 | end | |
188 | for c = 2, breite do | |
189 | vor() | |
190 | end | |
191 | setzenzaun() | |
192 | auf() | |
193 | setzenzaun() | |
194 | for xy = 1,2 do | |
195 | turtle[richtung]() | |
196 | end | |
197 | for c = 2, breite do | |
198 | vor() | |
199 | end | |
200 | setzenzaun() | |
201 | auf() | |
202 | setzen() | |
203 | for xy = 1,2 do | |
204 | turtle[richtung]() | |
205 | end | |
206 | for c = 2, breite do | |
207 | vor() | |
208 | setzen() | |
209 | end | |
210 | for xy = 1,2 do | |
211 | turtle[richtung]() | |
212 | end | |
213 | for c = 2, breite do | |
214 | vor() | |
215 | end | |
216 | turtle[richtung]() | |
217 | vor() | |
218 | for xyz = 1,4 do | |
219 | ab() | |
220 | end | |
221 | end | |
222 | end | |
223 | turtle.select(1) | |
224 | term.clear() | |
225 | term.setCursorPos(1,1) |