Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Settings]]--
- local redstoneSetting = "left"
- local chestSetting = "right"
- --[[Variables]]--
- local tArgs = {...}
- local redstoneInputSide = tArgs[1] or redstoneSetting
- local chestSide = tArgs[2] or chestSetting
- local chest = peripheral.wrap(chestSide)
- --[[Functions]]--
- function printBoolean(boolean)
- if term.isColor() then
- if boolean then
- term.setTextColor(colors.lime)
- else
- term.setTextColor(colors.red)
- end
- end
- print(boolean)
- if term.isColor() then
- term.setTextColor(colors.white)
- end
- end
- function setChest(boolean)
- if chest.getStackInSlot(1) and not boolean or chest.getStackInSlot(2) and boolean then
- chest.swapStacks(1,2)
- end
- end
- --[[Main program]]--
- while true do
- setChest(rs.getInput(redstoneInputSide))
- shell.run("clear")
- print("EnderSender")
- printBoolean(rs.getInput(redstoneInputSide))
- os.pullEvent("redstone")
- end
Advertisement
Add Comment
Please, Sign In to add comment