0 D$404mNJNL04e$FHuqaY}},m,Ҫm^ P2TvͫgE#2Tv2TvDDDDDͫgE#ͫgE#陙陙陙陙陞陙 陙 [[ [ [ [ 陙陙 陙鐙陙陙 [ UU[ [[ U [U [ [ [ U [ [[[U[[  [[ U P[P!"""" " " """"""""!"" """"""""""!""!"""""KDDDDKDKDDDK[DKDDDDD[ D D D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@DDUUU@ @T@@T@@@U@ @ @@@ "" "" " """""""""""""""""""""""""" """""""""""""""""" "" """"""""""""""" """"""DDDDDD@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@D@D@DDDDDDDDDDDDDDDD@DDDDD@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDIIDDDDIIIIDDDDIIDDDDDDDDIIIIIIIIIIIIDDDDDDDDIDDDDIIDDDDIDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDIIDDDDDIDIIDDDDIIDDDDDDDDDIDIIIIIDIIIIIDDDDDDDDDIDIIIIDIIIIIDDDDIIDDDDIIDDDDII@@IDDDDIIDDDDIDDDDDDDDIDDDDIIDDDDDDDDDDDDIIDDDDDDDDDDDD3337373333373333377333333337s333wwwwwwwwwwwwwwwwpwwpwwwwpWwwWWwwUUwWuuwUuPUuPWwUwpwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwUwuWWwuWWwuUWwUUUUuwwWwwwWUwwwWw33333333333333333333333333333333wwwwwwwwwwwwwwwww333737333373s33www3ww73w73sw3337s3773333373s33733ww33sws3sw333w333s33s337333333wwwwwЪw3ݪpӪЭowpw ww3w= wwwwwwwwwwwwwwwwwGDDGwwwwwwwwwwwwwwwwDDtwItIIwwwwwwwwwwwwwwwwwGDDwwwwwwwwwwwwwwwwDDuwEtEKwwwwwwwwwGDDGDDDDiwwwwwwwwDDtwItDDDDIIOPD@@ PK[DDDDDD @TDET DTTKT@DKDTPDKE@@EP PDDDTD  DDKT TDDD[EPTDEDK@DDTDE @EDDE@@@@P@ ETTE@TP KEDDD@D@DDEDDTEEDDDTEKU Po DDDDiDDDDIDDDDIIIIIDDDDTDDDiDDDDIDDDDIYIYUIYIIDDDDffDDDDO@ff@@IIIDDDDw7ww7wwswwwwwwww777wwww7wswwswwsIIIIIIIIPDD@PDD@@T@TDED @ DDTE@TP KEDDD@D@DDDDTD  DDKT TDDDKTE@DUEEPDDPTPEDDEDDE@@@@P@ ETLDDDLDDDDDDD><<><<><?00000011>? *  0/0  !N@0101NO)*    01XYZijklm3-00 ./    1011/ 100 >? +0,0333../ *W110011111111100 '( ;@@?./ 00101111110P()  '( K@LN@O>? 0001111110`  KLKL p           ` ` P *==-33pq  3BB=C4C  C3./ ./BD2  C>?>?./-./3B  *,--./KLMKL>?=>?C  1=>?KLMNO./ /  KLMNO>??   )* KLKLKLO        ./ ]^   >?=./  ./=mn KL KL=NOM>?= =>?M=KL KL MNOM MNOM    PQRSTUV`abcde pqrstu  QRSTUVWPQ abcdefg`a e qrstuvw././pqrst >?3>? NO./C3./NO >?C>?./ NONO>? UVW U defg de stuvw st tu  qr   > !!!"#$%&&')*,/                       ?????????????@@???????????_________________________________________________________________________________________________________H_X_hH_X_8x_8_H__x_8x_H_(_x__H_8_x_8H__8H__8x_Hx_8H_x_8_xH__(_xx__H_H((&((?((2((0((?((;((=((!((1(()(4((=(((((=(($(((,((.((?(((0( ( (.((?(($(?((?((+(?(4(((?((?( (,(('((? II0 IGG ? [  [  [[[[[ [ [[ [[  [ [[ [[[ wwPDTDETPDDT[EPEDDTEEDDT [[[wwpw@@ TDKD TDEE@@E[[[ wwЪ wwP DE DK@TPE w3ݪ3wTDDKT@D@ KDDpӪ=K[DDTK@@ D@ED[DDTETDPDDT[Э DD@P PTE@ D@DEK[o @DKDDDDD @ET@DDU P o PDDTEDDTKTEEDD [[ @PD@D @DUE@[[  D@TP E@ [@ KDDKTE@[  T@E PDD@  TDEDDPTPD @ D@DTP@ [[ DD@DDDDDEDDET[ [[U[ [[[[ [[  [[U [ [[  U[[UU [[ [U[[[[ [[ [[[ [ [[[[[[[[[[[[ UU[[[[UUUUUUUUU[[[[  [[[[[[[[[[[[[[[[[[[[[[ [[[[U[[UUUUUU[[  [[[[[[[[[[[[[[[[[[ [[[[[[UUUUUU[[  [[[[[[[[[[[[[ [UUUU  [ UUUU[陙陙陙陙陙陙陙陙陙陙陙陙陙陙 陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陙陞N`-- title: Adventure_Qest -- author: OdiStudio Games -- desc: mini_rpg -- script: lua ennemie={ l=0; cof=0; en=""; -- slim pvm=10; dfm=0; atm=3; -- farmer_crazy pvf=15; dff=2; atf=5; -- voleur pvr=12; dfr=0; atr=8; -- loup_demon ld=0; pvld=152; dfld=8; atld=4; } coff={ coffre1=0; } player={ cc=0, pv=64; max_pv=64; pm=35; max_pm=35; niv=1; exp=0; max_exp=100; gold=300; fase_attack=0; head="heod.cheveux"; bust="bost.manteau"; down="dawn.sandale"; defense=3; attack=2; stat=2 } sort={ utislash=0; max_slash=30; niv_slash=1; slash=player.attack+4; utifeu=0; max_utifeu=30; niv_feu=1; feu=10; utiglace=0; max_utiglace=30; niv_glace=1; glace=10; utifoudre=0; max_utifoudre=30; niv_foudre=1; foudre=10; } objet={ potionHp=3; potionPm=3; boostAt=1; boostDf=1; fumigene=3; superPotion=0; ether=0; superEther=0; antidote=3; gerison=0 } arme={ poing=2; baton=3; septre=3; cauteau=5; massue=7; marteau=8; eppee=10; sabre=15; epee_magique=30 } heod={ cheveux=1; bandana=2; chapeau=3; casque=5 } bost={ manteau=1; cape=3; cotte_mail=5; plastron_fer=10 } dawn={ sadale=2; botte=3 } t=0 -- pointeur ">" x=86 y=24 -- pointeur de l'attaque ax=12 ay=102 -- pointeur de l'invenventaire et var inventaire xax=42 yay=32 z=0 -- espace d'utilisation des sorts sor=0 -- map emplacement mo=0 ma=0 -- discusion et gerence des villages vivi=0 discus=0 magasin=0 -- gere music musi=0 function zero() cls() zero=menu end function menu() music() if btnp(0) then sfx(0,"E-4") y=y-10 end if btnp(1) then sfx(0,"E-4") y=y+10 end if y <= 24 then y = 24 elseif y >= 44 then y = 44 end if y == 24 and btnp(5) and mo == 0 then zero=start mo=mo+30 musi=1 sfx(0,"E-3") end if y == 34 and btnp(5) then zero=option sfx(0,"E-3") end if y == 44 and btnp(5) then zero=about sfx(0,"E-3") end cls(13) map(mo,0) print(">",x,y) print("start",96,24) print("option",96,34) print("about",96,44) print("press x",66,118) print("MENU",86,0,15,0,2) end function barre_option() rect(200,0,40,136,player.cc) rectb(200,0,40,136,2) if player.pv/2<10 then player.cc=6 else player.cc=0 end print("pv: ".. player.pv,202,2) print("pm: ".. player.pm,202,10) print("niv.".. player.niv,202,18) print("Gx".. player.gold,202,26) print("df ".. player.defense,202,42) print("at ".. player.attack,202,34) end function controlle_menu() print(">",x,y) print("sud",96,24) print("nord",96,34) print("est",96,44) print("ouest",96,54) print("press a to cancel",86,84) print("ma"..ma,0,0) print("mo"..mo,0,10) print("y "..y,0,50) -- deplacement du curseur en mode normal if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 44 then sfx(0,"f-4") y=y+10 end -- limite du deplacement du curseur if zero==start then barre_option() end if btnp(6) and zero==start then zero=menu mo=0 ma=0 end -- deplacement du joueur if y == 24 and mo<=180 and btnp(5) then mo=mo+30 sfx(0,"f-4") ennemie.l=math.random(10) end if y == 34 and mo>=0 and btnp(5) then mo=mo-30 sfx(0,"f-4") ennemie.l=math.random(10) end if y == 44 and btnp(5) then ma=ma+17 sfx(0,"f-4") ennemie.l=math.random(10) end if y == 54 and ma>=17 and btnp(5) then ma=ma-17 sfx(0,"f-4") ennemie.l=math.random(10) end --------------------------- end function ennemies_menu() -- espace du menu des ennemie -- rect(0,0,80,36,0) -- rectb(0,0,80,36,2) -- affichage des donnee -- print(""..ennemie.en,2,4) -- print("pv "..ennemie.pv,2,12) -- print("at "..ennemie.at,2,20) -- print("df "..ennemie.df,2,28) -- donnee et spawn des ennemie if ennemie.l==1 then ennemie.en="slim" spr(258,60,10,12,5,0,0,2,2) rect(0,0,80,36,0) rectb(0,0,80,36,2) print(""..ennemie.en,2,4) print("pv "..ennemie.pvm,2,12) print("at "..ennemie.atm,2,20) print("df "..ennemie.dfm,2,28) elseif ennemie.l==2 then ennemie.en="farmer_crazy" spr(256,60,10,12,5,0,0,2,2) rect(0,0,80,36,0) rectb(0,0,80,36,2) print(""..ennemie.en,2,4) print("pv "..ennemie.pvf,2,12) print("at "..ennemie.atf,2,20) print("df "..ennemie.dff,2,28) elseif ennemie.l==3 then ennemie.en="voleur" spr(260,60,10,12,5,0,0,2,2) rect(0,0,80,36,0) rectb(0,0,80,36,2) print(""..ennemie.en,2,4) print("pv "..ennemie.pvr,2,12) print("at "..ennemie.atr,2,20) print("df "..ennemie.dfr,2,28) elseif ennemie.l==11 then ennemie.en="loup_demon" spr(298,85,14,12,5,0,0,2,2) rect(0,0,80,36,0) rectb(0,0,80,36,2) print(""..ennemie.en,2,4) print("pv "..ennemie.pvld,2,12) print("at "..ennemie.atld,2,20) print("df "..ennemie.dfld,2,28) else ennemie.en="---" end -- recompense pour l'elimination des -- ennemies par le player if ennemie.pvm<=0 then player.exp=player.exp+10 sfx(0,"E-2") ennemie.l=10 ennemie.pvm=10 sor=0 end if ennemie.pvf<=0 then player.exp=player.exp+20 sfx(0,"E-2") ennemie.l=10 ennemie.pvf=15 sor=0 end if ennemie.pvr<=0 then player.exp=player.exp+30 sfx(0,"E-2") ennemie.l=10 ennemie.pvr=12 sor=0 end if ennemie.pvld<=0 then player.exp=player.exp+250 sfx(0,"E-2") ennemie.l=10 ennemie.pvld=152 sor=0 ennemie.ld=ennemie.ld+1 end if ennemie.ld>=1 then ennemie.ld=1 end end function attack_menu() rect(0,96,210,40,0) rectb(0,96,210,40,2) -- deplacement du curseur d'attaque if btnp(0) and ay>102 then ay=ay-12 sfx(0,"f-4") end if btnp(1) and ay<126 then ay=ay+12 sfx(0,"f-4") end if btnp(2) and ax>102 then ax=ax-110 sfx(0,"f-4") end if btnp(3) and ax<114 then ax=ax+110 sfx(0,"f-4") end if sor==0 then print(">",ax,ay) print("attacker",16,102) print("techniques/sorts",16,114) print("defense",16,126) print("objet",126,102) print("fuite",126,114) --attack slim if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="slim" then player.pv=player.pv-ennemie.atm sfx(0,"f-1") ennemie.pvm=ennemie.pvm-player.attack end --attack farmer_crazy if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="farmer_crazy" then player.pv=player.pv-ennemie.atf sfx(0,"f-1") ennemie.pvf=ennemie.pvf-player.attack end --attack voleur if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="voleur" then player.pv=player.pv-ennemie.atr sfx(0,"f-1") ennemie.pvr=ennemie.pvr-player.attack end --attack loup_demon if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="loup_demon" then player.pv=player.pv-ennemie.atld sfx(0,"f-1") ennemie.pvld=ennemie.pvld-player.attack end --sorts if ax == 12 and ay == 114 and btnp(5) and attack_menu then sor=sor+1 sfx(0,"f-1") end --defense if ax == 122 and ay == 126 and btnp(5) and attack_menu then sfx(0,"f-1") end --objet if ax == 122 and ay == 102 and btnp(5) and attack_menu then sfx(0,"f-1") end --fuite if ax == 122 and ay == 114 and btnp(5) and attack_menu and ennemie.l<=10 then ennemie.l=10 sfx(0,"f-1") end else print(">",ax,ay) print("feu.niv"..sort.niv_feu,16,102) print("glace.niv"..sort.niv_glace,16,114) print("foudre.niv"..sort.niv_foudre,16,126) print("slash.niv"..sort.niv_slash,126,102) print("sortie",126,114) -- sort de feu contre slim if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="slim" and player.pm>10 then player.pv=player.pv-ennemie.atm sfx(0,"f-1") ennemie.pvm=ennemie.pvm-sort.feu player.pm=player.pm-10 sort.utifeu=sort.utifeu+1 -- sort de glace contre slim elseif ax == 12 and ay == 114 and btnp(5) and attack_menu and ennemie.en=="slim" and player.pm>=10 then player.pv=player.pv-ennemie.atm sfx(0,"f-1") ennemie.pvm=ennemie.pvm-sort.glace player.pm=player.pm-10 sort.utiglace=sort.utiglace+1 -- sort de foudre contre slim elseif ax == 12 and ay == 126 and btnp(5) and attack_menu and ennemie.en=="slim" and player.pm>=10 then player.pv=player.pv-ennemie.atm sfx(0,"f-1") ennemie.pvm=ennemie.pvm-sort.foudre player.pm=player.pm-10 sort.utifoudre=sort.utifoudre+1 end -- sort de feu contre farmer_crazy if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="farmer_crazy" and player.pm>=10 then player.pv=player.pv-ennemie.atf sfx(0,"f-1") ennemie.pvf=ennemie.pvf-sort.feu player.pm=player.pm-10 sort.utifeu=sort.utifeu+1 -- sort de glace contre farmer_crazy elseif ax == 12 and ay == 114 and btnp(5) and attack_menu and ennemie.en=="farmer_crazy" and player.pm>=10 then player.pv=player.pv-ennemie.atf sfx(0,"f-1") ennemie.pvf=ennemie.pvf-sort.glace player.pm=player.pm-10 sort.utiglace=sort.utiglace+1 -- sort de foudre contre farmer_crazy elseif ax == 12 and ay == 126 and btnp(5) and attack_menu and ennemie.en=="farmer_crazy" and player.pm>=10 then player.pv=player.pv-ennemie.atf sfx(0,"f-1") ennemie.pvf=ennemie.pvf-sort.foudre player.pm=player.pm-10 sort.utifoudre=sort.utifoudre+1 end -- sort de feu contre voleur if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="voleur" and player.pm>=10 then player.pv=player.pv-ennemie.atr sfx(0,"f-1") ennemie.pvr=ennemie.pvr-sort.feu player.pm=player.pm-10 sort.utifeu=sort.utifeu+1 -- sort de glace contre voleur elseif ax == 12 and ay == 114 and btnp(5) and attack_menu and ennemie.en=="voleur" and player.pm>=10 then player.pv=player.pv-ennemie.atr sfx(0,"f-1") ennemie.pvr=ennemie.pvr-sort.glace player.pm=player.pm-10 sort.utiglace=sort.utiglace+1 -- sort de foudre contre voleur elseif ax == 12 and ay == 126 and btnp(5) and attack_menu and ennemie.en=="voleur" and player.pm>=10 then player.pv=player.pv-ennemie.atr sfx(0,"f-1") ennemie.pvr=ennemie.pvr-sort.foudre player.pm=player.pm-10 sort.utifoudre=sort.utifoudre+1 end -- sort de feu contre loup_demon if ax == 12 and ay == 102 and btnp(5) and attack_menu and ennemie.en=="loup_demon" and player.pm>=10 then player.pv=player.pv-ennemie.atld sfx(0,"f-1") ennemie.pvld=ennemie.pvld-sort.feu player.pm=player.pm-10 sort.utifeu=sort.utifeu+1 -- sort de glace contre loup_demon elseif ax == 12 and ay == 114 and btnp(5) and attack_menu and ennemie.en=="loup_demon" and player.pm>=10 then player.pv=player.pv-ennemie.atld sfx(0,"f-1") ennemie.pvld=ennemie.pvld-sort.glace player.pm=player.pm-10 sort.utiglace=sort.utiglace+1 -- sort de foudre contre loup_demon elseif ax == 12 and ay == 126 and btnp(5) and attack_menu and ennemie.en=="loup_demon" and player.pm>=10 then player.pv=player.pv-ennemie.atld sfx(0,"f-1") ennemie.pvld=ennemie.pvld-sort.foudre player.pm=player.pm-10 sort.utifoudre=sort.utifoudre+1 end --objet if ax == 122 and ay == 102 and btnp(5) and attack_menu then sfx(0,"f-1") zero=inventair end --sortie if ax == 122 and ay == 114 and btnp(5) and attack_menu then sor=0 sfx(0,"f-1") end end -------------------------------- barre_option() end function inventair() ennemies_menu() rect(35,25,160,80,0) rect(40,30,150,70,2) barre_option() -- objet print(">",xax,yay) print("press a to cancel",86,184) -- objet print(xax) print(yay,0,40) if z==0 then rect(42,15,40,10,14) rectb(42,15,40,10,0) print("objets",44,17) print("potionHp*"..objet.potionHp,46,32) print("potionPm*"..objet.potionPm,46,44) print("boostAt*"..objet.boostAt,46,56) print("boostDf*"..objet.boostDf,118,32) print("fumigene*"..objet.fumigene,118,44) else rect(42,15,40,10,1) rectb(42,15,40,10,0) print("objets",44,17) end -- utilisation des objet if btnp(5) and xax==42 and yay==32 and objet.potionHp>=1 and player.pv=1 and player.pm20 then yay=yay-12 sfx(0,"f-4") end if btnp(1) and zero==inventair and yay<92 then yay=yay+12 sfx(0,"f-4") end if btnp(2) and zero==inventair and xax>42 and yay>20 then xax=xax-72 sfx(0,"f-4") -- autres menu inventaire elseif btnp(2) and zero==inventair and yay==20 and xax==42 and z>=1 and z<=3 then z=z-1 end if btnp(3) and zero==inventair and xax<114 and yay>20 then xax=xax+72 sfx(0,"f-4") -- autres menu inventaire elseif btnp(3) and zero==inventair and yay==20 and xax==42 and z>=0 and z<=1 then z=z+1 end -- limite de restoration des mp et pv if player.pv>=player.max_pv then player.pv=player.max_pv end if player.pm>=player.max_pm then player.pm=player.max_pm end if player.pm<=0 then player.pm=0 end if btnp(6) then zero=start end end function coffre() if ennemie.l==1 or ennemie.l==2 or ennemie.l==3 then attack_menu() elseif ma==17 and mo==0 and coff.coffre1==0 then spr(228,100,60,0,2,0,0,2,2) print(">",x,y) print("partir",96,24) print("ouvrir et prendre tout",96,34) print("press a to cancel",86,84) print(" "..ennemie.cof,0,100) print("ma"..ma,0,10) print("mo"..mo,0,20) if btnp(0) then y=y-10 end if btnp(1) then y=y+10 end if ennemie.cof>=1 and ennemie.cof<=3 then objet.potionHp=objet.potionHp+ennemie.cof ennemie.cof=0 elseif ennemie.cof==4 then ennemie.l=1 ennemie.cof=0 end if y == 24 and btnp(5) then sfx(0,"f-1") mo=mo+30 end if y == 34 and btnp(5) then sfx(0,"f-1") ennemie.cof=math.random(4) coff.coffre1=coff.coffre1+1 end else spr(490,100,60,7,2,0,0,2,2) print(">",x,y) print("partir",96,24) if btnp(0) then y=y-10 end if btnp(1) then y=y+10 end if y == 24 and btnp(5) then sfx(0,"f-1") mo=mo+30 end end end function village() -- carre des discusion if discus>0 then rect(0,96,210,40,0) rectb(0,96,210,40,2) end -- carre magasin if magasin==1 then cls() spr(488,28,18,12,3,0,0,2,2) spr(486,28,16,12,3,0,0,2,2) end -- graphisme des pnj du 1 village if discus>0 and vivi==0 then spr(482,60,0,12,6,0,0,2,2) spr(480,68,16,12,5,0,0,2,2) end -- graphisme des pnj du 2e village -- 1e phase if discus>0 and discus<=4 and vivi==2 then spr(482,60,0,12,6,0,0,2,2) spr(480,68,16,12,5,0,0,2,2) end if discus>4 and vivi==2 then spr(298,68,16,12,5,0,0,2,2) end -- graphisme des pnj du 2e phase -- 2e village if discus>0 and vivi==3 then spr(482,60,0,12,6,0,0,2,2) spr(480,68,16,12,5,0,0,2,2) end if ennemie.l==1 or ennemie.l==2 or ennemie.l==3 or ennemie.l==11 then attack_menu() elseif discus>0 then if btnp(5) then discus=discus+1 sfx(0,"f-1") end -- interface du 1e village elseif vivi==0 then print(">",x,y) print("vielle homme",96,34) if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 44 then sfx(0,"f-4") y=y+10 end if y == 34 and btnp(5) then discus=discus+1 sfx(0,"f-1") end -- interface du 1e phase 2 village elseif vivi==1 and magasin==0 then print(">",x,y) print("auberge",96,24) print("armurier",96,34) print("apoticaire",96,44) print("partir",96,54) if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 44 then sfx(0,"f-4") y=y+10 end if y == 24 and btnp(5) and player.gold>=5 then sfx(0,"f-1") player.gold=player.gold-5 player.pv=player.pv+player.max_pv player.pm=player.pm+player.max_pm end if y == 34 and btnp(5) then sfx(0,"f-1") end if y == 44 and btnp(5) then magasin=magasin+1 sfx(0,"f-1") end if y == 54 and btnp(5) then mo=mo+30 sfx(0,"f-1") end -- interface du 1e magasin du 1e village elseif vivi==1 and magasin==1 then print(">",x,y) print("potionHp.25G x"..objet.potionHp,96,24) print("PotionPm.50G x"..objet.potionPm,96,34) print("fumigene.30G x"..objet.fumigene,96,44) print("partir",96,54) if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 44 then sfx(0,"f-4") y=y+10 end if y == 24 and btnp(5) and player.gold>=25 then sfx(0,"f-1") objet.potionHp=objet.potionHp+1 player.gold=player.gold-25 end if y == 34 and btnp(5) and player.gold>=25 then sfx(0,"f-1") objet.potionPm=objet.potionPm+1 player.gold=player.gold-50 end if y == 44 and btnp(5) and player.gold>=25 then sfx(0,"f-1") objet.fumigene=objet.fumigene+1 player.gold=player.gold-30 end if y == 54 and btnp(5) then magasin=magasin-1 end -- interface du 2e village elseif vivi==2 then print(">",x,y) print("Ami du vielle homme",96,34) if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 34 then sfx(0,"f-4") y=y+10 end if y == 34 and btnp(5) then discus=discus+1 sfx(0,"f-1") end -- interface du 2e phase 2 village elseif vivi==3 then print(">",x,y) print("Ami du vielle homme",96,24) print("sud",96,34) print("nord",96,44) print("est",96,54) if btnp(0) and y >= 34 then sfx(0,"f-4") y=y-10 end if btnp(1) and y <= 44 then sfx(0,"f-4") y=y+10 end if y == 24 and btnp(5) then discus=discus+1 sfx(0,"f-1") end if y == 34 and mo<=180 and btnp(5) then mo=mo+30 sfx(0,"f-4") ennemie.l=math.random(10) end if y == 44 and mo>=0 and btnp(5) then mo=mo-30 sfx(0,"f-4") ennemie.l=math.random(10) end if y == 54 and btnp(5) then ma=ma+17 sfx(0,"f-4") ennemie.l=math.random(10) end end -- paroles des pnj du 1e village if discus==1 and vivi==0 then print("ohhhh...",5,100) elseif discus==2 and vivi==0 then print("bonjour mon petit.",5,100) print("j'ai appris recemment",5,112) print("que tu etait devenu un aventurier...",5,124) elseif discus==3 and vivi==0 then print("j'aimerai que tu fasse",5,100) print("quelque chose pour moi.",5,112) elseif discus==4 and vivi==0 then print("pourrai tu aller voir mon ami",5,100) print("qui est entre les montagnes",5,112) print("aux sud.",5,124) elseif discus==5 and vivi==0 then print("j'ai entendu dire qu'il avait",5,100) print("des problemes avec des monstres.",5,112) elseif discus==6 and vivi==0 then print("tient ceci cela pourrait",5,100) print("t'etre utile.",5,112) elseif discus==7 and vivi==0 then print("attack et defense + 2 !",5,100) elseif discus==8 and vivi==0 then discus=discus-8 player.attack=player.attack+2 player.defense=player.defense+2 vivi=vivi+1 end -- paroles des pnj du 2e village if discus==1 and vivi==2 then print("Fuis jeune homme!",5,100) elseif discus==2 and vivi==2 then print("Quoi tu est venu me sauver?",5,100) print("C'est gentillle de ta part",5,112) print("mais tu ne fais pas le poid...",5,124) elseif discus==3 and vivi==2 then print("Fuis avant que le monstre ne te vois",5,100) print("sinon tu te fera tuer.",5,112) elseif discus==4 and vivi==2 then print("Tu l'entend fuis vite il arrive",5,100) print("ou bien cache toi vite il est la!",5,112) print("comment ca non fais vite ce que...",5,124) elseif discus==5 and vivi==2 then print("ohh un autre humain mais celui ci",5,100) print("a l'aire maigrichon je le prendrai ",5,112) print("comme entree puis ce sera au tour",5,124) elseif discus==6 and vivi==2 then print("du viellard,uh,uh,uh.",5,100) print("Si tu ne te debat pas tu ne",5,112) print("soufrira pas tu peux me croire.",5,124) elseif discus==7 and vivi==2 then print("...",5,100) elseif discus==8 and vivi==2 then discus=discus-8 ennemie.l=11 end if discus==1 and vivi==3 then print("Merci!",5,100) elseif discus==2 and vivi==3 then print("Je n'aurai jamais crue",5,100) print("qu'un apprentie comme toi puisse",5,112) print("battre un tel monstre.",5,124) elseif discus==3 and vivi==3 then print("Peut etre est tu le hero dont parle",5,100) print("la legende...",5,112) elseif discus==4 and vivi==3 then print("On dit que lorsque les tennebres",5,100) print("s'abattrons ici bas un prodige doue",5,112) print("pour le combat vaincra le mal...",5,124) elseif discus==5 and vivi==3 then print("Et rammeneras,paix,prosperite et",5,100) print("aussi un ciel bleu et etincelons",5,112) print("emplis de bievellence...",5,124) elseif discus==6 and vivi==3 then print("c'est tout,dommage je ne peut",5,100) print("pas t'aider dans ta quete mais",5,112) print("je peux te dire qu'aux grotes...",5,124) elseif discus==7 and vivi==3 then print("Qui se situe au Nord-Est se trouve",5,100) print("un magnifique tresor gardee par un general ",5,112) print("du roi demon donc fais attention.",5,124) elseif discus==8 and vivi==3 then discus=discus-8 end barre_option() end function start() cls() map(mo,ma) ennemies_menu() -- emplacement des coffre if mo==0 and ma==17 then coffre() -- emplacement des village village elseif mo==30 and ma==0 then village() elseif ennemie.l==1 or ennemie.l==2 or ennemie.l==3 then attack_menu() musi=2 elseif mo==150 and ma==0 and ennemie.ld==0 then village() vivi=2 elseif mo==150 and ma==0 then village() vivi=3 else controlle_menu() end --collision map if mo==0 and ma==0 and zero==start then mo=30 end -- level up du player if player.exp>=player.max_exp then player.pv=player.pv+player.max_pv player.niv=player.niv+1 player.max_exp=player.max_exp+150 player.pv=player.pv+2 player.max_pv=player.max_pv+2 player.pm=player.pm+2 player.max_pm=player.max_pm+2 player.attack=player.attack+2 player.defense=player.defense+2 player.exp=0 end -- level up des sorts du player --level up du sort de feu if sort.utifeu>=sort.max_utifeu then sort.max_utifeu=sort.max_utifeu+35 sort.utifeu=0 sort.feu=sort.feu+6 sort.niv_feu=sort.niv_feu+1 end -- level up du sort de glace if sort.utiglace>=sort.max_utiglace then sort.max_utiglace=sort.max_utiglace+35 sort.utiglace=0 sort.glace=sort.glace+6 sort.niv_glace=sort.niv_glace+1 end -- level up du sort de foudre if sort.utifoudre>=sort.max_utifoudre then sort.max_utifoudre=sort.max_utifoudre+35 sort.utifoudre=0 sort.foudre=sort.foudre+6 sort.niv_foudre=sort.niv_foudre+1 end -- limite de restoration des mp et pv if player.pv>=player.max_pv then player.pv=player.max_pv end if player.pm>=player.max_pm then player.pm=player.max_pm end if player.pm<=0 then player.pm=0 end -- mort du personnage if player.pv<=0 then reset() end if btnp(4) and zero==start then zero=inventair sfx(0,"E-1") end end function option() cls() print("work in progres...",96,44) if btnp(5) then zero=menu sfx(0,"E-1") end end function about() cls() print("programmed by idriss orevouno diba",26,44) print("cantact idiss.diba67@gmail.com",36,54) print("version 1.2.4",80,64) if btnp(5) then zero=menu sfx(0,"E-1") end end function TIC() zero() end