Advertisement
nnimos

Untitled

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