Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cb = peripheral.wrap("right")
- sb = peripheral.wrap("left")
- lp = peripheral.wrap("back")
- function request( itemID, amount, meta )
- local amount = tostring(amount)
- local meta = tostring(meta)
- local result = lp.getLP().getItemIdentifierBuilder()
- result.setItemID( itemID )
- result.setItemData( meta )
- lp.makeRequest( result.build(), amount )
- end
- request("minecraft:stone",1,1)
- function say(Str)
- sleep(math.random(3,5))
- cb.say(Str,1,false,"Brian")
- sb.speak(Str)
- end
- while true do
- event,name,msg = os.pullEvent("command")
- for i=1,#msg do
- print(msg[i])
- end
- if event == "command" then
- say("Command detected")
- sleep(1)
- if msg[1] == "log" then
- say("Logistics system detected.")
- amount = msg[2]
- item = msg[3]
- data = msg[4]
- print(amount)
- print(item)
- print(data)
- request(amount,item,data)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment