Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Table = 1
- local Drive = peripheral.wrap("")
- local MainFrame = peripheral.wrap("")
- local Modem = peripheral.wrap("bottom")
- local TabMod = peripheral.wrap("top")
- local Droper = peripheral.wrap("")
- local function TableTop(item,state)
- if item == "tablet" then
- redstone.setOuput("left",state)
- elseif item == "container" then
- redstone.setOutput("right",state)
- end
- end
- local function CustomerTablet()
- local Path = Drive.getMountPath()
- fs.copy("Menu.txt",fs.combine(Path,"Menu.txt"))
- TableTop("tablet",false)
- repeat
- until Drive.isDiskPresent() == true
- TableTop("Tablet",true)
- fs.copy(fs.combine(Path,"Menu.txt"),"Order.txt")
- return true
- end
- local function CallOrder()
- local file = fs.open("Order.txt","r")
- local Items = textutils.unserialize(file.readAll())
- file.close()
- Modem.open(122)
- Modem.transmit(233,122,textutils.serialize({"Order",Table,Droper}))
- for i = 1, #Items do
- Modem.transmit(233,122,textutils.serialize(Items[i]))
- repeat local a, b, c, d, e = os.pullEvent("modem_message") until e == "completed"
- end
- TableTop("container",false)
- end
- local function ServiceSystem()
- Modem.open(455)
- repeat local a, b, c, d, e = os.pullEvent("modem_message") until e == Table
- TableTop("tablet",true)
- TableTop("container",true)
- if fs.exists("Order.txt") then fs.delete("Order.txt") end
- CustomerTablet()
- CallOrder()
- end
- while true do
- ServiceSystem()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement