DarkLotto by Cerberus27th Jan 2004 19:40
|
---|
Summary A lottery management program Description worksout hot numbers, cold numbers and averages and allows you to store lottery draw data and view draw data as a graph. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com set display mode 1024,768,32 cls 0 RANDOMIZE 1000000 hide mouse center text 512,384,"PLEASE WAIT WHILE DARK LOTTO IS INITIALISED....." l=1:limit=1000 dim lot(5,limit) dim n(48) dim dates$(limit) dim max(5,limit) dim min(5,limit) dim avrg(5,limit) dim avrgb(limit) dim bns(48) dim bonus(limit) dim bvg(limit) dim max(5) dim min(5) dim cold(48) dim cold2(5) dim hot(48) dim hot2(5) dim statpk(5) yyd=7 week=1 ball=0:bonb=1 dim balls(5) dim balls1(6,6) buttonflag=0 buttonid=0 clx=44:cly=97:clxx=978:clyy=739 tlx=2:tly=42:tlxx=1021:tlyy=68 l$="lottoballs.bmp" load sound "press.wav",1 load sound "robot.wav",2 load sound "thunder.wav",3 load bitmap l$,1 set current bitmap 1 x=4:y=05:im=1:sp=1 for f=1 to 49 get image sp,x,y,x+57,y+57 inc im:inc sp x=x+64 if x>990 x=4 y=y+64 endif next f cls delete bitmap 1 s1=20:s2=40:s3=10:s4=15:s5=27:s6=34 sprite 1,300,700,s1 sprite 2,380,700,s2 sprite 3,460,700,s3 sprite 4,540,700,s4 sprite 5,620,700,s5 sprite 6,700,700,s6 for f=1 to 6 hide sprite f next f hide all sprites cls 0 gosub drawbuttons gosub larray wek=week set text font "tribune" set text size 24 load bitmap "mainscreen.bmp",1 copy bitmap 1,0 set current bitmap 0 ink rgb(0,0,0),0 box clx,cly,clxx,clyy gosub info sync on but=0 show mouse do if mouseclick()=0 then buttonflag=0 if mouseclick()=1 if buttonflag=0 buttonflag=1 btn=buttonpress(mousex(),mousey()) endif endif if btn=1 play sound 1 gosub hide gosub picknumbers gosub _print6 gosub info but=0 endif if btn=2 play sound 1 but=0 gosub hide gosub picknumbers7 gosub info endif if btn=3 play sound 1 but=0 gosub hot gosub cold gosub min gosub max gosub average gosub statpick gosub info endif if btn=4 play sound 1 but=0 gosub hide set text size 24 gosub info gosub dat gosub info endif if btn=5 play sound 1 but=0 gosub hide set text size 24 gosub info2 gosub datupdate gosub info2 endif if btn=6 play sound 1 but=0 gosub average gosub info endif if btn=7 play sound 1 but=0 gosub min gosub info endif if btn=8 play sound 1 but=0 gosub max gosub info endif if btn=9 play sound 2 but=0 gosub hide gosub graph gosub info endif if btn=10 play sound 1 but=0 gosub hot gosub info endif if btn=11 play sound 1 but=0 gosub cold gosub info endif if btn=12 play sound 1 gosub left endif if btn=13 play sound 1 gosub right endif if btn=15 play sound 1 gosub about endif if btn=14 play sound 1 gosub sarray endif if btn=16 play sound 3 end endif sync loop drawbuttons: restore buttons for f=1 to 16 read tx read ty read bx read by next f return function buttonpress(mx,my) value=0 restore for f=1 to 16 read tx read ty read bx read by if mx>=tx and mx<=bx and my>=ty and my<=by value=f endif next f endfunction value picknumbers: set text size 24 ba: balla=rnd(48)+1 bb: ballb=rnd(48)+1 if ballb=balla goto bb endif bc: ballc=rnd(48)+1 if ballc=ballb or ballc=balla goto bc endif bd: balld=rnd(48)+1 if balld=ballc or balld=ballb or balld=balla goto bd endif be: balle=rnd(48)+1 if balle=balld or balle=ballc or balle=ballb or balle=balla goto be endif bf: ballf=rnd(48)+1 if ballf=balle or ballf=balld or ballf=ballc or ballf=ballb or ballf=balla goto bf endif bg: ballg=rnd(48)+1 if ballg=ballf or ballg=balle or ballg=balld or ballg=ballc or ballg=ballb or ballg=balla goto bg endif bh: ballh=rnd(48)+1 if ballh=ballg or ballh=ballf or ballh=balle or ballh=balld or ballh=ballc or ballh=ballb or ballh=balla goto bh endif bi: balli=rnd(48)+1 if balli=ballh or balli=ballg or balli=ballf or balli=balle or balli=balld or balli=ballc or balli=ballb or balli=balla goto bi endif return _print6: set text size 24 ink rgb(00,0,00),0 box clx,cly,clxx,clyy x=280:y=350 gosub sortit balls(0)=balla balls(1)=ballb balls(2)=ballc balls(3)=balld balls(4)=balle balls(5)=ballf for f=1 to 6 paste image balls(f-1),x,y x=x+80 next f btn=0 return larray: if file exist("bonusdata") load array "bonusdata",bonus(0) endif if file exist("data") load array "data",lot(0) endif if file exist("week") open to read 1,"week" read file 1,week close file 1 week=week endif if file exist("date") load array "date",dates$(0) else date$=get date$() endif btn=0 return sarray: if file exist("bonusdata") delete file "bonusdata" endif save array "bonusdata",bonus(0) if file exist("data") delete file "data" endif if file exist("week") delete file "week" endif if file exist("date") delete file "date" endif save array "data", lot(0) open to write 1,"week" write file 1,week close file 1 save array "date",dates$(0) btn=0 return Dat: oop: ball=0 hide all sprites set cursor 260,220 ink rgb(0,0,0),0 box clx,cly,clxx,clyy ink rgb(0,255,255),0 print "Input date of draw (DD/MM/YYYY) " set cursor 560,220 ink rgb(255,255,0),0 input d$ if d$="exit" ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops endif if len(d$)<>10 goto oop endif dates$(week)=d$ ink rgb(0,0,0),0 box clx,cly,clxx,clyy for f=0 to 5 set cursor 260,220 ink rgb(255,255,50),rgb(00,0,0) print "Input number ";f+1 again: set cursor 390,220 ink rgb(100,200,255),0 input b if b>49 goto again endif if b<1 ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops endif lot(f,week)=b ink rgb(0,0,0),0 box clx,cly,clxx,clyy next f set cursor 260,220 ink rgb(255,255,50),rgb(00,0,0) print "Input Bonus " again2: set cursor 390,220 ink rgb(100,200,255),0 input b if b>49 goto again2 endif if b<1 ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops endif bonus(week)=b ink rgb(0,0,0),0 box clx,cly,clxx,clyy set cursor 260,220 ink rgb(0,0,0),0 box clx,cly,clxx,clyy dt1$=str$(lot(0,week)) dt2$=str$(lot(1,week)) dt3$=str$(lot(2,week)) dt4$=str$(lot(3,week)) dt5$=str$(lot(4,week)) dt6$=str$(lot(5,week)) dt7$=str$(bonus(week)) pba$=dt1$+" / "+dt2$+" / "+dt3$+" / "+dt4$+" / "+dt5$+" / "+dt6$ ink rgb(255,255,50),0 set text font "tribune" set text size 48 tx=300:ty=350 center text 512,ty,pba$ ink rgb(255,140,0),0 center text 512,ty+200,"date = "+d$ ink rgb(0,255,255),0 center text 512,ty+48,dt7$ ball=0 btn=0 ink rgb(255,255,250),rgb(00,0,00) center text 512,240,"IS THIS CORRECT Y/N" set cursor 512,286:input yn$ if yn$="y" ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto okey else ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops endif okey: ink rgb(0,0,0),0 box clx,cly,clxx,clyy pba$=dt1$+" / "+dt2$+" / "+dt3$+" / "+dt4$+" / "+dt5$+" / "+dt6$+" / "+dt7$ ink rgb(255,255,50),0 tx=300:ty=250 week=week+1 btn=0 oops: set text size 24 return info: ink rgb(rgbr(point(1,41)),rgbg(point(1,41)),rgbb(point(1,41))),0 box tlx,tly,tlxx,tlyy if week>1 weeka=week-1 endif dt1$=str$(lot(0,weeka)) dt2$=str$(lot(1,weeka)) dt3$=str$(lot(2,weeka)) dt4$=str$(lot(3,weeka)) dt5$=str$(lot(4,weeka)) dt6$=str$(lot(5,weeka)) dt7$=str$(bonus(weeka)) ink rgb(0,250,250),0 text 6,43,"Copyright "+chr$(169)+" Garry J. Smith 2003" ink rgb(250,250,20),0 text 340,43,str$(weeka)+" : DATE = "+dates$(weeka) text 600,43,"NUMBERS: " text 715,43,dt1$+" / "+dt2$+" / "+dt3$+" / "+dt4$+" / "+dt5$+" / "+dt6$+" B "+dt7$ btn=0 ink rgb(255,255,0),0 return info2: ink rgb(rgbr(point(1,41)),rgbg(point(1,41)),rgbb(point(1,41))),0 box tlx,tly,tlxx,tlyy if wek>1 weka=wek-1 endif dat1$=str$(lot(0,weka)) dat2$=str$(lot(1,weka)) dat3$=str$(lot(2,weka)) dat4$=str$(lot(3,weka)) dat5$=str$(lot(4,weka)) dat6$=str$(lot(5,weka)) dat7$=str$(bonus(weka)) ink rgb(0,250,250),0 text 6,43,"Copyright "+chr$(169)+" Garry J. Smith 2003" ink rgb(250,250,0),0 text 340,43,str$(weka)+" : DATE = "+dates$(weka) text 600,43,"NUMBERS: " text 715,43,dat1$+" / "+dat2$+" / "+dat3$+" / "+dat4$+" / "+dat5$+" / "+dat6$+" B "+dat7$ ink rgb(0,255,255),0 btn=0 ink rgb(255,255,0),0 return left: if wek>1 wek=wek-1 gosub info2 endif return right: if wek<week wek=wek+1 gosub info2 endif return graph: HIDE MOUSE ink rgb(00,0,00),0 box clx,cly,clxx,clyy ink rgb(0,25,95),0 line 44,739,978,739 ink rgb(255,255,0),0 bl=1 x=50:y=727 set text size 14 for f=1 to 49 text x,y,str$(f) x=x+19 next f for f=0 to 48 bns(f)=0 next f for f=1 to week-1 bon=bonus(bonb) bns(bon-1)=bns(bon-1)+1 inc bonb next f for f=0 to 48 n(f)=0 next f for f=1 to week-1 for ball=0 to 5 nn=lot(ball,bl) n(nn-1)=n(nn-1)+1 next ball inc bl next f x=46:y=727:yyd=7 ink rgb(255,0,0),0 for f=1 to 9 ink rgb(255,255,255),0 yy=n(f-1)*yyd box x,y-yy,x+17,y ink rgb(0,255,255),0 yyb=bns(f-1)*yyd box x,y-(yyb+yy),x+17,y-yy x=x+19 next f for f=10 to 19 ink rgb(0,155,255),0 yy=n(f-1)*yyd box x,y-yy,x+17,y ink rgb(0,255,255),0 yyb=bns(f-1)*yyd box x,y-(yyb+yy),x+17,y-yy x=x+19 next f for f=20 to 29 ink rgb(255,55,55),0 yy=n(f-1)*yyd box x,y-yy,x+17,y ink rgb(0,255,255),0 yyb=bns(f-1)*yyd box x,y-(yyb+yy),x+17,y-yy x=x+19 next f for f=30 to 39 ink rgb(25,255,25),0 yy=n(f-1)*yyd box x,y-yy,x+17,y ink rgb(0,255,255),0 yyb=bns(f-1)*yyd box x,y-(yyb+yy),x+17,y-yy x=x+19 next f for f=40 to 49 ink rgb(255,255,0),0 yy=n(f-1)*yyd box x,y-yy,x+17,y ink rgb(0,255,255),0 yyb=bns(f-1)*yyd box x,y-(yyb+yy),x+17,y-yy x=x+19 next f ink rgb(0,75,95),0 line 44,739,978,739 x=46:y=739 for f=1 to 50 line x,y,x,97 x=x+19 next f x=46:y=727 for f=1 to 90 line x,y,978,y y=y-yyd next f x=44:bonb=1 btn=0 SHOW MOUSE set text font "tribune" set text size 24 return about: copy bitmap 1,0 but=1 btn=0 set current bitmap 0 return hide: for f=1 to 6 hide sprite f next f return buttons: data 0,0,64,40 data 65,0,128,40 data 129,0,192,40 data 193,0,256,40 data 257,0,320,40 data 321,0,384,40 data 385,0,448,40 data 449,0,512,40 data 513,0,576,40 data 577,0,640,40 data 641,0,704,40 data 705,0,768,40 data 769,0,832,40 data 833,0,896,40 data 897,0,960,40 data 961,0,1023,40 picknumbers7: set text size 24 for b=0 to 6 ba1: balla1=rnd(48)+1 bb1: ballb1=rnd(48)+1 if ballb1=balla1 goto bb1 endif bc1: ballc1=rnd(48)+1 if ballc1=ballb1 or ballc1=balla1 goto bc1 endif bd1: balld1=rnd(48)+1 if balld1=ballc1 or balld1=ballb1 or balld1=balla1 goto bd1 endif be1: balle1=rnd(48)+1 if balle1=balld1 or balle1=ballc1 or balle1=ballb1 or balle1=balla1 goto be1 endif bf1: ballf1=rnd(48)+1 if ballf1=balle1 or ballf1=balld1 or ballf1=ballc1 or ballf1=ballb1 or ballf1=balla1 goto bf1 endif set text size 24 show all sprites ink rgb(00,0,00),0 box clx,cly,clxx,clyy x=280:y=150 gosub sortit2 balls1(b,0)=balla1 balls1(b,1)=ballb1 balls1(b,2)=ballc1 balls1(b,3)=balld1 balls1(b,4)=balle1 balls1(b,5)=ballf1 next b for g=0 to 6 for f=1 to 6 paste image balls1(g,f-1),x,y x=x+80 next f y=y+80:x=280 next g btn=0 return sortit: for f=1 to 30 if balla>ballb balla1=ballb:ballb=balla:balla=balla1 endif if ballb>ballc ballb1=ballc:ballc=ballb:ballb=ballb1 endif if ballc>balld ballc1=balld:balld=ballc:ballc=ballc1 endif if balld>balle balld1=balle:balle=balld:balld=balld1 endif if balle>ballf balle1=ballf:ballf=balle:balle=balle1 endif next f return sortit2: for f=1 to 30 if balla1>ballb1 balla1a=ballb1:ballb1=balla1:balla1=balla1a endif if ballb1>ballc1 ballb1a=ballc1:ballc1=ballb1:ballb1=ballb1a endif if ballc1>balld1 ballc1a=balld1:balld1=ballc1:ballc1=ballc1a endif if balld1>balle1 balld1a=balle1:balle1=balld1:balld1=balld1a endif if balle1>ballf1 balle1a=ballf1:ballf1=balle1:balle1=balle1a endif next f return Datupdate: oop2: set text size 24 ball=0 hide all sprites set cursor 260,220 ink rgb(0,0,0),0 box clx,cly,clxx,clyy ink rgb(0,255,255),0 print "Input date of draw e.g. (05/12/2000)" set cursor 560,220 ink rgb(255,255,0),0 input d$ if LOWER$(d$)="exit" ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops2 endif if len(d$)<>10 goto oop2 endif dates$(wek-1)=d$ ink rgb(0,0,0),0 box clx,cly,clxx,clyy for f=0 to 5 set cursor 260,220 ink rgb(255,255,50),rgb(00,0,0) print "Input number ";f+1 agains: set cursor 390,220 ink rgb(100,200,255),0 input b if b>49 goto agains endif if b<1 ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops2 endif lot(f,wek-1)=b ink rgb(0,0,0),0 box clx,cly,clxx,clyy next f set cursor 260,220 ink rgb(255,255,50),rgb(00,0,0) print "Input Bonus " agains2: set cursor 390,220 ink rgb(100,200,255),0 input b if b>49 goto agains2 endif if b<1 ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops endif bonus(wek-1)=b ink rgb(0,0,0),0 box clx,cly,clxx,clyy set cursor 260,220 ink rgb(0,0,0),0 box clx,cly,clxx,clyy dt1$=str$(lot(0,wek-1)) dt2$=str$(lot(1,wek-1)) dt3$=str$(lot(2,wek-1)) dt4$=str$(lot(3,wek-1)) dt5$=str$(lot(4,wek-1)) dt6$=str$(lot(5,wek-1)) dt7$=str$(bonus(wek-1)) pba$=dt1$+" / "+dt2$+" / "+dt3$+" / "+dt4$+" / "+dt5$+" / "+dt6$ ink rgb(255,255,50),0 ink rgb(255,255,50),0 set text font "tribune" set text size 48 tx=300:ty=350 center text 512,ty,pba$ ink rgb(255,140,0),0 center text 512,ty+200,"date = "+d$ ink rgb(0,255,255),0 center text 512,ty+48,dt7$ ball=0 btn=0 ink rgb(255,255,250),rgb(00,0,00) center text 512,240,"IS THIS CORRECT Y/N" set cursor 512,286:input yn$ if yn$="y" ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto okeys else ink rgb(0,0,0),0 box clx,cly,clxx,clyy goto oops2 endif okeys: ink rgb(0,0,0),0 box clx,cly,clxx,clyy pba$=dt1$+" / "+dt2$+" / "+dt3$+" / "+dt4$+" / "+dt5$+" / "+dt6$+" / "+dt7$ ink rgb(255,255,50),0 tx=300:ty=250 btn=0 oops2: set text size 24 return average: set text size 24 ink rgb(255,255,0),0 bv=0:bvb=0 ink rgb(0,0,0),0 box clx,cly,clxx,clyy for f=0 to 5 for p=0 to week avrg(f,p)=lot(f,p) next p next f for f=0 to 5 for p=0 to week bv=bv+avrg(f,p) next p bvg(f)=bv/week bv=0 next f x=280:y=350 for f=0 to 5 paste image bvg(f),x,y x=x+80 next f tx=512:ty=250 for f=0 to 5 ink rgb(255,255,0),0 center text tx,ty,"AVERAGE FOR ALL 6 BALL DRAWS FOR ALL DRAW DATES" next f btn=0 return min: ink rgb(0,0,0),0 box clx,cly,clxx,clyy minball=0 minn=1 for f=1 to 49 for w=1 to week-1 mn=lot(minball,w) if mn=minn min(minball)=mn inc minball endif next w inc minn next f tx=512:ty=250 ink rgb(255,255,0),0 center text tx,ty,"MINIMUM FOR ALL 6 BALL DRAWS FOR ALL DRAW DATES" x=280:y=350 ink rgb(255,255,0),0 for f=0 to 5 paste image min(f),x,y x=x+80 next f btn=0 return max: ink rgb(0,0,0),0 box clx,cly,clxx,clyy maxball=5 maxn=49 for f=1 to 49 for w=1 to week-1 mx=lot(maxball,w) if mx=maxn max(maxball)=mx dec maxball endif next w dec maxn next f tx=512:ty=250 ink rgb(255,255,0),0 center text tx,ty,"MAXIMUM FOR ALL 6 BALL DRAWS FOR ALL DRAW DATES" x=280:y=350 ink rgb(255,255,0),0 for f=0 to 5 paste image max(f),x,y x=x+80 next f btn=0 return hot: px=60:py=120 ink rgb(0,0,0),0 box clx,cly,clxx,clyy for f=0 to 48 hot(f)=0 next f ink rgb(255,255,70),0 for f=0 to 5 for w=1 to week-1 ht=lot(f,w) hot(ht-1)=hot(ht-1)+1 next w next f htn=0 htw=week-1 for p=1 to week-1 for f=0 to 48 if hot(f)=htw hot2(htn)=f+1 inc htn if htn=6 goto donehot endif endif next f dec htw next p donehot: tx=512:ty=250 ink rgb(255,255,0),0 center text tx,ty,"SIX HOTTEST NUMBERS USING ALL LOTTO DRAW DATA" x=280:y=350 ink rgb(255,255,0),0 gosub sortithot for f=0 to 5 paste image hot2(f),x,y x=x+80 next f btn=0 return cold: px=60:py=120 ink rgb(0,0,0),0 box clx,cly,clxx,clyy for f=0 to 48 cold(f)=0 next f ink rgb(255,255,70),0 for f=0 to 5 for w=1 to week-1 cd=lot(f,w) cold(cd-1)=cold(cd-1)+1 next w next f cdn=0 cdw=0 for p=1 to week-1 for f=0 to 48 if cold(f)=cdw cold2(cdn)=f+1 inc cdn if cdn=6 goto donecold endif endif next f inc cdw next p donecold: x=280:y=350 ink rgb(255,255,0),0 gosub sortit3 tx=512:ty=250 ink rgb(255,255,0),0 center text tx,ty,"SIX COLDEST NUMBERS USING ALL LOTTO DRAW DATA" for f=0 to 5 paste image cold2(f),x,y x=x+80 next f btn=0 return sortit3: cballa1=cold2(0) cballb1=cold2(1) cballc1=cold2(2) cballd1=cold2(3) cballe1=cold2(4) cballf1=cold2(5) for f=1 to 30 if cballa1>cballb1 cballa1a=cballb1:cballb1=cballa1:cballa1=cballa1a endif if cballb1>cballc1 cballb1a=cballc1:cballc1=cballb1:cballb1=cballb1a endif if cballc1>cballd1 cballc1a=cballd1:cballd1=cballc1:cballc1=cballc1a endif if cballd1>cballe1 cballd1a=cballe1:cballe1=cballd1:cballd1=cballd1a endif if cballe1>cballf1 cballe1a=cballf1:cballf1=cballe1:cballe1=cballe1a endif next f cold2(0)=cballa1 cold2(1)=cballb1 cold2(2)=cballc1 cold2(3)=cballd1 cold2(4)=cballe1 cold2(5)=cballf1 return sortithot: hballa1=hot2(0) hballb1=hot2(1) hballc1=hot2(2) hballd1=hot2(3) hballe1=hot2(4) hballf1=hot2(5) for f=1 to 30 if hballa1>hballb1 hballa1a=hballb1:hballb1=hballa1:hballa1=hballa1a endif if hballb1>hballc1 hballb1a=hballc1:hballc1=hballb1:hballb1=hballb1a endif if hballc1>hballd1 hballc1a=hballd1:hballd1=hballc1:hballc1=hballc1a endif if hballd1>hballe1 hballd1a=hballe1:hballe1=hballd1:hballd1=hballd1a endif if hballe1>hballf1 hballe1a=hballf1:hballf1=hballe1:hballe1=hballe1a endif next f hot2(0)=hballa1 hot2(1)=hballb1 hot2(2)=hballc1 hot2(3)=hballd1 hot2(4)=hballe1 hot2(5)=hballf1 return statpick: ink rgb(0,0,0),0 box clx,cly,clxx,clyy statpk(0)=cold2(rnd(5)) stpkb: statpk(1)=hot2(rnd(5)) if statpk(1)=statpk(0) goto stpkb endif stpkc: statpk(2)=max(rnd(5)) if statpk(2)=statpk(1) or statpk(2)=statpk(0) goto stpkc endif stpkd: statpk(3)=min(rnd(5)) if statpk(3)=statpk(2) or statpk(3)=statpk(1) or statpk(3)=statpk(0) goto stpkd endif stpke: statpk(4)=bvg(rnd(5)) if statpk(4)=statpk(3) or statpk(4)=statpk(2) or statpk(4)=statpk(1) or statpk(4)=statpk(0) goto stpke endif stpkf: statpk(5)=rnd(48)+1 if statpk(5)=statpk(4) or statpk(5)=statpk(3) or statpk(5)=statpk(2) or statpk(5)=statpk(1) or statpk(5)=statpk(0) goto stpkf endif tx=512:ty=250 ink rgb(255,255,0),0 center text tx,ty,"STASTICAL PICK USING ALL LOTTO DRAW DATA" gosub sortit4 x=280:y=350 for f=0 to 5 paste image statpk(f),x,y x=x+80 next f btn=0 return sortit4: sballa1=statpk(0) sballb1=statpk(1) sballc1=statpk(2) sballd1=statpk(3) sballe1=statpk(4) sballf1=statpk(5) for f=1 to 30 if sballa1>sballb1 sballa1a=sballb1:sballb1=sballa1:sballa1=sballa1a endif if sballb1>sballc1 sballb1a=sballc1:sballc1=sballb1:sballb1=sballb1a endif if sballc1>sballd1 sballc1a=sballd1:sballd1=sballc1:sballc1=sballc1a endif if sballd1>sballe1 sballd1a=sballe1:sballe1=sballd1:sballd1=sballd1a endif if sballe1>sballf1 sballe1a=sballf1:sballf1=sballe1:sballe1=sballe1a endif next f statpk(0)=sballa1 statpk(1)=sballb1 statpk(2)=sballc1 statpk(3)=sballd1 statpk(4)=sballe1 statpk(5)=sballf1 return |