Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Version = 1603
- momfuellevel = 0
- aufsammeln = 40
- fuellevel = 100
- count = 0
- anzahl1 = 0
- anzahl2 = 0
- treeblock = "minecraft:log"
- steinblock = "minecraft:cobblestone"
- wasser1 = "minecraft:water","minecraft:flowing_water","minecraft:flowing_lava"
- chestdistance = 5
- zaehler = 0
- zaehler1 = 0
- zaehler2 = 0
- zaehler3 = 0
- zaehler4 = 30
- zaehler5 = 0
- zaehler6 = 10
- zaehler7 = 0
- zaehler8 = 0
- zaehler10 = 0
- zaehler14 = 0
- Kohleanz = 19
- j = 0
- -- (Standart)--
- function refuel()
- if fuellevel > 5000 then
- fuellevel = 3000
- end
- if fuellevel < 11 then
- fuellevel = 60
- end
- fuellevel = fuellevel + 1
- if(turtle.getFuelLevel() < fuellevel) then
- turtle.select(16)
- if turtle.getItemCount(16) > 0 then
- if turtle.getItemDetail(16).name == "minecraft:coal" then
- turtle.refuel(1)
- momfuellevel = turtle.getFuelLevel()
- print("Aufgetankt "..momfuellevel.." Fuel im Tank")
- print("Neuer Sollwert "..fuellevel.." Fuel")
- refuel()
- turtle.select(1)
- else
- print("Falsches Iteam im Slot 16")
- Sortieren()
- end
- else
- if turtle.getFuelLevel() < 100 then
- print("WARNUNG KEIN FUEL (Slot 16) ")
- Sortieren()
- end
- print("Neuer Sollwert "..fuellevel.." Fuel")
- fuellevel = fuellevel - 50
- for i=1,4 do
- turtle.turnRight()
- end
- refuel()
- end
- turtle.select(1)
- end
- --Notfuel--
- if(turtle.getFuelLevel() < 50) then
- print("---------------------------------------")
- print("---------------------------------------")
- print("-------------NOTFUEL-------------------")
- print("---------------------------------------")
- print("---------------------------------------")
- Sortieren()
- if turtle.getItemCount(7) > 5 then
- turtle.select(7)
- turtle.refuel(5)
- else
- for i=1,16 do
- turtle.select(i)
- turtle.refuel(3)
- end
- end
- turtle.select(1)
- momfuellevel = turtle.getFuelLevel()
- print("Aufgetankt "..momfuellevel.." Fuel im Tank")
- end
- end
- function forward()
- refuel()
- zaehler1 = zaehler1 +1
- while(turtle.forward()==false) do
- print("WARNUNG Block im Weg !!")
- turtle.attack()
- turtle.dig()
- sleep(2)
- end
- end
- function forward2()
- if fuellevel > 200 then
- fuellevel = 100
- end
- refuel()
- zaehler1 = zaehler1 +1
- while(turtle.forward()==false) do
- turtle.attack()
- turtle.dig()
- end
- end
- function up()
- refuel()
- while(turtle.up()==false) do
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.attackUp()
- end
- end
- function down()
- refuel()
- while(turtle.down()==false) do
- if turtle.detectDown() then
- turtle.digDown()
- end
- turtle.attackDown()
- end
- end
- function back()
- refuel()
- while(turtle.back()==false) do
- print("WARNUNG Block im Weg !!")
- end
- end
- function forward1()
- refuel()
- while(turtle.forward()==false) do
- if zaehler2 > 0 then
- turtle.turnLeft()
- turtle.turnLeft()
- zaehler2 = 0
- else
- zaehler1 = zaehler1 +1
- turtle.turnRight()
- zaehler2 = zaehler2 + 1
- end
- end
- zaehler2 = 0
- end
- function down1()
- if turtle.detectDown() then
- else
- refuel()
- while(turtle.down()==false) do
- end
- end
- end
- function Stein()
- success, data = turtle.inspect()
- while(success and data.name==steinblock) do
- turtle.dig()
- break
- end
- end
- -- (Programm Start Stein) --
- -- überprüfe ob Cobblegenerator gebaut ist --
- function abbauen()
- if turtle.getItemCount(13) <= 61 then
- turtle.select(13)
- turtle.dig()
- sleep(5)
- success, data = turtle.inspect()
- if (success and data.name==steinblock) then
- print("Wasser und Lava vorhanden")
- else
- print("---------------------------------------")
- print("kein Cobblegenerator vorhanden !")
- print("Fuege Wasser und Lava hinzu !")
- print("Wasser Links und Rechts")
- print("Lava in der Mitte")
- print("---------------------------------------")
- sleep(2)
- print("...")
- sleep(2)
- print("Turtle Startet dann automatisch")
- end
- end
- if turtle.getItemCount(13) <= 62 then
- print("Baue 1 Stack Stein ab")
- while turtle.getItemCount(13) <= 62 do
- turtle.select(13)
- Stein()
- turtle.turnLeft()
- Stein()
- turtle.turnRight()
- end
- turtle.select(1)
- print("habe nun 1 Stack Stein im Invi")
- else
- print("Habe schon genug Steine im Invi")
- print("(Slot 13) ")
- end
- end
- --(Baum)-----------------------------------------------------------
- function Blatt()
- turtle.dig()
- turtle.digDown()
- turtle.digUp()
- end
- function Blatt1()
- for i=1,4 do
- Blatt()
- forward()
- end
- turtle.turnRight()
- end
- function Blatt3()
- for i=1,2 do
- Blatt()
- forward()
- end
- turtle.turnRight()
- end
- function Blatt2()
- turtle.digUp()
- up()
- turtle.digUp()
- up()
- turtle.dig()
- forward()
- turtle.dig()
- forward()
- turtle.dig()
- turtle.turnRight()
- Blatt()
- forward()
- Blatt()
- forward()
- turtle.turnRight()
- Blatt1()
- Blatt1()
- Blatt1()
- turtle.dig()
- forward()
- turtle.turnRight()
- Blatt()
- forward()
- turtle.turnLeft()
- Blatt3()
- Blatt3()
- Blatt3()
- Blatt3()
- forward()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- turtle.turnRight()
- end
- function fell1()
- count = count + 1
- print("Baum Nr. " ..count.. " wird gefaellt!")
- turtle.dig()
- forward()
- Blatt2()
- turtle.digUp()
- up()
- Blatt2()
- turtle.digUp()
- up()
- turtle.digUp()
- up()
- for i=1,7 do
- down()
- end
- while(turtle.back()==false) do end
- end
- function place()
- turtle.select(5)
- turtle.place()
- turtle.select(1)
- end
- function fell2()
- turtle.dig()
- forward()
- for i=1,6 do
- turtle.digUp()
- for i=1,4 do
- turtle.dig()
- turtle.turnRight()
- end
- up()
- end
- for i=1,6 do
- down()
- end
- while(turtle.back()==false) do end
- end
- function fell5()
- if turtle.getItemCount(5) < zaehler6 then
- fell1()
- Sortieren()
- else
- fell2()
- Sortieren()
- end
- end
- function fell()
- turtle.select(8)
- success, data = turtle.inspect()
- if(success and data.name==treeblock and turtle.getItemCount(8) < 57 ) then
- fell5()
- end
- end
- function Weg1(xy)
- for i=1,xy do
- turtle.turnLeft()
- fell()
- place()
- turtle.turnRight()
- for i=1,4 do
- forward()
- end
- end
- turtle.turnLeft()
- fell()
- place()
- turtle.turnRight()
- end
- function Baumlinie1()
- if turtle.getItemCount(16) > 10 or zaehler3 > 1 then
- print("Ich gehe Holz faellen")
- zaehler3 = 0
- turtle.turnRight()
- for i=1,4 do
- forward()
- end
- Weg1(10)
- turtle.turnRight()
- Sortieren()
- for i=1,3 do
- forward()
- end
- turtle.turnRight()
- Weg1(10)
- for i=1,4 do
- forward()
- end
- turtle.turnRight()
- for i=1,3 do
- forward()
- end
- else
- print("Ich habe noch zuwenig Holzkohle")
- zaehler3 = zaehler3 + 1
- end
- end
- --(ofen)----------------------------------------------------------------
- function Steinofenbef()
- if turtle.getItemCount(13) > 20 then
- turtle.select(13)
- turtle.dropDown(19)
- turtle.select(1)
- end
- end
- function Steinofenent()
- for i=1,2 do
- if turtle.getItemCount(14) < 50 then
- turtle.select(14)
- turtle.suckUp(10)
- turtle.select(1)
- end
- end
- end
- function ofenbef()
- if turtle.getItemCount(16) > 2 then
- turtle.select(16)
- turtle.drop(1)
- turtle.select(1)
- end
- if turtle.getItemCount(7) > 8 then
- turtle.select(7)
- turtle.drop(5)
- turtle.select(1)
- end
- end
- function ofenbef1()
- if turtle.getItemCount(16) > 22 then
- turtle.select(16)
- turtle.drop(2)
- turtle.select(1)
- end
- end
- function Holzofenbef()
- if turtle.getItemCount(8) > 4 then
- turtle.select(8)
- turtle.dropDown(5)
- turtle.select(1)
- end
- if turtle.getItemCount(8) > 10 then
- turtle.select(8)
- turtle.dropDown(3)
- turtle.select(1)
- end
- if turtle.getItemCount(8) > 20 then
- turtle.select(8)
- turtle.dropDown(8)
- turtle.select(1)
- end
- end
- function Holzofenent()
- for i=1,2 do
- if turtle.getItemCount(16) < 50 then
- turtle.select(16)
- turtle.suckUp(10)
- turtle.select(1)
- end
- end
- end
- --(Sortieren)----------------------------------------------------------------
- function Drop()
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- turtle.dropUp()
- end
- end
- end
- function Suck()
- turtle.select(1)
- for i=1,16 do
- turtle.suckUp()
- end
- end
- function Sortieren1(x,z)
- allesnachoben(x)
- if turtle.getItemCount(x) > 0 then
- for j=1,16 do
- turtle.select(x)
- turtle.transferTo(j)
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == z then
- turtle.select(i)
- turtle.transferTo(x)
- end
- end
- end
- end
- function allesnachoben(x)
- if turtle.getItemCount(x) > 0 then
- turtle.select(x)
- if x > 3 then
- turtle.transferTo(x-1)
- turtle.transferTo(x-2)
- turtle.transferTo(x-3)
- end
- end
- end
- function Sortieren()
- Sortieren1(16,"minecraft:coal")
- Sortieren1(15,"minecraft:stonebrick")
- Sortieren1(14,"minecraft:stone")
- Sortieren1(13,"minecraft:cobblestone")
- Sortieren1(12,"minecraft:fence")
- Sortieren1(11,"minecraft:torch")
- Sortieren1(10,"minecraft:stick")
- Sortieren1(9,"minecraft:chest")
- Sortieren1(8,"minecraft:log")
- Sortieren1(7,"minecraft:planks")
- Sortieren1(6,"minecraft:oak_stairs")
- Sortieren1(5,"minecraft:sapling")
- print("Sortiert")
- end
- function Sortieren2()
- Sortieren1(16,"minecraft:coal")
- Sortieren1(15,"minecraft:stonebrick")
- Sortieren1(14,"minecraft:dirt")
- Sortieren1(13,"minecraft:cobblestone")
- Sortieren1(12,"minecraft:water_bucket")
- Sortieren1(11,"minecraft:water_bucket")
- Sortieren1(10,"minecraft:lava_bucket")
- Sortieren1(9,"minecraft:chest")
- Sortieren1(8,"minecraft:log")
- Sortieren1(7,"minecraft:planks")
- Sortieren1(6,"minecraft:furnace")
- Sortieren1(5,"minecraft:sapling")
- print("Sortiert")
- end
- function Dropa()
- forward()
- forward()
- for i=1,4 do
- turtle.select(i)
- turtle.dropUp()
- end
- back()
- back()
- end
- function Dropb()
- for i=4,16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- end
- function Dropc()
- turtle.select(4)
- turtle.dropUp()
- turtle.select(8)
- turtle.dropUp()
- turtle.select(12)
- turtle.dropUp()
- turtle.select(13)
- turtle.dropUp()
- turtle.select(14)
- turtle.dropUp()
- turtle.select(15)
- turtle.dropUp()
- turtle.select(16)
- turtle.dropUp()
- turtle.select(1)
- end
- --(Craft)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- function CraftBretter()
- if turtle.getItemCount(8) > 5 and turtle.getItemCount(7) < 45 then
- turtle.select(8)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(8)
- turtle.select(8)
- turtle.transferTo(1,5)
- turtle.select(8)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Bretter hergestellt")
- end
- end
- function CraftStein()
- if turtle.getItemCount(14) > 20 and turtle.getItemCount(15) < 45 then
- turtle.select(14)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14,20)
- turtle.select(14)
- turtle.transferTo(1,5)
- turtle.select(14)
- turtle.transferTo(2,5)
- turtle.select(14)
- turtle.transferTo(5,5)
- turtle.select(14)
- turtle.transferTo(6,5)
- turtle.select(15)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Steinziegel hergestellt")
- end
- end
- function CraftStick()
- if turtle.getItemCount(7) > 6 and turtle.getItemCount(15) < 45 then
- turtle.select(7)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14,6)
- turtle.select(14)
- turtle.transferTo(1,3)
- turtle.select(14)
- turtle.transferTo(5,3)
- turtle.select(10)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Stick hergestellt")
- end
- end
- function Craftfence()
- if turtle.getItemCount(10) > 36 and turtle.getItemCount(12) < 44 then
- turtle.select(10)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(5,6)
- turtle.select(14)
- turtle.transferTo(6,6)
- turtle.select(14)
- turtle.transferTo(7,6)
- turtle.select(14)
- turtle.transferTo(9,6)
- turtle.select(14)
- turtle.transferTo(10,6)
- turtle.select(14)
- turtle.transferTo(11,6)
- turtle.select(15)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Dropc()
- Suck()
- Sortieren()
- Dropa()
- print("Fence hergestellt")
- end
- end
- function Craftchest()
- if turtle.getItemCount(7) > 8 and turtle.getItemCount(9) < 19 then
- turtle.select(7)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(1,1)
- turtle.select(14)
- turtle.transferTo(2,1)
- turtle.select(14)
- turtle.transferTo(3,1)
- turtle.select(14)
- turtle.transferTo(5,1)
- turtle.select(14)
- turtle.transferTo(7,1)
- turtle.select(14)
- turtle.transferTo(9,1)
- turtle.select(14)
- turtle.transferTo(10,1)
- turtle.select(14)
- turtle.transferTo(11,1)
- turtle.select(14)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Kiste hergestellt")
- end
- end
- function Craftchest1()
- if turtle.getItemCount(7) > 8 and turtle.getItemCount(9) < 19 then
- turtle.select(7)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(1,1)
- turtle.select(14)
- turtle.transferTo(2,1)
- turtle.select(14)
- turtle.transferTo(3,1)
- turtle.select(14)
- turtle.transferTo(5,1)
- turtle.select(14)
- turtle.transferTo(7,1)
- turtle.select(14)
- turtle.transferTo(9,1)
- turtle.select(14)
- turtle.transferTo(10,1)
- turtle.select(14)
- turtle.transferTo(11,1)
- turtle.select(14)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren2()
- Dropa()
- print("Kiste hergestellt")
- end
- end
- function Craftofen()
- if turtle.getItemCount(13) then
- turtle.select(13)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(1,2)
- turtle.select(14)
- turtle.transferTo(2,2)
- turtle.select(14)
- turtle.transferTo(3,2)
- turtle.select(14)
- turtle.transferTo(5,2)
- turtle.select(14)
- turtle.transferTo(7,2)
- turtle.select(14)
- turtle.transferTo(9,2)
- turtle.select(14)
- turtle.transferTo(10,2)
- turtle.select(14)
- turtle.transferTo(11,2)
- turtle.select(14)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren2()
- Dropa()
- print("Ofen hergestellt")
- end
- end
- function Craftstairs()
- if turtle.getItemCount(7) > 18 and turtle.getItemCount(6) < 45 then
- turtle.select(7)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(3,3)
- turtle.select(14)
- turtle.transferTo(6,3)
- turtle.select(14)
- turtle.transferTo(7,3)
- turtle.select(14)
- turtle.transferTo(9,3)
- turtle.select(14)
- turtle.transferTo(10,3)
- turtle.select(14)
- turtle.transferTo(11,3)
- turtle.select(14)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Holztreppe hergestellt")
- end
- end
- function Crafttorch()
- if turtle.getItemCount(10) > 5 and turtle.getItemCount(16) > 20 and turtle.getItemCount(11) < 45 then
- turtle.select(10)
- turtle.transferTo(1)
- turtle.select(16)
- turtle.transferTo(2)
- Dropb()
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(2)
- turtle.transferTo(15)
- turtle.select(14)
- turtle.transferTo(5,5)
- turtle.select(15)
- turtle.transferTo(1,5)
- turtle.select(14)
- Dropc()
- turtle.craft()
- turtle.select(1)
- Drop()
- Suck()
- Sortieren()
- Dropa()
- print("Fackel hergestellt")
- end
- end
- -----------------------------------------------------------
- function CraftStoneslab()
- turtle.select(16)
- turtle.refuel(3)
- up()
- up()
- turtle.select(13)
- turtle.transferTo(1)
- Dropb()
- turtle.select(1)
- turtle.transferTo(13)
- turtle.select(13)
- turtle.transferTo(1,5)
- turtle.select(13)
- turtle.transferTo(2,5)
- turtle.select(13)
- turtle.transferTo(3,5)
- turtle.select(5)
- Dropb()
- turtle.craft()
- down()
- down()
- end
- --(End Craft)----------------------------------------------------------------------------------------------------------------------------
- function Invi()
- up()
- up()
- Drop()
- Suck()
- Sortieren()
- Dropa()
- CraftStein()
- CraftStein()
- if turtle.getItemCount(16) > 19 and zaehler7 > 0 then
- CraftBretter()
- CraftStick()
- Craftfence()
- Craftchest()
- Craftstairs()
- Crafttorch()
- end
- down()
- down()
- end
- function Invi1()
- up()
- up()
- Drop()
- Suck()
- Sortieren()
- Dropa()
- down()
- down()
- end
- function Ofen()
- up()
- turtle.turnRight()
- --(Kohle nr1)--
- ofenbef()
- turtle.turnRight()
- --(Kohle nr.2)--
- ofenbef1()
- up()
- forward()
- --(Ofen nr1)--
- Steinofenbef()
- turtle.turnRight()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- forward()
- --(Ofen nr2)--
- Holzofenbef()
- turtle.turnRight()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- down()
- down()
- back()
- Steinofenent()
- forward()
- turtle.turnRight()
- forward()
- Holzofenent()
- back()
- turtle.turnLeft()
- end
- function ring()
- turtle.select(13)
- for i= 1,4 do
- turtle.turnRight()
- turtle.place()
- end
- turtle.select(1)
- end
- function baucobble1()
- if not turtle.detect() then
- turtle.select(13)
- turtle.place()
- end
- end
- function baucobble()
- turtle.turnLeft()
- forward()
- forward()
- ring()
- up()
- ring()
- up()
- turtle.turnRight()
- forward()
- forward()
- turtle.turnRight()
- forward()
- forward()
- down()
- down()
- ring()
- up()
- ring()
- up()
- forward()
- turtle.turnRight()
- forward()
- down()
- turtle.select(13)
- turtle.placeDown()
- up()
- forward()
- forward()
- turtle.turnRight()
- down()
- down()
- forward()
- turtle.select(13)
- turtle.place()
- turtle.turnRight()
- forward()
- turtle.select(1)
- --(Standart Code end)--
- up()
- up()
- turtle.turnLeft()
- forward()
- forward()
- forward()
- turtle.turnRight()
- forward()
- forward()
- down()
- down()
- turtle.digDown()
- down()
- turtle.select(13)
- turtle.placeDown()
- turtle.turnLeft()
- baucobble1()
- turtle.turnLeft()
- baucobble1()
- turtle.turnLeft()
- turtle.dig()
- forward()
- turtle.placeDown()
- turtle.turnRight()
- baucobble1()
- turtle.turnLeft()
- baucobble1()
- turtle.turnLeft()
- turtle.dig()
- forward()
- turtle.placeDown()
- turtle.turnRight()
- baucobble1()
- turtle.turnLeft()
- baucobble1()
- turtle.turnLeft()
- turtle.dig()
- forward()
- turtle.placeDown()
- baucobble1()
- turtle.turnRight()
- baucobble1()
- back()
- up()
- turtle.select(11)
- turtle.placeDown()
- forward()
- turtle.turnRight()
- forward()
- turtle.select(12)
- turtle.placeDown()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- turtle.select(11)
- turtle.placeDown()
- sleep(2)
- turtle.select(12)
- turtle.placeDown()
- --(---)--
- up()
- up()
- back()
- back()
- turtle.turnRight()
- forward()
- turtle.select(11)
- turtle.placeDown()
- forward()
- turtle.turnLeft()
- forward()
- turtle.select(10)
- turtle.placeDown()
- turtle.turnRight()
- forward()
- turtle.turnLeft()
- forward()
- turtle.select(12)
- turtle.placeDown()
- back()
- back()
- down()
- down()
- print("Cobblegenerator gebaut !!")
- end
- function baukiste()
- Sortieren1(1,"minecraft:chest")
- if turtle.getItemDetail(1).name == "minecraft:chest" then
- else
- turtle.select(1)
- turtle.dropUp()
- baukiste()
- print("Falsches Iteam im Slot Nr 1 oder zuwenig Kisten !")
- end
- Sortieren1(1,"minecraft:chest")
- Sortieren1(2,"minecraft:furnace")
- Sortieren1(13,"minecraft:cobblestone")
- if turtle.getItemCount(1) > 1 and turtle.getItemCount(2) > 1 and turtle.getItemCount(13) > 17 then
- up()
- up()
- turtle.select(1)
- turtle.placeUp()
- forward()
- forward()
- turtle.placeUp()
- back()
- back()
- down()
- turtle.turnRight()
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- down()
- else
- print("------------------------------")
- print("WARNUNG")
- print("Fuege 2 Kisten und 2 Ofen hinzu")
- print("Zudem mindistens 18 Cobblestone")
- print("ein paar Setzlinge")
- print("und genug Fuel")
- print("------------------------------")
- sleep(5)
- baukiste()
- zaehler3 = 4
- end
- end
- function slap(xy)
- for i= 1,xy do
- for i= 1,4 do
- forward()
- end
- turtle.placeUp()
- end
- end
- function baufarm()
- if turtle.getItemCount(13) > 14 then
- CraftStoneslab()
- back()
- back()
- for i= 1,7 do
- up()
- end
- forward()
- forward()
- forward()
- turtle.turnRight()
- slap(11)
- turtle.turnRight()
- for i= 1,5 do
- forward()
- end
- turtle.turnRight()
- turtle.placeUp()
- slap(10)
- for i= 1,4 do
- forward()
- end
- for i= 1,7 do
- down()
- end
- turtle.turnRight()
- for i= 1,4 do
- forward()
- end
- end
- end
- function ringbau(xy)
- for i=1,xy do
- forward()
- success, data = turtle.inspectDown()
- if (success and data.name=="minecraft:stonebrick") then
- else
- turtle.digDown()
- turtle.select(15)
- turtle.placeDown()
- end
- end
- end
- function bauring()
- if turtle.getItemCount(16) > 8 then
- print("baue am Ring weiter")
- ringbau(7)
- turtle.turnRight()
- ringbau(57)
- turtle.turnRight()
- ringbau(57)
- turtle.turnRight()
- ringbau(57)
- turtle.turnRight()
- ringbau(50)
- if turtle.getItemCount(15) > 0 then
- turtle.select(7)
- turtle.digDown()
- turtle.placeDown()
- end
- end
- end
- function ring10()
- if turtle.getItemCount(15) > 45 and turtle.getItemCount(16) > 30 then
- print("Check ob Ring gebaut ist")
- back()
- back()
- turtle.turnLeft()
- for i= 1,5 do
- forward()
- end
- success, data = turtle.inspect()
- if (success and data.name=="minecraft:planks") then
- turtle.turnRight()
- success, data = turtle.inspectDown()
- if (success and data.name=="minecraft:planks") then
- print("Ring vorhanden")
- zaehler6 = 45
- zaehler7 = 1
- else
- bauring()
- end
- -- gehe zurück
- turtle.turnRight()
- for i= 1,5 do
- forward()
- end
- turtle.turnLeft()
- forward()
- forward()
- else
- ebnen2()
- end
- end
- end
- --(Start)---------------------------------------------------
- function scann()
- success, data = turtle.inspectUp()
- if (success and data.name=="minecraft:cobblestone") then
- turtle.digUp()
- zaehler5 = 1
- Start3()
- end
- end
- function x01()
- zaehler4 = 31
- for i=1,30 do
- if zaehler5 == 0 then
- zaehler4 = zaehler4 - 1
- scann()
- shell.run( "clear" )
- print("------------------------------")
- print("Baue einen Cobble ueber mich um einen ersten Start auszufuehren !!")
- print("------------------------------")
- print(" "..zaehler4.." Sek automatischer Start")
- print("------------------------------")
- sleep(1)
- end
- end
- if zaehler5 == 0 then
- success, data = turtle.inspectUp()
- if (success and data.name=="minecraft:cobblestone") then
- turtle.digUp()
- zaehler5 = 1
- Start3()
- else
- Startup()
- end
- end
- end
- function Start3()
- Start4()
- Start2()
- craftstart()
- Start7()
- Start6()
- Start()
- end
- function ebnen2()
- forward2()
- forward2()
- forward2()
- turtle.turnLeft()
- for i=1,53 do
- forward2()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- ebnen3()
- turtle.turnRight()
- for i=1,63 do
- forward2()
- end
- turtle.turnRight()
- print("Flaeche ist Eben")
- for i=1,53 do
- forward2()
- end
- Sortieren1(7,"minecraft:planks")
- turtle.turnLeft()
- turtle.select(7)
- turtle.place()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- for i=1,8 do
- forward2()
- end
- turtle.turnLeft()
- forward()
- forward()
- zaehler14 = 1
- end
- function Start7()
- for i=1,48 do
- forward2()
- end
- end
- function scann1()
- zaehler9 = 0
- zaehler10 = zaehler10 +1
- zaehler12 = turtle.getFuelLevel()
- zaehler13 = 1/(((64*16)-32)/100)
- zaehler11 = zaehler10 * zaehler13
- shell.run( "clear" )
- print("---------------------------------------")
- print(" Flaeche ebnen")
- print("---------------------------------------")
- print(" Block: Fuel Status: % Status: ")
- print(" "..zaehler10.." "..zaehler12.." "..zaehler11.."")
- print("---------------------------------------")
- success, data = turtle.inspectDown()
- if (success and data.name== "minecraft:grass") then
- else
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- end
- for i=1,8 do
- success, data = turtle.inspectUp()
- if (success and data.name== wasser1) then
- print("Wasserquelle")
- up()
- zaehler9 = zaehler9 +1
- end
- success, data = turtle.inspectUp()
- if (success and data.name== "minecraft:lava") then
- print("Lavaquelle")
- Sortieren1(2,"minecraft:bucket")
- if turtle.getItemCount(2) > 0 then
- turtle.select(2)
- turtle.placeUp()
- turtle.refuel()
- up()
- zaehler9 = zaehler9 +1
- end
- Sortieren2()
- Dropa()
- Sortieren1(1,"minecraft:dirt")
- end
- if turtle.detectUp() then
- turtle.digUp()
- up()
- zaehler9 = zaehler9 +1
- end
- end
- while zaehler9 > 0 do
- down()
- zaehler9 = zaehler9 -1
- end
- end
- function scann2()
- zaehler9 = 0
- zaehler10 = zaehler10 +1
- zaehler12 = turtle.getFuelLevel()
- zaehler13 = 1/(((64*48-252))/100)
- zaehler11 = zaehler10 * zaehler13
- shell.run( "clear" )
- print("---------------------------------------")
- print(" Flaeche ebnen")
- print("---------------------------------------")
- print(" Block: Fuel Status: % Status: ")
- print(" "..zaehler10.." "..zaehler12.." "..zaehler11.."")
- print("---------------------------------------")
- success, data = turtle.inspectDown()
- if (success and data.name== "minecraft:grass") then
- else
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- end
- for i=1,8 do
- success, data = turtle.inspectUp()
- if (success and data.name== wasser1) then
- print("Wasserquelle")
- up()
- zaehler9 = zaehler9 +1
- end
- success, data = turtle.inspectUp()
- if (success and data.name== "minecraft:lava") then
- print("Lavaquelle")
- Sortieren1(2,"minecraft:bucket")
- if turtle.getItemCount(2) > 0 then
- turtle.select(2)
- turtle.placeUp()
- turtle.refuel()
- up()
- zaehler9 = zaehler9 +1
- end
- Sortieren2()
- Dropa()
- Sortieren1(1,"minecraft:dirt")
- end
- if turtle.detectUp() then
- turtle.digUp()
- up()
- zaehler9 = zaehler9 +1
- end
- end
- while zaehler9 > 0 do
- down()
- zaehler9 = zaehler9 -1
- end
- end
- function runde1()
- Sortieren2()
- Dropa()
- Sortieren1(1,"minecraft:dirt")
- scann1()
- end
- function runde2()
- Sortieren1(1,"minecraft:dirt")
- scann1()
- for i=1,15 do
- forward2()
- scann1()
- end
- end
- function Start6()
- for i=1,31 do
- runde2()
- turtle.turnRight()
- forward2()
- Sortieren2()
- Dropa()
- Sortieren1(1,"minecraft:dirt")
- scann1()
- turtle.turnRight()
- runde2()
- turtle.turnLeft()
- forward2()
- Sortieren1(1,"minecraft:dirt")
- scann1()
- turtle.turnLeft()
- end
- runde2()
- turtle.turnRight()
- forward2()
- Sortieren1(1,"minecraft:dirt")
- scann1()
- turtle.turnRight()
- runde2()
- turtle.turnRight()
- for i=1,63 do
- forward2()
- end
- turtle.turnRight()
- print("Flaeche ist Eben")
- zaehler9 = 0
- zaehler10 = 0
- Sortieren1(1,"minecraft:chest")
- for i= 1,5 do
- forward()
- end
- turtle.turnRight()
- for i= 1,8 do
- forward()
- end
- turtle.turnLeft()
- forward()
- forward()
- end
- function ebnen4()
- Sortieren1(1,"minecraft:dirt")
- scann2()
- for i=1,47 do
- forward2()
- scann2()
- end
- end
- function ebnen3()
- for i=1,31 do
- ebnen4()
- turtle.turnRight()
- forward2()
- Sortieren2()
- Sortieren1(11,"minecraft:dirt")
- Dropa()
- Sortieren1(1,"minecraft:dirt")
- scann2()
- turtle.turnRight()
- ebnen4()
- turtle.turnLeft()
- forward2()
- Sortieren1(1,"minecraft:dirt")
- scann2()
- turtle.turnLeft()
- end
- ebnen4()
- turtle.turnRight()
- forward2()
- Sortieren1(1,"minecraft:dirt")
- scann2()
- turtle.turnRight()
- ebnen4()
- end
- function Start4()
- shell.run( "clear" )
- print("------------------------------")
- print(" Erster Start 1/3 ")
- print("------------------------------")
- sleep(2)
- print("Turtle Programm von Lord94")
- sleep(2)
- print("Version "..Version.." ")
- print("------------------------------")
- sleep(2)
- print("Ist der Turtle ein Crafting")
- print("und Mining Turtle ?")
- print("(Also mit Werkbank und")
- print("Dia-Spitzhacke ?)")
- print("------------------------------")
- print("Druecke Enter fuer JA")
- sleep(1)
- shell.run( "clear" )
- print("------------------------------")
- print(" Erster Start 1/3 ")
- print("------------------------------")
- print("Turtle Programm von Lord94")
- print("Version "..Version.." ")
- print("------------------------------")
- print("Ist der Turtle ein Crafting")
- print("und Mining Turtle ?")
- print("(Also mit Werkbank und")
- print("Dia-Spitzhacke ?)")
- print("------------------------------")
- print("Druecke Enter fuer JA -")
- sleep(1)
- shell.run( "clear" )
- print("------------------------------")
- print(" Erster Start 1/3 ")
- print("------------------------------")
- print("Turtle Programm von Lord94")
- print("Version "..Version.." ")
- print("------------------------------")
- print("Ist der Turtle ein Crafting")
- print("und Mining Turtle ?")
- print("(Also mit Werkbank und")
- print("Dia-Spitzhacke ?)")
- print("------------------------------")
- print("Druecke Enter fuer JA --")
- sleep(1)
- shell.run( "clear" )
- print("------------------------------")
- print(" Erster Start 1/3 ")
- print("------------------------------")
- print("Turtle Programm von Lord94")
- print("Version "..Version.." ")
- print("------------------------------")
- print("Ist der Turtle ein Crafting")
- print("und Mining Turtle ?")
- print("(Also mit Werkbank und")
- print("Dia-Spitzhacke ?)")
- print("------------------------------")
- print("Druecke Enter fuer JA -->")
- ein1 = io.read()
- if not ein1 == "" then
- shell.run( "clear" )
- print("------------------------------")
- print("Bitte baue mich ab und ")
- print("gebe mir ein Werkbank und eine")
- print("Spitzhacke")
- print("------------------------------")
- sleep(5)
- reboot()
- end
- for i=1,16 do
- shell.run( "clear" )
- print("------------------------------")
- print(" Ort 2/3 ")
- print("------------------------------")
- print("Befindet |----- ----- ----- -----|")
- print("sich der | | | | |")
- print("Turtle | | | | |")
- print("links |----- ----- ----- -----|")
- print("unten | 1 | 2 | 3 | 4 |")
- print("von 4x4 | | | | |")
- print("Chunks ? |-----------------------|")
- print("Druecke Enter fuer JA -->")
- sleep(0.2)
- shell.run( "clear" )
- print("------------------------------")
- print(" Ort 2/3 ")
- print("------------------------------")
- print("Befindet |----- ----- ----- -----|")
- print("sich der | | | | |")
- print("Turtle | | | | |")
- print("links |----- ----- ----- -----|")
- print("unten | 1 | 2 | 3 | 4 |")
- print("von 4x4 |X | | | |")
- print("Chunks ? |-----------------------|")
- print("Druecke Enter fuer JA -->")
- sleep(0.2)
- end
- ein1 = io.read()
- if not ein1 == "" then
- end
- --<<<<<<<<<(Text am Start)
- end
- function Start2()
- shell.run( "clear" )
- print("------------------------------")
- print(" Materialien 3/3 ")
- print("------------------------------")
- print("Fuege hinzu:")
- print("- mindistens 34 Cobblestone")
- print("- mindistens 34 Holzbretter")
- print("- mindistens 20 Kohle")
- print("- 2 Wasser Eimer und 1 Lava Eimer")
- print("- ein paar Setzlinge (ca.10)")
- print("- und ein wenig Erde")
- print("------------------------------")
- sleep(2)
- print("Sortiere ... (30Sek)")
- sleep(2)
- Sortieren2()
- if turtle.getItemCount(13) > 33 and turtle.getItemCount(7) > 33 and turtle.getItemCount(12) > 0 and turtle.getItemCount(11) > 0 and turtle.getItemCount(10) > 0 and turtle.getItemCount(16) > Kohleanz then
- shell.run( "clear" )
- print("------------------------------")
- print("Habe alle Materialien")
- print("------------------------------")
- print("Ab jetzt arbeitet der Turtle")
- print("Automatisch. ")
- sleep(2)
- print("")
- print("Baue einen Chunkloader")
- print("oder bleibe fuer mindistens")
- print("2h in der Naehe")
- print("------------------------------")
- sleep(2)
- else
- Sortieren2()
- Start2()
- end
- end
- function craftstart()
- Dropa()
- turtle.select(13)
- for i=1,4 do
- turtle.place()
- turtle.turnRight()
- end
- up()
- turtle.select(1)
- turtle.dig()
- Dropa()
- turtle.select(7)
- turtle.transferTo(1)
- for i=4,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- turtle.transferTo(14)
- turtle.select(14)
- turtle.transferTo(1,1)
- turtle.select(14)
- turtle.transferTo(2,1)
- turtle.select(14)
- turtle.transferTo(3,1)
- turtle.select(14)
- turtle.transferTo(5,1)
- turtle.select(14)
- turtle.transferTo(7,1)
- turtle.select(14)
- turtle.transferTo(9,1)
- turtle.select(14)
- turtle.transferTo(10,1)
- turtle.select(14)
- turtle.transferTo(11,1)
- turtle.select(14)
- turtle.select(4)
- turtle.dropDown()
- turtle.select(8)
- turtle.dropDown()
- turtle.select(12)
- turtle.dropDown()
- turtle.select(13)
- turtle.dropDown()
- turtle.select(14)
- turtle.dropDown()
- turtle.select(15)
- turtle.dropDown()
- turtle.select(16)
- turtle.dropDown()
- turtle.select(1)
- turtle.craft()
- turtle.select(1)
- turtle.placeUp()
- for i=1,16 do
- turtle.suckDown()
- end
- Drop()
- Suck()
- Sortieren2()
- print("Kiste hergestellt")
- down()
- for i=1,4 do
- turtle.dig()
- turtle.turnRight()
- end
- up()
- Craftchest1()
- Craftofen()
- turtle.digUp()
- down()
- end
- function Start()
- turtle.turnRight()
- forward()
- turtle.turnLeft()
- sleep(1)
- success, data = turtle.inspect()
- if (success and data.name=="minecraft:cobblestone") then
- print("Cobblegenerator vorhanden")
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- baukiste()
- baucobble()
- Invi1()
- abbauen()
- Invi1()
- baufarm()
- zaehler3 = 3
- Invi1()
- Baumlinie1()
- end
- end
- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- function Startup()
- success, data = turtle.inspectDown()
- if(success and data.name=="minecraft:stonebrick") then
- print("Sucherlinie gefunden")
- folgesucherlinie()
- else
- for i=1,5 do
- down1()
- end
- forward1()
- refuel()
- Startup()
- end
- end
- function folgesucherlinie()
- forward1()
- success, data = turtle.inspectDown()
- if(success and data.name=="minecraft:planks") then
- turtle.turnRight()
- for i= 1,5 do
- forward()
- end
- turtle.turnLeft()
- forward()
- forward()
- print("Bin bei der Station")
- else
- success, data = turtle.inspectDown()
- if(success and data.name=="minecraft:stonebrick") then
- folgesucherlinie()
- else
- back()
- turtle.turnRight()
- folgesucherlinie()
- end
- end
- end
- function fuelfuellen()
- if zaehler14 == 0 then
- if turtle.getFuelLevel() < 19500 and turtle.getItemCount(16) > 40 then
- if turtle.getItemDetail(16).name == "minecraft:coal" then
- turtle.select(16)
- turtle.refuel(10)
- else
- print("Falsches Iteam im Slot 16")
- Sortieren()
- end
- end
- end
- end
- --(Programm)------------------------------------------
- x01()
- fuellevel = 400
- while true do
- Invi()
- abbauen()
- Ofen()
- Invi()
- turtle.select(16)
- turtle.refuel(3)
- Ofen()
- Invi()
- Baumlinie1()
- Invi()
- fuelfuellen()
- ring10()
- zaehler = zaehler +1
- print("-------------------------------")
- print("-------------------------------")
- print("Runde " ..zaehler.. "")
- print("Schritte " ..zaehler1.. "")
- print("-------------------------------")
- print("-------------------------------")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement