Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local event = require("event")
- local robot = component.robot
- local crafting = component.crafting
- function getMeat(amount)
- robot.select(2)
- robot.suck(3, amount)
- end
- function getToast(amount)
- robot.select(5)
- robot.turn(false)
- robot.suck(3, amount)
- robot.turn(true)
- end
- function craftBurger(amount)
- getMeat(amount)
- getToast(amount)
- for i = 0, amount do
- crafting.craft()
- robot.select(6)
- robot.drop(1)
- end
- end
- component.modem.open(8080)
- while true do
- _, _, sender, port, _, data = event.pull("modem_message")
- if data == "stop" or data == "exit" then
- os.exit()
- end
- if type(data) == "number" then
- craftBurger(data)
- end
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement