Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This goes on the Computer that will handle the orders
- --Always name/label computers before working with them example: label set Orders
- --To import into the computer use pastebin get xxxxxx startup
- --startup will be the name of the program and in this case startup will auto execute everytime the computer reboot or the server restarts
- --Wireless modem goes on top by default
- --Use a 5 wide 3 tall advanced monitor on bottom by default
- --Use advanced computer as well
- mon = peripheral.wrap("bottom") --change here if you want monitor in other location right, left, top, bottom
- modem = peripheral.wrap("top") --same here
- local orderChannel = 55 --random channel from 1 to 65000 don't touch unless conflicts with other computers on server
- modem.open(orderChannel)
- function burger()
- modem.transmit(orderChannel, orderChannel, "Burger") --Keyword to get burgers
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --burger function
- function fries()
- modem.transmit(orderChannel, orderChannel, "Fries") --Keyword to get fries
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --fries function
- function soda()
- modem.transmit(orderChannel, orderChannel, "Drinks") --Keyword to get sodas
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --soda function
- function cheese()
- modem.transmit(orderChannel, orderChannel, "CheeseB") --Keyword to get sodas
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --cheese function
- function bacon()
- modem.transmit(orderChannel, orderChannel, "BaconB") --Keyword to get sodas
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --bacon function
- function shake()
- modem.transmit(orderChannel, orderChannel, "Shake") --Keyword to get sodas
- mon.setBackgroundColor(128)
- mon.setCursorPos(6,10)
- mon.write("--Processing--")
- sleep(0.75)
- modem.transmit(orderChannel, orderChannel, "Clear") --Liberating the system
- mon.setCursorPos(6,10)
- mon.write("----Ready-----")
- end --shake function
- function welcome()
- mon.setBackgroundColor(2048)
- mon.clear()
- mon.setTextScale(2)
- mon.setCursorPos(8,1)
- mon.write("Welcome to")
- mon.setCursorPos(8,2)
- mon.write("BamsBurgers")
- mon.setCursorPos(10,4)
- mon.write("Home of")
- mon.setCursorPos(7,5)
- mon.write("the BamBurger")
- mon.setCursorPos(8,6)
- mon.write("Can I take")
- mon.setCursorPos(8,7)
- mon.write("your order?")
- mon.setCursorPos(8,9)
- mon.setBackgroundColor(32768)
- mon.write("Place order")
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if xPos <=15 and xPos >= 5 and yPos <=9 and yPos >=9 then
- mon.setBackgroundColor(2048)
- mon.clear()
- mon.setTextScale(2)
- mon.setCursorPos(8,1)
- mon.write("Right click")
- mon.setCursorPos(7,2)
- mon.write("item to order")
- mon.setBackgroundColor(32768)
- mon.setCursorPos(2,4)
- mon.write("Burger")
- mon.setCursorPos(16,4)
- mon.write("Milkshake")
- mon.setCursorPos(2,6)
- mon.write("CheeseBurger")
- mon.setCursorPos(17,6)
- mon.write("Smoothie")
- mon.setCursorPos(2,8)
- mon.write("BaconBurger")
- mon.setCursorPos(20,8)
- mon.write("Fries")
- mon.setCursorPos(25,1)
- mon.write("X")
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if xPos <=7 and xPos >= 2 and yPos <=4 and yPos >=4 then
- burger()
- end --if burger
- if xPos <=13 and xPos >= 2 and yPos <=6 and yPos >=6 then
- cheese()
- end --if cheese
- if xPos <=12 and xPos >= 2 and yPos <=8 and yPos >=8 then
- bacon()
- end --if bacon
- if xPos <=24 and xPos >= 16 and yPos <=4 and yPos >=4 then
- shake()
- end --if shake
- if xPos <=24 and xPos >= 17 and yPos <=6 and yPos >=6 then
- soda()
- end --if soda
- if xPos <=24 and xPos >= 20 and yPos <=8 and yPos >=8 then
- fries()
- end --if fries
- if xPos <=20 and xPos >= 20 and yPos <=1 and yPos >=1 then
- welcome()
- end --if X
- end --waiting selection
- end --place order clicked
- end --waiting place order click
- end --welcome function
- welcome()
Advertisement
Add Comment
Please, Sign In to add comment