Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleep(2)
- print("Start")
- os.loadAPI("ocs/apis/sensor")
- sen = sensor.wrap("left")
- Shard_Of_Minium_Amount = 0
- Reboot_Couter = 0
- s = sen.getTargets()
- function getS()
- for v, k in pairs(s) do
- if k.Name == "ME Wireless Access Point" then
- target = v
- end
- end
- return target
- end
- rs.setOutput("top", true)
- sleep(0.5)
- rs.setOutput("top", false)
- turtle.select(1)
- turtle.drop()
- for i = 3,16 do
- a = turtle.getItemCount(i)
- if a > 0 then
- turtle.select(i)
- turtle.drop()
- end
- end
- while true do
- os.pullEvent = os.pullEventRaw
- f = getS()
- s1 = sen.getTargetDetails(target)
- for v, k in pairs(s1.Items) do
- --sleep(0.1)
- ---ME Inventar Abfrage----
- if k.Name == "Shard of Minium" then
- Shard_Of_Minium_Amount = k.Size
- end
- end
- c = turtle.getItemCount(1)
- if Shard_Of_Minium_Amount >= 4 and c == 1 then
- for i = 3,16 do
- a = turtle.getItemCount(i)
- if a > 0 then
- turtle.select(i)
- turtle.drop()
- end
- end
- rs.setOutput("bottom", true)
- sleep(0.5)
- rs.setOutput("bottom", false)
- sleep(0.5)
- turtle.craft()
- turtle.select(1)
- turtle.drop()
- for i = 3,16 do
- a = turtle.getItemCount(i)
- if a > 0 then
- turtle.select(i)
- turtle.drop()
- end
- end
- os.reboot()
- else
- sleep(1)
- Reboot_Couter = Reboot_Couter + 1
- if Reboot_Couter == 30 then
- os.reboot()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement