Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- local MFSUsensor = sensor.wrap("bottom")
- local MFSU = MFSUsensor.getTargetDetails("0,0,1")
- local ChestSensor = sensor.wrap("top")
- local CHEST = ChestSensor.getTargetDetails("-1,-3,0")
- local poweriron = 256
- local powergold = 512
- local powerdia = 1024
- local poweruranium = 1400
- local powercopper = 1200
- local tempamountofiron = 0
- local tempamountofgold = 0
- local tempamountofdia = 0
- local tempamountofuranium = 0
- local tempamountofcopper = 0
- local amountofiron = 0
- local amountofgold = 0
- local amountofdia = 0
- local amountofuranium = 0
- local amountofcopper = 0
- while true do
- os.startTimer(1)
- os.pullEvent("timer")
- for i = 1,54 do
- tempamountofiron = 0
- tempamountofgold = 0
- tempamountofdia = 0
- tempamountofuranium = 0
- tempamountofcopper = 0
- if CHEST["Slots"][i]["Name"] == "Iron Ore" then
- tempamountofiron = tempamountofiron + CHEST["Slots"][i]["Size"]
- end
- if CHEST["Slots"][i]["Name"] == "Gold Ore" then
- tempamountofgold = tempamountofgold + CHEST["Slots"][i]["Size"]
- end
- if CHEST["Slots"][i]["Name"] == "Diamond Ore" then
- tempamountofdia = tempamountofdia + CHEST["Slots"][i]["Size"]
- end
- if CHEST["Slots"][i]["Name"] == "Uranium Ore" then
- tempamountofuranium = tempamountofuranium + CHEST["Slots"][i]["Size"]
- end
- if CHEST["Slots"][i]["Name"] == "Copper Ore" then
- tempamountofcopper = tempamountofcopper + CHEST["Slots"][i]["Size"]
- end
- if tempamountofuranium > amountofuranium then
- local newamount = tempamountofuranium - amountofuranium
- amountofuranium = tempamountofuranium
- print("New amount of uranium ="..newamount)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement