Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- component = require("component")
- term = require("term")
- table = require("table")
- sides = require("sides")
- chestAccess = component.inventory_controller
- invAccess = component.transposer
- --made by StormWolf, for any non-profit use only
- --version 00.01
- term.clear()
- print("StormWolf's TeleNet selector client")
- print("--------------------------------------")
- function client ()
- term.setCursor(1,3)
- inventory = { }
- inventory = inventoryScanner()
- --i is starting position for inventory scanner
- i=1
- while i <= 15 do
- term.setCursor(1,i+2)
- term.clearLine()
- print("["..i.."] - "..tostring(inventory[i]))
- i=i+1
- end
- print("--------------------------------------------------")
- while true do
- term.setCursor(1,20)
- print("Input number for desired location followed by enter")
- term.clearLine()
- io.write("or press only enter to refresh list: ")
- location = io.read()
- location = tonumber(location)
- if not location then client() end
- invAccess.transferItem(sides.bottom, sides.top, 1, location, 1)
- os.sleep(5)
- end
- end
- function inventoryScanner()
- size = chestAccess.getInventorySize(sides.top)
- i = 1
- while i<size do
- item = chestAccess.getStackInSlot(sides.top, i)
- if not item then break end
- inventory[i] = tostring(item.label)
- i=i+1
- end
- return inventory
- end
- --actual shit thats executed at instant run:
- client()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement