Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local vend = require("vendapi")
- vend.clearScreen()
- vend.centerWrite(vend.getRealTime())
- vend.newLine()
- --[[
- p = vend.getPlayers()
- for i=1, #p do
- print(p[i])
- end
- --]]
- --Pull command from chat and verify identity
- local function getChatCommand()
- local event, param1, param2 = os.pullEvent("chat")
- if(param2 == "porkchop") and (param1 == "irnotbeowulf") then
- vend.centerWrite("The other white meat")
- vend.dispense(vend.getBarrel(3))
- elseif(param2 == "close") then
- vend.centerWrite("closed")
- else
- vend.centerWrite("enter open or closed")
- end
- end
- local function timer1()
- sleep(4)
- print("timer1 done")
- end
- while true do
- parallel.waitForAny(getChatCommand, timer1)
- end
Add Comment
Please, Sign In to add comment