Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '12-2-19
- 'StarBucks ordering system
- 'Emulates an ordering system for Starbucks
- 'MenuOpen, checks if the menu is open
- 'CurrentCatagory$, stores what catagory the user has selected to print later
- 'CurrentCatagory, stores what catagory the user has selected for use in determining what item is selected when a customer orders more of an item
- 'CurrentItem$, stores the selected item to be printed later
- 'CurrentItem, stores the selected item to for use in checking what item has been bought it more then 1 is purchased
- 'ItemAmount, the amount of the selected item that is being purchased
- UpperLeftX = 1
- UpperLeftY = 1
- WindowHeight = 900
- WindowWidth = 400
- [start]
- 'Starting buttons
- button #Menu1.HotCoffee, "Hot Coffees", [HotCoffee], UL, 100, 100, 100, 50
- button #Menu1.ColdCoffee, "Cold Coffees", [ColdCoffee], UL, 200, 100, 100, 50
- button #Menu1.HotTea, "Hot Teas", [HotTeas], UL, 100, 150, 100, 50
- button #Menu1.IcedTea, "Iced Teas", [IcedTeas], UL, 200, 150, 100, 50
- 'other universal buttons
- button #ConfirmItem.Yes, "Yes", [ItemConfirmed], UL, 100, 150, 100, 50
- button #ConfirmItem.No, "No", [ItemCancelled], UL, 200, 150, 100, 50
- button #ConfirmItem.MoreThanOne, "More Then 1", [MoreThenOne], UL, 150, 200, 100, 50
- button #CheckOut.ContinueShopping, "Continue Shopping", [start], UL, 100, 100, 100, 50
- button #CheckOut.CheckOut, "Check Out", [finish], UL, 150, 100, 100, 50
- 'Hot Coffe Buttons
- button #HotCoffee.Expresso, "Expresso Shots", [Expressos], UL, 100, 100, 100, 50
- button #HotCoffee.Cappuccinos, "Cappuccinos", [Cappuccinos], UL, 200, 100, 100, 50
- button #HotCoffee.Lattes, "Lattes", [Lattes], UL, 100, 150, 100, 50
- button #HotCoffee.Americanos, "Americanos", [Americanos], UL, 200, 150, 100, 50
- button #HotCoffee.Brewed_Coffees, "Brewed Coffees", [Brewed_Coffees], UL, 100, 200, 100, 50
- 'expresso buttons
- button #ExpressoShots.Express, "Expresso", [Expresso], UL, 100, 100, 100, 50
- button #ExpressoShots.EspressoConPanna, "Espresso Con Panna", [EspressoConPanna], UL 100, 200, 100, 50
- 'Cappuccinos buttons
- button #Cappuccinos.Cappuccino, "Cappuccino", [Cappuccino], UL 100, 100, 100, 50
- button #Cappuccinos.StarbucksBlondeCappuccino, "StarbucksBlondeCappuccino", [StarbucksBlondeCappuccino], UL, 200, 100, 100, 50
- 'Latte buttons
- button #Lattes.EggnogL, "Eggnog Latte", [EggnogL], UL, 100, 100, 100, 50
- button #Lattes.StarbucksBlondeEggnogL, "Starbucks Blonde Eggnog Latte", [StarbucksBlondeEggnogL], UL, 200, 100, 100, 50
- button #Lattes.CaramelBruleeL, "Caramel Brulee Latte", [CaramelBruleeL], UL, 100, 150, 100, 50
- button #Lattes.StarbucksBlondeCaramelBruleeL, "StarbucksBlondeCaramelBrulee Latte", [StarbucksBlondeCaramelBruleeL], UL, 200, 150, 100, 50
- button #Lattes.ChestnutPralineL, "Chestnut Praline Latte", [ChestnutPralineL], UL,100, 200, 100, 50
- button #Lattes.StarbucksBlondeChestnutPralineL, "Starbucks Blonde Chestnut Praline Latte", [StarbucksBlondeChestnutPralineL], UL, 200, 200, 100, 50
- button #Lattes.CaffeL, "Caffe Latte", [CaffeL], UL, 100, 250, 100, 50
- button #Lattes.CinnamonDolceL, "Cinnamon Dolce Latte", [CinnamonDolceL], UL, 200, 250, 100, 50
- button #Lattes.StarbucksReserveL, "Starbucks ReserveLatte", [StarbucksReserveL], UL, 100, 300, 100, 50
- button #Lattes.StarbucksReserveHazzlenutBiancoL, "Starbucks Reserve Hazelnut Bianco Latte", [StarbucksReserveHazelnutBiancoL], UL, 200, 300, 100, 50
- button #Lattes.StarbucksBlondeVanillaL, "Starbucks Blonde Vanilla Latte", [StarbucksBlondeVanillaL], 100, 350, 100, 50
- ItemCount = 1
- if CheckOutOpen = 1 then
- CheckOutOpen = 0
- close #CheckOut
- end if
- open "Menu" for window as #Menu1
- wait
- [HotCoffee]
- open "Hot Coffees" for window as #HotCoffee
- HotCoffeesOpen = 1
- wait
- 'handles everything dealing with expresso shots
- [Expressos]
- open "Expressos" for window as #ExpressoShots
- ExpressoShotsOpen = 1
- wait
- [Expresso]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Expresso"
- CurrentItem = 0
- wait
- [EspressoConPanna]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Espresso Con Panna"
- CurrentItem = 1
- wait
- 'handles everything dealing with Cappuccinos
- [Cappuccinos]
- open "Cappuccinos" for window as #Cappuccinos
- CappuccinosOpen = 1
- wait
- [Cappuccino]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Cappuccino"
- CurrentItem = 2
- wait
- [StarbucksBlondeCappuccino]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "StarbucksBlondeCappuccino"
- CurrentItem = 3
- wait
- 'handles everything with lattes
- [Lattes]
- open "Lattes" for window as #Lattes
- LattesOpen = 1
- wait
- [EggnogL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Eggnog Latte"
- CurrentItem = 4
- wait
- [StarbucksBlondeEggnogL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Blonde Eggnog Latte"
- CurrentItem = 4
- wait
- [CaramelBruleeL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Caramel Brulee Latte"
- CurrentItem = 5
- wait
- [StarbucksBlondeCaramelBruleeL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Blonde Caramel Brulee Latte"
- CurrentItem = 6
- wait
- [ChestnutPralineL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Chestnut Praline Latte"
- CurrentItem = 7
- wait
- [StarbucksBlondeChestnutPralineL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Blonde Chestnut Praline Latte"
- CurrentItem = 8
- wait
- [CaffeL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Caffe Latte"
- CurrentItem = 9
- wait
- [CinnamonDolceLatte]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Cinnamon Dolce Latte"
- CurrentItem = 10
- wait
- [StarbucksReserveL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Reserve Latte"
- CurrentItem = 11
- wait
- [StarbucksReserveHazzlenutBiancoL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Reserve Hazzlenut Bianco Latte"
- CurrentItem = 12
- wait
- [StarbucksBlondeVanillaL]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Starbucks Blonde Vanilla Latte"
- CurrentItem = 13
- wait
- 'handles everything with Americanos
- [Americanos]
- notice "Americanos was pressed"
- 'handles everything with Brewed Coffees
- [Brewed_Coffees]
- notice "Brewed Coffees was pressed"
- close #HotCoffee
- [MoreThenOne]
- prompt "Quantity" + chr$(13) + "Enter Desired Amount"; ItemCount
- [ItemConfirmed]
- if HotCoffeesOpen = 1 then
- close#HotCoffee
- HotCoffeesOpen = 0
- if ExpressoShotsOpen = 1 then
- close #ExpressoShots
- ExpressoShotsOpen = 0
- end if
- if CappuccinosOpen = 1 then
- close #Cappuccinos
- CappuccinosOpen = 0
- end if
- if LattesOpen = 1 then
- close #Lattes
- LattesOpen = 0
- end if
- end if
- if ItemCount = 1 then
- print "1 "; CurrentItem$;
- print " purchased."
- else
- print ItemCount; CurrentItem$;
- print "s purchased."
- end if
- 'increases the count of the chosen item
- if CurrentItem = 0 then ExpressoCount = ExpressoCount + ItemCount
- if CurrentItem = 1 then EspressoConPannaCount = EspressoConPannaCount + ItemCount
- if CurrentItem = 2 then CappuccinoCount = CappuccinoCount + ItemCount
- if CurrentItem = 3 then StarbucksBlondeCappuccinoCount = StarbucksBlondeCappuccinoCount + ItemCount
- ItemCount = 1
- [ItemCancelled]
- close #ConfirmItem
- if HotCoffeesOpen = 1 then
- close#HotCoffee
- HotCoffeesOpen = 0
- if ExpressoShotsOpen = 1 then
- close #ExpressoShots
- ExpressoShotsOpen = 0
- end if
- if CappuccinosOpen = 1 then
- close #Cappuccinos
- CappuccinosOpen = 0
- end if
- if LattesOpen = 1 then
- close #Lattes
- LattesOpen = 0
- end if
- end if
- open "Check Out" for window as #CheckOut
- CheckOutOpen = 1
- close #Menu1
- wait
- [finish]
- close #CheckOut
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement