Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Charging Station Item Switch
- --Assign Top Machine to peripheral p
- p = peripheral.wrap("top")
- --get energy stored in top peripheral item in Slot 1
- topEnergyStored = p.getStackInSlot(1).energy_te
- --get the bottom peripheral
- u = peripheral.wrap("bottom")
- while true do
- if (topEnergyStored <= 500000) then
- --pull and push is reversed because its the machine doing the action and not the turtle
- --So its the machine pushing and pulling not the turtle
- p.pushItem("down",1)
- turtle.select(2)
- u.pushItem("up",3)
- p.pullItem("down",2)
- turtle.select(1)
- u.pullItem("up",1)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement