0,]']>S}Wup8d%qy)6o;]AsVl333333333333333333333333333>33NDDDDDDDDDDDDDDDDDDDDDDDDDDNDD^UUUUUUUUUUUUUUUUUUUUUUUUUU^UU宪ꪪꞙ陙nffffffffffffffffffffffffffnff"""."""""""""""""""""""""""""""""""""""""""""""""""""""""""""333>333333333333333333333333333333333333333333333333333333333DDDNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUU^UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU"""""""""""""""""""""""".""""""""""""""""""""""""""""""""""""333333333333333333333333>333333333333333333333333333333333333DDDDDDDDDDDDDDDDDDDDDDDDNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUU^UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU""./""""""""""//......./......./.....""""""""""..../""`OODDwwwwwwwwwwwwOD@ODDwp|wwwwwpwE&'()()"#tuvwtuvw$%()  0=;6<9231=:704=<0560313?8<10=?AAAAAABCCDDDEFFGHHIIJKKLLMMNNO 4:?94>00:?204;>=0010:1><59420?7cc cc7cc cc7cc cc7cc cc7cc cc7cc cc7cc cc7ccCcC CCCoCoCoCoCoCoCoCCcC CCCoCoCoCoCoCoCoCCcC CCCDD DDD $ $DD DDD $ $DD DDD $ $DD DDD $ $DD DD$$$$$$$$$$$$7?  """""""/""/""""."/"."."/".""//."......bff.&ff`fbff`fbff.`f&ff.`f&ff`ffbfffb.`f&. //.@DD./@DD/N@DDNDDDDDDDDDDDDDDDODDDDDDDDDDDDDDDDDDD.NDDDDDDDDDDD..NDDDDDD@DDD..CDD@..3@D@D@..3@D@D@..3D./>33CD@DD@0../33#DDD0/..23"@DDDD@3.,.""BD@D@3.,"""DD3.,33"D@D3.,0DDD3.,3#@DDDDDD.?30CDD@DDDDD.30CDDDDD3333330330DDDDD333333CDDDDD333333333DDDDDD333333333DDDDDD,?3333333?DDDDDD/333333DDDDDD/>333>3DDDDDD/33ODDDDDDDDDNDDDDD../....///......."//.".."/"."."//""./"",""""4-- title: Missing Buble -- author: OdiStudio Games -- desc: miss all ball -- script: lua -- saveid: ball -- var player t=0 x=106 y=64 -- var one spawn pp=0 -- table player={} function addPlayer(x,y) local p = {} p.x=x p.y=y p.sprite=257 p.live=3 p.dx=0 p.dy=0 p.flip=0 p.d=0 p.di=0 p.dt=1 p.t = 0 table.insert(player,p) end function ticPlayer() ticPart() for k,p in pairs(player) do p.x = p.x + p.dx p.y = p.y + p.dy -- controlle du player -- deplacement du player if btn(0) and p.y>0 then p.t=p.t+1 p.y=p.y-1 end if btn(1) and p.y<128 then p.t=p.t+1 p.y=p.y+1 end if btn(2) and p.x>-1 then p.t=p.t+1 p.x=p.x-1 p.flip=1 end if btn(3) and p.x<234 then p.t=p.t+1 p.x=p.x+1 p.flip=0 end -- graphisme du player if p.d==0 then spr(257+p.t//10%2,p.x,p.y,7,1,p.flip) end -- remove player if p.d==1 then p.di=p.di+p.dt addPart(p.x+4,p.y+4,15) addPart(p.x+4,p.y+4,4) addPart(p.x+4,p.y+4,12) addPart(p.x+4,p.y+4,0) end if p.di>=20 then table.remove(player,k) kk=kk+1 end -- balle for i,v in pairs(balle) do if v.x <= p.x+12 and v.x >= p.x-12 and v.y <= p.y+12 and v.y >= p.y-12 then p.d=1 sfx(1,1,10,0,10,10) end end -- baller for i,v in pairs(baller) do if v.x <= p.x+12 and v.x >= p.x-12 and v.y <= p.y+12 and v.y >= p.y-12 then p.d=1 sfx(1,1,10,0,10,10) end end -- Bombe balle for i,v in pairs(bballe) do if v.x <= p.x+12 and v.x >= p.x-12 and v.y <= p.y+12 and v.y >= p.y-12 then p.d=1 sfx(1,1,10,0,10,10) end end -- Explosion for i,v in pairs(ex) do if v.x <= p.x+3 and v.x >= p.x-3 and v.y <= p.y+3 and v.y >= p.y-3 then p.d=1 sfx(1,1,10,0,10,10) end end -- cicle explomb for i,c in pairs(cir) do if c.ps==0 and c.cd==1 and c.x <= p.x+500 and c.x >= p.x-500 and c.y <= p.y+500 and c.y >= p.y-500 then p.d=1 sfx(1,1,10,0,10,10) end if c.cd==0 and c.x <= p.x+50 and c.x >= p.x-50 and c.y <= p.y+50 and c.y >= p.y-50 then c.ps=1 else c.ps=0 end if c.x <= p.x+50 and c.x >= p.x-50 and c.y <= p.y+50 and c.y >= p.y-50 then c.ps=1 end end -- end end -- add particles part={} function addPart(x,y,c) local pa={} pa.x=x pa.y=y pa.dx=math.random(-30.0,30.0)/20 pa.dy=math.random(-30.0,30.0)/20 pa.c=c pa.t=0 table.insert(part,pa) end function ticPart() for k,pa in pairs(part) do pa.t=pa.t+1 pa.x=pa.x+pa.dx pa.y=pa.y+pa.dy pix(pa.x,pa.y,pa.c) if pa.t>=30 then table.remove(part,k) end end end -- add circle spawn balle apar={} function addApar(x,y,balle) local ap={} ap.x=x ap.y=y ap.balle=balle ap.dx=0 ap.dy=0 ap.c=math.random(1,12) ap.r=30 ap.rr=1 ap.t=0 ap.tt=0 table.insert(apar,ap) end function ticApar() for k,ap in pairs(apar) do ap.t=ap.t+1 ap.x=ap.x+ap.dx ap.y=ap.y+ap.dy ap.r=ap.r-ap.rr circb(ap.x,ap.y,ap.r,ap.c) sfx(2,"F-5",100) -- spawn balle if ap.balle==1 then if ap.r<=0 then addBalle(ap.x,ap.y,ap.c) table.remove(apar,k) end end -- spawn baller if ap.balle==2 then if ap.r<=0 then addBaller(ap.x,ap.y,ap.c) table.remove(apar,k) end end -- spawn bombe balle if ap.balle==3 then if ap.r<=0 then addBballe(ap.x,ap.y,0) table.remove(apar,k) end end end end -- add ball baller={} function addBaller(x,y,c) local br={} br.x=x br.y=y br.dx=math.random(2) br.dy=math.random(2) br.dxx=0 br.dyy=0 br.rdx=math.random(0,1) br.rdy=math.random(0,1) br.cc=c br.r=0 br.rp=0.4 br.rm=0.2 br.t=0 table.insert(baller,br) end function ticBaller() ticPart() for k,br in pairs(baller) do br.t=br.t+1 br.dx=br.dxx br.dy=br.dyy -- draw if br.t<300 then br.r=br.r+br.rp end if br.r>=5 then br.r=5 end if br.r>0 and br.r<5 then addPart(br.x,br.y,br.cc) end circ(br.x,br.y,br.r,br.cc) circb(br.x,br.y,br.r,0) -- move if br.dx==0 then br.dx=math.random(2) end if br.dy==0 then br.dy=math.random(2) end if br.x<=0 then br.x=0 br.rdx=0 elseif br.x>=235 then br.x=235 br.rdx=1 end if br.y<=0 then br.y=0 br.rdy=0 elseif br.y>=130 then br.y=130 br.rdy=1 end if br.rdx==0 then br.x=br.x+br.dx elseif br.rdx==1 then br.x=br.x-br.dx end if br.rdy==0 then br.y=br.y+br.dy elseif br.rdy==1 then br.y=br.y-br.dy end -- add particles if br.t>=300 then br.r=br.r-br.rm sfx(3,"D-1") end -- delete if br.r<=0 then table.remove(baller,k) end end end -- add ball balle={} function addBalle(x,y,c) local b={} b.x=x b.y=y b.dx=0 b.dy=0 b.rdx=math.random(0,1) b.rdy=math.random(0,1) b.cc=c b.r=0 b.rp=0.4 b.rm=0.2 b.t=0 table.insert(balle,b) end function ticBalle() ticPart() for k,b in pairs(balle) do b.t=b.t+1 b.x=b.x+b.dx b.y=b.y+b.dy -- limite if b.x<=0 then b.x=0 elseif b.x>=237 then b.x=237 end if b.y<=0 then b.y=0 elseif b.y>=130 then b.y=130 end -- draw if b.t<300 then b.r=b.r+b.rp end if b.r>=5 then b.r=5 end if b.r>0 and b.r<5 then addPart(b.x,b.y,b.cc) end circ(b.x,b.y,b.r,b.cc) circb(b.x,b.y,b.r,0) -- move if b.x<=0 then b.rdx=0 elseif b.x>=235 then b.rdx=1 end if b.y<=0 then b.rdy=0 elseif b.y>=130 then b.rdy=1 end if b.rdx==0 then b.dx=1 elseif b.rdx==1 then b.dx=-1 end if b.rdy==0 then b.dy=1 elseif b.rdy==1 then b.dy=-1 end -- add particles if b.t>=300 then b.r=b.r-b.rm sfx(3,"D-1") end -- delete if b.r<=0 then table.remove(balle,k) end end end -- explosion ex={} palete = {4,3,2,15,0} function addEx(x,y) local e = {} e.x = x + math.random(-10.0,10.0) e.y = y + math.random(-10.0,10.0) e.size = math.random(2) e.dx = math.random(-1,1)/10.0 e.dy = math.random(-1,1)/10.0 e.sz = math.random(5,9) e.t = 0 e.szt = 0 table.insert(ex,e) end function ticEx() local s=0 local s2=0 local c=0 for k,e in pairs(ex) do e.x=e.x + e.dx e.y=e.y + e.dy e.t=e.t + 1 e.szt= 0.2 e.sz=e.sz-e.szt c = palete[math.ceil(e.t/5)] s = math.log(e.t / 2.0) s2 = s/2.0 circ(e.x,e.y,e.sz,c) if e.sz<=0 then table.remove(ex,k) end end end -- add Bombe ball bballe={} function addBballe(x,y,c) local bb={} bb.x=x bb.y=y bb.dx=0 bb.dy=0 bb.rdx=math.random(0,1) bb.rdy=math.random(0,1) bb.cc=c bb.apb=0 bb.r=0 bb.rp=0.4 bb.rm=0.2 bb.tx=1 bb.t=0 table.insert(bballe,bb) end function ticBballe() ticPart() ticEx() for k,bb in pairs(bballe) do bb.t=bb.t+1 bb.apb=bb.apb+1 bb.x=bb.x+bb.dx bb.y=bb.y+bb.dy -- draw if bb.t<300 then bb.r=bb.r+bb.rp end if bb.r>=5 then bb.r=5 end if bb.r>0 and bb.r<5 then addPart(bb.x,bb.y,bb.cc) end circ(bb.x,bb.y,bb.r,bb.cc) circb(bb.x,bb.y,bb.r,0) if bb.apb>=3 then addEx(bb.x,bb.y) bb.apb=0 end -- move for s,p in pairs(player) do if bb.x>p.x+10 then bb.dx=-0.5 end if bb.xp.y+10 then bb.dy=-0.5 end if bb.y=300 then bb.r=bb.r-bb.rm addEx(bb.x,bb.y) bb.tx=bb.tx+bb.rp circb(bb.x,bb.y,bb.tx,0) sfx(1,"E-4") end -- delete if bb.r<=0 then table.remove(bballe,k) end end end -- add circle cir={} function addCir(x,y) local c={} c.x=x c.y=y c.dx=0 c.dy=0 c.c=math.random(1,12) c.r=200 c.rr=1 c.cd=0 c.rt=0 c.ps=0 c.t=0 c.tt=0 table.insert(cir,c) end function ticCir() for k,c in pairs(cir) do c.t=c.t+1 c.x=c.x+c.dx c.y=c.y+c.dy -- draw circb(c.x,c.y,c.r,c.c) -- update if c.cd==0 then c.r=c.r-c.rr elseif c.cd==1 then c.r=c.r+c.rr*20 sfx(5,"F-8") end if c.r<=50 and c.cd==0 then c.r=50 c.rt=1 end if c.rt==1 then c.tt=c.tt+1 end if c.tt>150 then circb(c.x,c.y,c.r,0) c.cd=1 end -- delete if c.r>300 then table.remove(cir,k) end end end function update() if btn(0) then y=y-1 end if btn(1) then y=y+1 end if btn(2) then x=x-1 end if btn(3) then x=x+1 end end -- draw -- draw Score if pmem(0)==nil then pmem(0,0) end if pmem(1)==nil then pmem(1,0) end if pmem(2)==nil then pmem(2,0) end if pmem(3)==nil then pmem(3,0) end if pmem(4)==nil then pmem(4,0) end function score() print("Score : "..ttim,10,2,0) print("Hingh Score : "..htim,145,2,0) if ttim>=htim then htim=ttim if htim>pmem(4) then if htim>pmem(3) then pmem(4,pmem(3)) if htim>pmem(2) then pmem(3,pmem(2)) if htim>pmem(1) then pmem(2,pmem(1)) if htim>pmem(0) then pmem(1,pmem(0)) pmem(0,htim) else pmem(1,htim) end else pmem(2,htim) end else pmem(3,htim) end else pmem(4,htim) end end end end -- draw ennmies alx=0 aly=0 one1=0 one2=0 te=0 -- score and time ttim=0 -- hing score htim=270 -- tim=0 spawn1=0 spawn2=0 function draw_ennemies() ticBalle() ticBaller() ticBballe() ticApar() ticCir() alx=math.random(230) aly=math.random(130) spawn1=math.random(2) spawn2=math.random(3) if spawn1==0 then spawn1=math.random(2) end if spawn2==0 then spawn2=math.random(3) end if btnp(4) then addCir(alx,aly,3) end -- score score() -- spawn ennemies for time if tim>60 then ttim=ttim+1 tim=0 end if ttim<40 then if one1>=150 then one1=0 addApar(alx,aly,spawn1) end end if ttim>40 and ttim<60 then if one1>=120 then one1=0 addApar(alx,aly,spawn1) end end if ttim>60 and ttim<100 then if one1>=120 then one1=0 addApar(alx,aly,spawn2) end end if ttim>100 and ttim<150 then if one1>=100 then one1=0 addApar(alx,aly,spawn2) end if one2>=230 then one2=0 addCir(alx,aly,3) end end if ttim>150 then if one1>=80 then one1=0 addApar(alx,aly,spawn2) end if one2>=200 then one2=0 addCir(alx,aly,3) end end -- tim=tim+1 one1=one1+1 one2=one2+1 end -- draw player kk=0 die=0 dte=0 dtext="" dt1="Oooops..." dt2="NOOOOOOOOOO!!!!!" dt3="Ho my God!!!!" dt4="Aie!" function draw_player() ticPlayer() if pp==0 then addPlayer(120,60) dte=math.random(4) pp=1 end -- die texte if dte==0 then dte=math.random(4) end if dte==1 and kk==1 then dtext=dt1 elseif dte==2 and kk==1 then dtext=dt2 elseif dte==3 and kk==1 then dtext=dt3 elseif dte==4 and kk==1 then dtext=dt4 end if kk==1 then print(" "..dtext,90,60,12) end -- die player if kk==1 then die=die+1 one1=0 one2=0 te=0 ttim=0 tim=0 print() end if die>300 then table.remove(balle) table.remove(baller) table.remove(bballe) table.remove(apar) table.remove(cir) table.remove(player) table.remove(part) table.remove(ex) one1=0 one2=0 te=0 ttim=0 tim=0 end if die>=500 then zero=menu pp=0 kk=0 die=0 dtext="" end end function draw() cls(13) map() draw_ennemies() draw_player() t=t+1 end -- menu xx=86 yy=44 function zero() cls() zero=menu end function menu() -- interface menu if btnp(0) then yy=yy-10 end if btnp(1) then yy=yy+10 end if yy <= 44 then yy = 44 elseif yy >= 64 then yy = 64 end if yy == 44 and btnp(5) then table.remove(balle) table.remove(baller) table.remove(bballe) table.remove(apar) table.remove(cir) table.remove(part) table.remove(ex) zero=wait end if yy == 54 and btnp(5) then zero=about end if yy == 64 and btnp(5) then zero=exitt end -- cls(13) map() score() alx=math.random(230) aly=math.random(130) spawn=math.random(3) if spawn==0 then spawnmath.random(3) end if one1>=100 then addApar(alx,aly,spawn) one1=0 end if one2>=100 then addCir(alx,aly) one2=0 end ticBalle() ticBaller() ticBballe() ticApar() ticCir() print("-->",xx-5,yy,0) print("start",96,44,0) print("about",96,54,0) print("exit",96,64,0) print("select x",190,130,0) print("Press -q- for maine pause in game ",2,130,0) print("Missing-Buble",46,20,0,0,2) one1=one1+1 one2=one2+1 end -- game function pause() if kk==0 then if btnp(6) then zero=start end print("PAUSE",70,50,12,2,4) print("Press -Q- for exit pause ",2,120,12) end end function start() cls() draw() update() if kk==0 then if btnp(6) then zero=pause end end end -- wait for start game gb=0 gg=200 gm=4 function wait() cls() circb(120,70,gg,2) if gg<=-200 then zero=start gg=300 gb=0 else gg=gg-gm end if gg<=0 then circ(120,70,gb,14) gb=gb+gm end print("Please wait...",80,70,1) table.remove(balle) table.remove(baller) table.remove(bballe) table.remove(apar) table.remove(cir) table.remove(part) table.remove(ex) end -- function exitt() cls() trace("thanks for playing") exit() end function about() cls() print("contact me: odistudio4444@gmail.com",26,44) print("Donate me : hodykodi@gmail.com",46,54) print("version 1.0.0",96,64) if btnp(5) then zero=menu end end -- end menu function TIC() zero() end