Advertisement
nnimos

Untitled

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