SHARE
TWEET

Untitled

a guest Dec 1st, 2019 222 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '12-2-19
  2. 'StarBucks ordering system
  3. 'Emulates an ordering system for Starbucks
  4. 'MenuOpen, checks if the menu is open
  5. 'CurrentCatagory$, stores what catagory the user has selected to print later
  6. 'CurrentCatagory, stores what catagory the user has selected for use in determining what item is selected when a customer orders more of an item
  7. 'CurrentItem$, stores the selected item to be printed later
  8. 'CurrentItem, stores the selected item to for use in checking what item has been bought it more then 1 is purchased
  9. 'ItemAmount, the amount of the selected item that is being purchased
  10. UpperLeftX = 1
  11. UpperLeftY = 1
  12. WindowHeight = 900
  13. WindowWidth = 400
  14. [start]
  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, 50
  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. 'expresso buttons
  33. button #ExpressoShots.Express, "Expresso", [Expresso], UL, 100, 100, 100, 50
  34. button #ExpressoShots.EspressoConPanna, "Espresso Con Panna", [EspressoConPanna], UL 100, 200, 100, 50
  35. 'Cappuccinos buttons
  36. button #Cappuccinos.Cappuccino, "Cappuccino", [Cappuccino], UL 100, 100, 100, 50
  37. button #Cappuccinos.StarbucksBlondeCappuccino, "StarbucksBlondeCappuccino", [StarbucksBlondeCappuccino], UL, 200, 100, 100, 50
  38. 'Latte buttons
  39. button #Lattes.EggnogL, "Eggnog Latte", [EggnogL], UL, 100, 100, 100, 50
  40. button #Lattes.StarbucksBlondeEggnogL, "Starbucks Blonde Eggnog Latte", [StarbucksBlondeEggnogL], UL, 200, 100, 100, 50
  41. button #Lattes.CaramelBruleeL, "Caramel Brulee Latte", [CaramelBruleeL], UL, 100, 150, 100, 50
  42. button #Lattes.StarbucksBlondeCaramelBruleeL, "StarbucksBlondeCaramelBrulee Latte", [StarbucksBlondeCaramelBruleeL], UL, 200, 150, 100, 50
  43. button #Lattes.ChestnutPralineL, "Chestnut Praline Latte", [ChestnutPralineL], UL,100, 200, 100, 50
  44. button #Lattes.StarbucksBlondeChestnutPralineL, "Starbucks Blonde Chestnut Praline Latte", [StarbucksBlondeChestnutPralineL], UL, 200, 200, 100, 50
  45. button #Lattes.CaffeL, "Caffe Latte", [CaffeL], UL, 100, 250, 100, 50
  46. button #Lattes.CinnamonDolceL, "Cinnamon Dolce Latte", [CinnamonDolceL], UL, 200, 250, 100, 50
  47. button #Lattes.StarbucksReserveL, "Starbucks ReserveLatte", [StarbucksReserveL], UL, 100, 300, 100, 50
  48. button #Lattes.StarbucksReserveHazzlenutBiancoL, "Starbucks Reserve Hazelnut Bianco Latte", [StarbucksReserveHazelnutBiancoL], UL, 200, 300, 100, 50
  49. button #Lattes.StarbucksBlondeVanillaL, "Starbucks Blonde Vanilla Latte", [StarbucksBlondeVanillaL], 100, 350, 100, 50
  50.  
  51. ItemCount = 1
  52. if CheckOutOpen = 1 then
  53.     CheckOutOpen = 0
  54.     close #CheckOut
  55. end if
  56. open "Menu" for window as #Menu1
  57. wait
  58. [HotCoffee]
  59. open "Hot Coffees" for window as #HotCoffee
  60. HotCoffeesOpen = 1
  61. wait
  62. 'handles everything dealing with expresso shots
  63. [Expressos]
  64. open "Expressos" for window as #ExpressoShots
  65. ExpressoShotsOpen = 1
  66. wait
  67. [Expresso]
  68. open "Confirm  item" for window as #ConfirmItem
  69. CurrentItem$ = "Expresso"
  70. CurrentItem = 0
  71. wait
  72. [EspressoConPanna]
  73. open "Confirm item" for window as #ConfirmItem
  74. CurrentItem$ = "Espresso Con Panna"
  75. CurrentItem = 1
  76. wait
  77. 'handles everything dealing with Cappuccinos
  78. [Cappuccinos]
  79. open "Cappuccinos" for window as #Cappuccinos
  80. CappuccinosOpen = 1
  81. wait
  82. [Cappuccino]
  83. open "Confirm item" for window as #ConfirmItem
  84. CurrentItem$ = "Cappuccino"
  85. CurrentItem = 2
  86. wait
  87. [StarbucksBlondeCappuccino]
  88. open "Confirm item" for window as #ConfirmItem
  89. CurrentItem$ = "StarbucksBlondeCappuccino"
  90. CurrentItem = 3
  91. wait
  92. 'handles everything with lattes
  93. [Lattes]
  94. open "Lattes" for window as #Lattes
  95. LattesOpen = 1
  96. wait
  97. [EggnogL]
  98. open "Confirm item" for window as #ConfirmItem
  99. CurrentItem$ = "Eggnog Latte"
  100. CurrentItem = 4
  101. wait
  102. [StarbucksBlondeEggnogL]
  103. open "Confirm item" for window as #ConfirmItem
  104. CurrentItem$ = "Starbucks Blonde Eggnog Latte"
  105. CurrentItem = 4
  106. wait
  107. [CaramelBruleeL]
  108. open "Confirm item" for window as #ConfirmItem
  109. CurrentItem$ = "Caramel Brulee Latte"
  110. CurrentItem = 5
  111. wait
  112. [StarbucksBlondeCaramelBruleeL]
  113. open "Confirm item" for window as #ConfirmItem
  114. CurrentItem$ = "Starbucks Blonde Caramel Brulee Latte"
  115. CurrentItem = 6
  116. wait
  117. [ChestnutPralineL]
  118. open "Confirm item" for window as #ConfirmItem
  119. CurrentItem$ = "Chestnut Praline Latte"
  120. CurrentItem = 7
  121. wait
  122. [StarbucksBlondeChestnutPralineL]
  123. open "Confirm item" for window as #ConfirmItem
  124. CurrentItem$ = "Starbucks Blonde Chestnut Praline Latte"
  125. CurrentItem = 8
  126. wait
  127. [CaffeL]
  128. open "Confirm item" for window as #ConfirmItem
  129. CurrentItem$ = "Caffe Latte"
  130. CurrentItem = 9
  131. wait
  132. [CinnamonDolceLatte]
  133. open "Confirm item" for window as #ConfirmItem
  134. CurrentItem$ = "Cinnamon Dolce Latte"
  135. CurrentItem = 10
  136. wait
  137. [StarbucksReserveL]
  138. open "Confirm item" for window as #ConfirmItem
  139. CurrentItem$ = "Starbucks Reserve Latte"
  140. CurrentItem = 11
  141. wait
  142. [StarbucksReserveHazzlenutBiancoL]
  143. open "Confirm item" for window as #ConfirmItem
  144. CurrentItem$ = "Starbucks Reserve Hazzlenut Bianco Latte"
  145. CurrentItem = 12
  146. wait
  147. [StarbucksBlondeVanillaL]
  148. open "Confirm item" for window as #ConfirmItem
  149. CurrentItem$ = "Starbucks Blonde Vanilla Latte"
  150. CurrentItem = 13
  151. wait
  152. 'handles everything with  Americanos
  153. [Americanos]
  154. notice "Americanos was pressed"
  155. 'handles everything with Brewed Coffees
  156. [Brewed_Coffees]
  157. notice "Brewed Coffees was pressed"
  158. close #HotCoffee
  159. [MoreThenOne]
  160. prompt "Quantity" + chr$(13) + "Enter Desired Amount"; ItemCount
  161. [ItemConfirmed]
  162. if HotCoffeesOpen = 1 then
  163.     close#HotCoffee
  164.     HotCoffeesOpen = 0
  165.     if ExpressoShotsOpen = 1 then
  166.         close #ExpressoShots
  167.         ExpressoShotsOpen = 0
  168.     end if
  169.         if CappuccinosOpen = 1 then
  170.         close #Cappuccinos
  171.         CappuccinosOpen = 0
  172.     end if
  173.     if LattesOpen = 1 then
  174.         close #Lattes
  175.         LattesOpen = 0
  176.     end if
  177. end if
  178. if ItemCount = 1 then
  179.     print "1 "; CurrentItem$;
  180.     print " purchased."
  181. else
  182.     print ItemCount; CurrentItem$;
  183.     print "s purchased."
  184. end if
  185. 'increases the count of the chosen item
  186. if CurrentItem = 0 then ExpressoCount = ExpressoCount + ItemCount
  187. if CurrentItem = 1 then EspressoConPannaCount = EspressoConPannaCount + ItemCount
  188. if CurrentItem = 2 then CappuccinoCount = CappuccinoCount + ItemCount
  189. if CurrentItem = 3 then StarbucksBlondeCappuccinoCount = StarbucksBlondeCappuccinoCount + ItemCount
  190.  
  191. ItemCount = 1
  192. [ItemCancelled]
  193. close #ConfirmItem
  194. if HotCoffeesOpen = 1 then
  195.     close#HotCoffee
  196.     HotCoffeesOpen = 0
  197.     if ExpressoShotsOpen = 1 then
  198.         close #ExpressoShots
  199.         ExpressoShotsOpen = 0
  200.     end if
  201.     if CappuccinosOpen = 1 then
  202.         close #Cappuccinos
  203.         CappuccinosOpen = 0
  204.     end if
  205.     if LattesOpen = 1 then
  206.         close #Lattes
  207.         LattesOpen = 0
  208.     end if
  209. end if
  210. open "Check Out" for window as #CheckOut
  211. CheckOutOpen = 1
  212. close #Menu1
  213. wait
  214. [finish]
  215. close #CheckOut
  216. end
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