Advertisement
nnimos

Untitled

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