Advertisement
Guest User

startup

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.66 KB | None | 0 0
  1. local function center(y,string)
  2.   local w,h = term.getSize()
  3.   local x = (w/2)-(#string/2)
  4.   term.setCursorPos(x,y)
  5.   print(string)
  6. end
  7.  
  8. -- check for memory card
  9. --local function memCard()
  10. --if fs.exists("/disk2/.memcard/Jaguar") or fs.exists("/disk/.memcard/Jaguar") then
  11. --term.setBackgroundColour(colours.black)
  12. --term.clear()
  13. --center(3,"Memory Card Inserted")
  14. --center(6,"What would you like to do with this?")
  15. --term.setBackgroundColour(colours.blue)
  16. --center(8," Browse Files ")
  17. --term.setBackgroundColour(colours.red)
  18. --center(9," Ignore ")
  19. --term.setBackgroundColour(colours.black)
  20. --end
  21. --end
  22.  
  23. -- check if game disk is in
  24. local function diskCheck()
  25. if fs.exists("/disk/boot") then term.setBackgroundColour(colours.black)
  26. term.clear()
  27. shell.run("/disk/boot")
  28. elseif fs.exists("/disk/startgame") then term.setBackgroundColour(colours.blue)
  29. term.clear()
  30. term.setTextColour(colours.white)
  31. center(6,"Jaguar has crashed!")
  32. center(9,"Reason: Unaccepted disk format")
  33. center(12,"Rebooting in 8 seconds...")
  34. sleep(8)
  35. os.reboot()
  36. end
  37. end
  38.  
  39. os.loadAPI("/.Jaguar/apis/jagapi")
  40. term.setBackgroundColour(colours.black)
  41. term.clear()
  42. paintutils.drawImage(paintutils.loadImage("/Jaguar/screen"),1,1)
  43. sleep(1.8)
  44. term.setBackgroundColour(colours.green)
  45. term.clear()
  46. --memCard()
  47. sleep()
  48.  
  49.   local function flash()
  50.   term.setBackgroundColour(colours.red)
  51.   term.setTextColour(colours.black)
  52.   term.clear()
  53.   diskCheck()
  54.   center(9,"Please insert disk")
  55.   end
  56.   local function insert()
  57.   flash()
  58.   sleep(0.5)
  59.   term.clear()
  60.   sleep(0.5)
  61.   flash()
  62.   sleep(0.5)
  63.   term.clear()
  64.   sleep(0.5)
  65.   flash()
  66.   end insert()
  67.   for i=1,50 do
  68.   insert()
  69.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement