line=nbdraw.line wait=misc.wait pixeltest=nbdraw.pixeltest print=nbdraw.print cursor=nbdraw.setcursor clear(0) misc.contrast(-1) misc.contrast(-1) function exit() if key(36) then misc.exit() end end for z=1,220,5 do cursor(3,2) print(" -florian66- vous presente") cursor(7,6) print("chargement :") cursor(8,z/10) print("-") end repeat local a,b=64,10 local c,d,e,f=16,32,48,64 -- variables reservees aux plaques en y local p1,p2,p3,p4=20,60,40,80 -- variables reservees aux plaques en x local montee=0 local score=0 local vit=1 local fichier = (file.search("LFmoof") ) or file.new("LFmoof",1) local best=file.read(fichier,1) function vache() line(a,b,a+5,b) -- dessin de la vache line(a+5,b,a+5,b+5) line(a+5,b+5,a,b+5) line(a,b+5,a,b) line(a+1,b+5,a+1,b+7) line(a+4,b+5,a+4,b+7) if key(45) then line(a,b+2,a-2,b+2) line(a-3,b+1,a-3,b+4) line(a+5,b+2,a+7,b+3) elseif key(50) then line(a+5,b+2,a+8,b+2) line(a+8,b+1,a+8,b+4) line(a,b+2,a-2,b+3) else line(a+1,b,a,b-2) line(a-1,b-2,a+2,b-2) line(a+5,b+2,a+7,b+3) end end clear(0) wait(10) repeat cursor(1,3) print("moofall, jeu de la") cursor(2,10) print("vache !!") cursor(6,1) print("appuyer sur EXE") cursor(4,4) print("score :") cursor(4,12) print(file.read(fichier,1)) cursor(8,4) print("reset score = DEL") exit() if key(19) then file.write(fichier,1,0) clear(0) end wait(1) until key(5) repeat a=(key(45) and a-vit-1) or (key(50) and a+vit+1) or a if montee==0 then b=b+vit elseif montee==1 then b=b-vit end c,d,e,f=c-vit,d-vit,e-vit,f-vit vit=(score+20)/100 plaquex={p1,p1+20,p2,p2+20,p3,p3+40,p4,p4+30} plaquey={c,c,d,d,e,e,f,f} for z=1,8,2 do line(plaquex[z]-2,plaquey[z],plaquex[z+1]+2,plaquey[z+1]) line(plaquex[z],plaquey[z]+1,plaquex[z+1],plaquey[z+1]+1) line(plaquex[z],plaquey[z]+2,plaquex[z+1],plaquey[z+1]+2) end vache() exit() cursor(1,1) print(score) for w=1,2 do if pixeltest(a+w+1,b+7)==1 or pixeltest(a+w+1,b+8)==1 then montee=1 else montee=0 end end if c<=1 then c=64 -- limite des plaques p1=misc.random(105)+1 score=score+10 elseif d<=1 then d=64 p2=misc.random(105)+1 score=score+10 elseif e<=1 then e=64 p3=misc.random(85)+1 score=score+15 elseif f<=1 then f=64 p4=misc.random(95)+1 score=score+10 end if a<=4 then a=4 elseif a>=120 then a=120 end vache() if key(46)-- pause then cursor(1,10) print("pause") cursor(8,1) print("appuyer sur F2") wait(50) exit() repeat clear(0) exit() wait(1) until key(46) wait(10) end best=file.read(fichier,1) clear(0) until key(1) or b>=64 or b<=-5 if score >= best then file.write(fichier,1,score) end clear(0) for z=1,60 do cursor(3,8) print("PERDU !") cursor(5,6) print("score") cursor(5,12) print(score) cursor(7,6) print("best") cursor(7,12) print(file.read(fichier,1)) end clear(0) wait(10) repeat cursor(3,2) print("recommencer = exe") cursor(5,6) print("quitter = exit") exit() wait(1) until key(5) until key(1)