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 Drop()
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- turtle.dropUp(i)
- end
- end
- function Suck()
- for i=1,16 do
- turtle.suckUp(i)
- end
- function Sortieren()
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:cobblestone" then
- turtle.select(i)
- turtle.transferTo(13)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:stone" then
- turtle.select(i)
- turtle.transferTo(14)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:stonebrick" then
- turtle.select(i)
- turtle.transferTo(15)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:coal" then
- turtle.select(i)
- turtle.transferTo(16)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:sapling" then
- turtle.select(i)
- turtle.transferTo(4)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:log" then
- turtle.select(i)
- turtle.transferTo(8)
- end
- end
- end
- for i=1,16 do
- if turtle.getItemCount(i) > 0 then
- if turtle.getItemDetail(i).name == "minecraft:planks" then
- turtle.select(i)
- turtle.transferTo(12)
- end
- end
- end
- print("Sortiert")
- end
- function CraftStein()
- while turtle.getItemCount(14) > 5 and turtle.getItemCount(15) < 60 do
- turtle.select(14)
- turtle.transferTo(1,1)
- turtle.select(14)
- turtle.transferTo(2,1)
- turtle.select(14)
- turtle.transferTo(5,1)
- turtle.select(14)
- turtle.transferTo(6,1)
- turtle.select(15)
- turtle.craft()
- turtle.select(1)
- end
- end
- Drop()
- Suck()
- Sortieren()
- CraftStein()
- print("1")
Advertisement
Add Comment
Please, Sign In to add comment