SHARE
TWEET

Untitled

a guest Nov 27th, 2019 226 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Holden Chambers
  2. '12-2-19
  3. 'StarBucks ordering system
  4. 'Emulates an ordering system for Starbucks
  5. 'MenuOpen, checks if the menu is open
  6. 'CurrentCatagory$, stores what catagory the user has selected to print later
  7. 'CurrentCatagory, stores what catagory the user has selected for use in determining what item is selected when a customer orders more of an item
  8. 'CurrentItem$, stores the selected item to be printed later
  9. 'CurrentItem, stores the selected item to for use in checking what item has been bought it more then 1 is purchased
  10. 'ItemAmount, the amount of the selected item that is being purchased
  11. UpperLeftX = 1
  12. UpperLeftY = 1
  13. WindowHeight = 900
  14. WindowWidth = 400
  15. 'Starting buttons
  16. button #Menu1.HotCoffee, "Hot Coffees", [HotCoffee], UL, 100, 100, 100, 50
  17. button #Menu1.ColdCoffee, "Cold Coffees", [ColdCoffee], UL, 200, 100, 100, 50
  18. button #Menu1.HotTea, "Hot Teas", [HotTeas], UL, 100, 150, 100, 50
  19. button #Menu1.IcedTea, "Iced Teas", [IcedTeas], UL, 200, 150, 100, 50
  20. 'other universal buttons
  21. button #ConfirmItem.Yes, "Yes", [ItemConfirmed], UL, 100, 150, 100, 50
  22. button #ConfirmItem.No, "No", [ItemCancelled], UL, 200, 150, 100, 50
  23. button #ConfirmItem.MoreThanOne, "More Then 1", [MoreThenOne], UL,  150, 200, 100, 50
  24. button #CheckOut.ContinueShopping, "Continue Shopping", [start], UL, 100, 100, 100, 50
  25. button #CheckOut.CheckOut, "Check Out", [finish], UL, 150, 100, 100, 40
  26. 'Hot Coffe Buttons
  27. button #HotCoffee.Expresso, "Expresso Shots", [Expressos], UL, 100, 100, 100, 50
  28. button #HotCoffee.Cappuccinos, "Cappuccinos", [Cappuccinos], UL, 200, 100, 100, 50
  29. button #HotCoffee.Lattes, "Lattes", [Lattes],  UL, 100, 150, 100, 50
  30. button #HotCoffee.Americanos, "Americanos", [Americanos], UL, 200, 150, 100, 50
  31. button #HotCoffee.Brewed_Coffees, "Brewed Coffees", [Brewed_Coffees], UL, 100, 200, 100, 50
  32. button #ExpressoShots.Express, "Expresso", [Expresso], UL, 100, 100, 100, 50
  33. button #ExpressoShots.EspressoConPanna, "Espresso Con Panna", [EspressoConPanna], UL 100, 200, 100, 50
  34. ItemCount = 1
  35. [start]
  36. if MenuOpen = 0 then
  37.     open "Menu" for window as #Menu1
  38.     MenuOpen = 1
  39. end if
  40. wait
  41. [HotCoffee]
  42. open "Hot Coffees" for window as #HotCoffee
  43. wait
  44. 'handles everything dealing with expresso shots
  45. [Expressos]
  46. open "Expressos" for window as #ExpressoShots
  47. wait
  48. [Expresso]
  49. open "Confirm  item" for window as #ConfirmItem
  50. CurrentItem$ = "Expresso"
  51. CurrentItem = 0
  52. wait
  53. [EspressoConPanna]
  54. open "Confirm item" for window as #ConfirmItem
  55. CurrentItem$ = "Espresso Con Panna"
  56. CurrentItem = 1
  57. wait
  58. 'handles everything dealing with Cappuccinos
  59. [Cappuccinos]
  60. notice "Cappuccinos was pressed"
  61. 'handles everything with lattes
  62. [Lattes]
  63. notice "Lattes was pressed"
  64. 'handles everything with  Americanos
  65. [Americanos]
  66. notice "Americanos was pressed"
  67. 'handles everything with Brewed Coffees
  68. [Brewed_Coffees]
  69. notice "Brewed Coffees was pressed"
  70. close #HotCoffee
  71. [MoreThenOne]
  72. prompt "Quantity" + chr$(13) + "Enter Desired Amount"; ItemCount
  73. [ItemConfirmed]
  74. if ItemCount = 1 then
  75.     print "1 "; CurrentItem$;
  76.     print " purchased."
  77. else
  78.     print ItemCount; CurrentItem$;
  79.     print "s purchased."
  80. end if
  81. 'increases the count of the chosen item
  82. if CurrentItem = 0 then ExpressoCount = ExpressoCount + ItemCount
  83. if CurrentItem = 1 then EspressoConPannaCount = EspressoConPannaCount + ItemCount
  84.  
  85.  
  86.  
  87. ItemCount = 1
  88. close #ConfirmItem
  89. [ItemCancelled]
  90. open "Check Out" for window as #CheckOut
  91. wait
  92. [finish]
  93.  
  94. close #Menu1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top