Advertisement
nnimos

Untitled

May 5th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. -- Startup code for Sending PC
  2.  
  3. function HomeScreen()
  4. term.setTextColor(colors.blue)
  5. print("Welcome to The Bank Of Nimrodia")
  6. term.setTextColor(colors.white)
  7. print("Please select an option from below:")
  8. print("")
  9. print("1 - Access Account")
  10. print("2 - Deposit into Safety Box")
  11. print("3 - View Account details")
  12. end
  13.  
  14. function ChoiceSelection()
  15. write("Please enter the number of your choice: ")
  16. choice = tonumber(read())
  17. end
  18.  
  19.  
  20.  
  21. HomeScreen()
  22. ChoiceSelection()
  23. print(type(choice))
  24. print(choice)
  25.  
  26. function HomeChoice(choice1)
  27. print(choice1)
  28.  
  29. if choice1 == 1 then
  30. write("You have selected: ")
  31. wait(5)
  32. term.setTextColor(colors.green)
  33. write("Access account")
  34. wait(10)
  35. term.setTextColor(colors.white)
  36. print("Please wait... ")
  37. wait(10)
  38. elseif choice1 == 2 then
  39. write("You have selected: ")
  40. wait(5)
  41. term.setTextColor(colors.green)
  42. write("Deposit into safety box")
  43. wait(10)
  44. term.setTextColor(colors.white)
  45. print("Please wait... ")
  46. wait(10)
  47. -- shell.run("BoxDeposit")
  48. elseif choice1 == 3 then
  49. write("You have selected: ")
  50. wait(5)
  51. term.setTextColor(colors.green)
  52. write("View Account details")
  53. wait(10)
  54. term.setTextColor(colors.white)
  55. print("Please wait... ")
  56. wait(10)
  57. else
  58. term.setTextColor(colors.red)
  59. textutils.slowPrint("Choice is not correct, please try again")
  60. term.setTextColor(colors.white)
  61. wait(2)
  62. ChoiceSelection()
  63. end
  64.  
  65. end
  66.  
  67. HomeChoice(choice)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement