Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function man_ovr()
- manual=redstone.getInput("front")
- if manual then
- cell.setEnergySend(100)
- else
- cell.setEnergySend(0)
- end
- end
- function readSlots()
- for i=0,sz-1, 1 do
- end
- -------------------------------------------------
- mon=peripheral.wrap("top")
- i=0
- cell=peripheral.wrap("left")
- note=peripheral.wrap("right")
- while true do
- for i=1,60, 1 do
- man_ovr()
- term.clear()
- term.setCursorPos(1,1)
- p=peripheral.wrap("bottom")
- n=p.getInvName()
- sz=p.getSizeInventory()
- tbl={}
- for i=0, sz-1, 1 do
- tbl[i+1]=p.getStackInSlot(i)
- term.setCursorPos(1,1)
- pct= math.floor((i+1) / 27 * 100)
- print(pct.. "% complete")
- -- mon.addText(3,30,tostring(pct), 0xFFFFFF)
- end
- if tbl then
- slots=#tbl
- mon.clear()
- mon.addText(3,25,tostring(slots).." slots full",0xFFFFFF)
- --note.triggerNote()
- --note.triggerNote()
- --mon.addText(3,20,tostring(60-
- if slots>10 then
- cell = peripheral.wrap("left")
- cell.setEnergySend(100)
- print( cell)
- term.setCursorPos(1,2)
- mon.clear()
- --mon.addText(3,15, tostring(slots),0xFFFFFF)
- mon.addText(3,25, "Emptying Ender Chest", 0xFFFFFF)
- mon.addText(3,45,"Playing Alert",0x669933)
- for itr=1,3,1 do
- note.triggerNote()
- end
- print("Emptying Chest")
- sleep(3)
- cell.setEnergySend(0)
- else
- term.setCursorPos(1,2)
- print("Chest not full")
- print(#tbl.. " slots full")
- cell.setEnergySend(0)
- end
- print ("------------------------")
- --print(m)
- i=i+1
- print(i)
- mon=peripheral.wrap("top")
- --mon.clear()
- mon.addText(3,35, tostring(60-i).." cycles till ME starts up",0xFFFFFF)
- full=slots/27
- --mon.addGradientBox(3,100,10,tostring(full), 0xFFFFFF, 0.5, 0x000000,0.5,2)
- sleep(1)
- end
- end
- cell.setEnergySend(100)
- mon.addText(3, 45, "redstone: ON",0x993333)
- --manual=redston.getInput("front")
- --if manual then
- --cell.setEnergySend(100)
- --else
- --cell.setEnergySend(0)
- --end
- sleep(2)
- cell.setEnergySend(0)
- mon.addText(3, 45, "redstone: OFF", 0x669933)
- end
- while not cell do
- mon.addText(3, 55, "No Cell found", 0x003333)
- sleep(1)
- end
- --end
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement