Advertisement
TechManDylan

ShannonMailAlert

Feb 14th, 2023 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. chatBox = peripheral.find("chatBox")
  2.  
  3. function mailAlert()
  4. redstone.setOutput("right", true)
  5. chatBox.sendMessageToPlayer("§bYou've got mail! Check your enderchest.", "eruptingtiger", "Mailman", "[]")
  6. sleep(1)
  7. redstone.setOutput("right", false)
  8. chatBox.sendMessageToPlayer("§eShannon has not checked her mail yet.", "TechManDylan", "Mailman", "[]")
  9. end
  10.  
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. print("Starting Mail Alert Program")
  14.  
  15. while true do
  16.  
  17. if redstone.getInput("left") then
  18.  
  19. mailAlert()
  20.  
  21. sleep(60)
  22.  
  23. end
  24. sleep(1)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement