Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Inventory Manager (Sender)
- Written by TheShadow989
- ]]--
- --[[
- Modem Channels (Inverse of Receiver)
- senderChannel = Unique channel number used for modem communication.
- replyChannel = Unique channel for this computer to reply back.
- ]]--
- local senderChannel = 2
- local replyChannel = 1
- --[[
- Menu Options Array
- ]]--
- local menuOptions =
- {
- [1] = {menuName="Mob", display="enabled", status="OFF"},
- [2] = {menuName="Mining", display="enabled", status="OFF"},
- [3] = {menuName="Option3", display="disabled", status="OFF"},
- [4] = {menuName="Option4", display="disabled", status="OFF"},
- [5] = {menuName="Option5", display="disabled", status="OFF"},
- }
- local modem = peripheral.wrap("back")
- -- Sender Channel
- modem.open(senderChannel)
- --------------------------------------------------------------------------
- -- PROGRAM LOOP
- --------------------------------------------------------------------------
- while true do
- local e = {os.pullEvent()}
- if e[1] == "modem_message" and e[3] == senderChannel then
- local message
- local index = 1
- for str in string.gmatch(e[5], "[^;]+") do
- message[index] = str
- index = index + 1
- end
- end
- end
Add Comment
Please, Sign In to add comment