Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Drop
- -- by SukaiPoppuGo
- --
- -- Require mod plethora
- --
- ------------------------------
- -- pause at startup
- print("init")
- sleep(os.clock()<2 and 2 or 0)
- print("run")
- ------------------------------
- -- Params
- local dir = ...
- assert(dir, "Usage: Drop <string:dir>\nex:\nDrop up")
- -- Base delay, min delay each loop
- local delay = .1
- ------------------------------
- -- Peripheral
- local p = peripheral.find("minecraft:chest")
- assert(p,"Hopper not found")
- ------------------------------
- -- Main
- repeat
- local count = 0
- for slot,item in pairs(p.list()) do
- print("Drop slot",slot,"to",dir)
- p.drop(slot,64,dir)
- count = count+1
- end
- local _d = math.max(delay, delay*count)
- print("Pause", _d, "sec")
- sleep(_d)
- until false
Add Comment
Please, Sign In to add comment