Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- --local itemTrans = component.proxy(component.get("0224"))
- --local me = component.proxy(component.get("4947"))
- local MilkTrans = component.proxy(component.get("8969"))
- local SewageTrans = component.proxy(component.get("9f87"))
- --local loaderInfo = component.proxy(component.get("8b6a"))
- local loaderInfo = component.proxy(component.get("7dfe"))
- local rs = component.redstone
- local colors = require("colors")
- local sides = require("sides")
- local myTable = loaderInfo.getFluidInTank(sides.down)
- print (myTable[1]["amount"],"local")
- --local inUse = false --for later use
- local Milk = MilkTrans
- local Sewage = SewageTrans
- print("Input Fluid Type: Milk,Sewage")
- local fluid = io.read()
- if fluid=="Milk" or fluid=="Sewage" then
- print("Fluid Type", fluid)
- print("Input Amount To Order Max=256000")
- local order = io.read("n")
- print("Order Amount", order)
- else
- print("Incorrect Input")
- end
- --while order > 256000 do
- -- print("The maximum order amount is 256000. The inputted number is too high. Please try again")
- -- order = io.read("n")
- --end
- --This will only execute if the order number is less than 256000
- local function cartRelease()
- rs.setBundledOutput(sides.east, colors.blue, 253)
- os.sleep(1)
- rs.setBundledOutput(sides.east, colors.blue, 0)
- myTable = loaderInfo.getFluidInTank(sides.down)
- print(myTable[1]["amount"],"cartRelease")
- end
- local function loaderCheck()
- while myTable[1]["amount"] > 0 do
- print(myTable[1]["amount"],"loaderCheck1")
- --elseif
- cartRelease()
- os.sleep(60)
- end
- end
- local function getRemainder()
- if myTable[1]["amount"] <= 32000 then
- print(myTable[1]["amount"],"getRemainder")
- end
- end
- -- Changing MilkTrans to fluid
- fluid.transferFluid(sides.north, sides.south, order)
- os.sleep(5)
- cartRelease()
- loaderCheck()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement