Advertisement
nnimos

Untitled

May 5th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 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. local nchoice = read()
  17. choice = nchoice
  18. end
  19.  
  20.  
  21.  
  22. HomeScreen()
  23. ChoiceSelection()
  24.  
  25. function HomeChoice(choice)
  26. if choice == 1 then
  27. write("You have selected: ")
  28. term.setTextColor(colors.green)
  29. write("Access account")
  30. term.setTextColor(colors.white)
  31. print("Please wait... ")
  32. if choice == 2 then
  33. write("You have selected: ")
  34. term.setTextColor(colors.green)
  35. write("Deposit into safety box")
  36. term.setTextColor(colors.white)
  37. print("Please wait... ")
  38. -- shell.run("BoxDeposit")
  39. if choice == 3 then
  40. write("You have selected: ")
  41. term.setTextColor(colors.green)
  42. write("View Account details")
  43. term.setTextColor(colors.white)
  44. print("Please wait... ")
  45. else
  46. term.setTextColor(colors.red)
  47. print("Choice is not correct, please try again")
  48. term.setTextColor(colors.white)
  49. ChoiceSelection()
  50. end
  51. end
  52. end
  53.  
  54. HomeChoice()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement