label change1,nbre,calc,boire,quit dim i,j,a$,d,u,x,y,x2,sou,coutotal,x3,y3,k,e sou=1400:x3=16:y3=31:k=31 a$=chr$(10)+chr$(13):j=80 width 0,450 height 0,305 caption 0,"Bar à Boisson" alpha 1 left 1,5 top 1,7 caption 1,"Boisson : Nombre : Monnaie :"+a$+a$+" Aperçu :" for i=2 to 4 combo i:width i,1:left i,j:top i,5:j=j+160 next i width 2,120:width 3,40:left 3,left(3)+15:left 4,385:width 4,50 item_add 2,"Champagne":item_add 2,"Vin blanc":item_add 2,"Vin rouge":item_add 2,"Bière":item_add 2,"Jus":text 2,"Alcool":item_add 2,"Crème de mante" item_add 2,"Lait":item_add 2,"Limonade":item_add 2,"Boisson désaltérante":item_add 2,"Pepsi":item_add 2,"Alcool":item_add 2,"Jus de légumes":item_add 2,"Eau" sort_on 2:on_click 2,nbre for i=1 to 8 item_add 3,i next i text 3,"1" item_add 4,"$":item_add 4,"€":text 4,"$" on_click 4,nbre on_click 3,nbre picture 5 left 5,5 top 5,50 width 5,432 height 5,140 2d_target_is 5 2d_rectangle 0,0,432,140 alpha 6 left 6,5 top 6,195 font_bold 6 caption 6," Modifié le Prix :"+a$+a$+"1 :"+a$+a$+"2 :" j=217 for i=7 to 8 spin i:left i,55:width i,70:top i,j:j=j+25 next i position 7,"14":position 8,"0":on_change 7,change1:on_change 8,change1 min 7,0:min 8,0:max 7,999:max 8,99 alpha 9 left 9,150 top 9,220 font_size 9,15 gosub calc font_color 9,0,0,255 font_name 9,"Times New Roman" button 10 width 10,100 height 10,21 left 10,342 top 10,250 caption 10,"Allez Boire ! >>" font_name 10,"Times New Roman":font_size 10,10 font_bold 10:font_italic 10 on_click 10,boire ' bouteilles ---------------- gosub nbre ' suivant ------------------- end change1: gosub calc return nbre: if text$(4)="$" if text$(2)="Jus" then sou=120 if text$(2)="Bière" then sou=150 if text$(2)="Vin blanc" then sou=1099 if text$(2)="Vin rouge" then sou=1294 if text$(2)="Champagne" then sou=2500 if text$(2)="Jus de légumes" then sou=400 if text$(2)="Alcool" then sou=1400 if text$(2)="Boisson désaltérante" then sou=150 if text$(2)="Pepsi" then sou=100 if text$(2)="Boisson gazeuse" then sou=200 if text$(2)="Lait" then sou=500 if text$(2)="Limonade" then sou=200 if text$(2)="Crème de mante" then sou=1796 if text$(2)="Eau" then sou=50 end_if if text$(4)="€" if text$(2)="Jus" then sou=84 if text$(2)="Bière" then sou=105 if text$(2)="Vin blanc" then sou=770 if text$(2)="Vin rouge" then sou=907 if text$(2)="Champagne" then sou=1753 if text$(2)="Jus de légumes" then sou=280 if text$(2)="Alcool" then sou=981 if text$(2)="Boisson désaltérante" then sou=105 if text$(2)="Pepsi" then sou=70 if text$(2)="Boisson gazeuse" then sou=140 if text$(2)="Lait" then sou=351 if text$(2)="Limonade" then sou=140 if text$(2)="Crème de mante" then sou=1259 if text$(2)="Eau" then sou=35 end_if position 7,int(sou/100):position 8,sou-100*int(sou/100) gosub calc ' bouteilles -------------------------- x2=5:color 5,255,255,255:2d_rectangle 0,0,432,140 for i=1 to text$(3) 2d_line x2+10,5,x2+10,30:2d_line x2+25,5,x2+25,30 2d_line x2,50,x2+11,29:2d_line x2+25,30,x2+36,51 2d_line x2,51,x2,125:2d_line x2+36,51,x2+36,125 2d_line x2+10,5,x2+25,5:2d_line x2+10,10,x2+25,10 2d_line x2,125,x2+36,125 x2=x2+50 next i return calc: sou=(position(7)*100+position(8))*val(text$(3)) d=int(sou/100):u=sou- 100*d caption 9,"Montant : "+str$(d)+", "+str$(u)+" "+text$(4) return boire: for i=1 to 8 hide i next i top 9,15:left 9,110:caption 9,"Buvez, Buvez, à votre santé !"+a$+a$+a$+"Choix :"+a$+a$+text$(2)+a$+"Nombre : "+text$(3)+a$+"Montant par bouteille : "+str$(position(7))+", "+str$(position(8))+" "+text$(4)+a$+"Montant total : "+str$(d)+", "+str$(u)+" "+text$(4) caption 10,"Quitter...":on_click 10,quit picture 11:height 11,140:color 11,233,232,218:2d_target_is 11 2d_line 15,5,15,30:2d_line 30,5,30,30 2d_line 5,50,16,29:2d_line 30,30,41,51 2d_line 5,51,5,125:2d_line 41,51,41,125 2d_line 15,5,30,5:2d_line 15,10,30,10 2d_line 5,125,41,125 2d_pen_color 0,0,255:2d_fill_color 0,0,255:2d_rectangle 16,6,30,10 2d_pen_color 255,50,50:2d_fill_color 255,50,50 for i=1 to 21 step 2 2d_rectangle x3,y3,k,y3+1 y3=y3+2:x3=x3-1:k=k+1 next i 2d_rectangle 6,52,41,125 picture 14:height 14,33:width 14,61:left 14,200:top 14,50 2d_target_is 14:print_target_is 14 2d_line 0,0,60,0:2d_line 0,32,60,32 2d_line 0,0,0,32:2d_line 60,0,60,33 2d_pen_color 150,255,100:2d_fill_color 150,255,100:2d_rectangle 1,1,60,32 2d_pen_color 20,100,255:2d_fill_color 20,100,255:2d_circle 30,16,13 font_size 14,12:font_name 14,"Arial Balck":print_locate 26,8:print "$" form 12 border_hide 12 top 12,screen_y+56 left 12,screen_x-300 command_target_is 12 to_foreground 0 width 12,230 height 12,250 picture 13 width 13,230 height 13,300 2d_target_is 13:print_target_is 13 2d_rectangle 0,0,230,250 for i=1 to 112 top 12,top(12)-3 wait 2 next i font_size 13,12:font_bold 13:font_name 13,"Arial Black":print_locate 20,10:print "Menu" font_name 13,"Times New Roman":print_locate 5,50:print "Choix : "+text$(2) font_bold_off 13:print_locate 5,70:print "Nombre : "+text$(3) print_locate 5,90:print "Montant par bouteille : "+str$(position(7))+", "+str$(position(8)) print_locate 5,110:print "Montant total : "+str$(d)+", "+str$(u)+" "+text$(4) font_size 13,14:font_name 13,"Arial":print_locate 7,150:print "Merci d'être passé au bar":print_locate 7,170:print "à boisson !" wait 4000 for i=1 to 112 top 12,top(12)+3 wait 2 next i return quit: terminate