Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- momfuellevel = 0
- aufsammeln = 40
- fuellevel = 100
- count = 0
- anzahl1 = 0
- anzahl2 = 0
- treeblock = "minecraft:log"
- steinblock = "minecraft:cobblestone"
- chestdistance = 5
- j = 0
- -- (Standart)--
- function forward()
- refuel()
- while(turtle.forward()==false) do
- print("WARNUNG Block im Weg !!")
- turtle.attack()
- sleep(2)
- end
- end
- function up()
- refuel()
- while(turtle.up()==false) do
- if turtle.detectUp() then
- turtle.digUp()
- end
- 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 refuel()
- if(turtle.getFuelLevel() < fuellevel) then
- turtle.select(16)
- if turtle.getItemCount(16) > 0 then
- turtle.refuel(1)
- momfuellevel = turtle.getFuelLevel()
- print("Aufgetankt "..momfuellevel.." Fuel im Tank")
- else
- print("WARNUNG KEIN FUEL (Slot 16) ")
- sleep(1)
- for i=1,4 do
- turtle.turnRight()
- end
- refuel()
- sleep(1)
- end
- turtle.select(1)
- 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()
- success, data = turtle.inspect()
- if (success and data.name==steinblock) then
- print("Cobblegenerator Vorhanden")
- else
- print("kein Cobblegenerator vorhanden !")
- 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(Slot 13) ")
- end
- end
- function fell()
- count = count + 1
- print("Baum Nr. " ..count.. " wird gefaellt!")
- while(turtle.forward()==false) do
- turtle.dig()
- end
- success, data = turtle.inspectUp()
- while(success and data.name==treeblock) do
- turtle.digUp()
- up()
- success, data = turtle.inspectUp()
- end
- while(turtle.down()) do end
- while(turtle.back()==false) do end
- end
- function place()
- if turtle.getItemCount(4) > 1 then
- turtle.select(4)
- turtle.place()
- turtle.select(1)
- end
- end
- function collect()
- for i=1,4 do
- turtle.suck()
- turtle.turnRight()
- end
- end
- function Steinofenbef()
- if turtle.getItemCount(13) > 20 then
- turtle.select(13)
- turtle.dropUp(19)
- turtle.select(1)
- end
- end
- function Steinofenent()
- if turtle.getItemCount(14) < 50 then
- turtle.select(14)
- turtle.suckUp(10)
- turtle.select(1)
- end
- end
- function CraftStein()
- Stein = turtle.getItemCount(15)
- if turtle.getItemCount(14) > 1 and turtle.getItemCount(15) < 50 then
- Stein = Stein - 63
- Stein = Stein /4
- turtle.select(14)
- turtle.transferTo(1,Stein)
- turtle.select(14)
- turtle.transferTo(2,Stein)
- turtle.select(14)
- turtle.transferTo(5,Stein)
- turtle.select(14)
- turtle.transferTo(6,Stein)
- turtle.select(15)
- turtle.craft(Stein)
- turtle.select(1)
- end
- end
- CraftStein()
- print("1")
- sleep(10)
- CraftStein()
- print("2")
- sleep(10)
- CraftStein()
- print("3")
- sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement