le championnat

dim mdp
dim tentative2
dim agr
dim sommevie
dim vie
dim gemme
dim bmaudite
dim nombretour
dim argentscore
dim argentboite
dim boiteselect
dim shop
dim rep1
dim rep2
dim rep3
vie = 3
tentative2 = 3
gemme = 3
nombretour = 0
argentscore = 0
msgbox"Bienvenue dans le jeu de la boite maudite," _
+ chr(13) _
+ "ici tu n'as qu'un seul but, accumuler un maximum d'argent !" _
+ chr(13) _
+ chr(13) _
+ "Pour cela c'est très simple, tu as devant toi trois boites, deux d'entre elles contiennent de magnifiques pièces d'or, mais attention, la troisième contient un maléfice puissant qui te fait perdre une vie. " _
+ chr(13) _
+ "Tu disposes de trois vies et quand tu les as toutes perdues, la partie s'arrête!"_
+ chr(13) _
+ chr(13) _
+ "Pour sélectioner une boite, rien de plus simple, il suffit d'entrer le numéro de la boite que tu souhaites ouvrir, mais attention la boite maudite change à chaque tour..." _
+ chr(13) _
+ chr(13) _
+ "Tu peux organiser des challenges avec tes amis pour voir lequel a le plus de chance !" _
+ chr(13) _
+ chr(13) _
+ "Bon courage, mais fait attention à la boite maudite !avant de pouvoir t jouer tape le mot de passe", , "La boite maudite"
do
mdp = inputbox ("entre le mot de passe a 4 chiffres"_
+ "                 tentative restante(s) " & tentative2 & ".")
tentative2 = tentative2 -1
if (tentative2 < 0) then
msgbox "trop de tentative"
wscript.quit
end if
if (mdp = "0000") then
msgbox "tu as " & gemme & " gemmes"
do
if (vie < 0) then
msgbox ("tu as trouvé une faille il ne fallait par faire sa")
wscript.quit
end if
nombretour = nombretour + 1

Randomize
bmaudite = Int((3 * Rnd) + 1)

Randomize
argentboite = Int((100 * Rnd) + 1)

boiteselect = cint(inputbox ("Argent total : " & argentscore & " "_
+ "                                            Vie : " & vie & " "_
+ "                                           gemme: " & gemme & ""_
+ chr(13) _
+ "```````````````````````````````````````````````````````````````````" _
+ chr(13) _
+ "              Quelle boite choisis-tu ? (1, 2 ou 3)" _
+ chr(13) _
+ chr(13) _
+ "                            __           __          __ " _
+ chr(13) _
+ "                           | 1 |         | 2 |         | 3 |" _
+ chr(13) _
+ "                            ```            ```           ```"))

if (boiteselect = bmaudite) then
vie = vie - 1
msgbox "C'est la boite maudite, il vous reste "& vie & " vie(s)"
else
if ((boiteselect = 1) or (boiteselect = 2) or (boiteselect = 3)) then
argentscore = argentscore + argentboite
msgbox "Vous recevez " & argentboite & " pièces"
else
msgbox "Cette boite n'existe pas, tu perds une vie ! Fait attention la prochaine fois !"
if (nombretour = 0) then
vie = vie - 1
else
vie = vie - 1
nombretour = nombretour - 1

end if
end if
end if
if (vie = 0) then
msgbox"Perdu, tu n'as plus de vie, ta course vers l'argent s'arrête ici, tu as gagné " & argentscore & " en " & nombretour & " coups." _
+ chr(13) _
+ "Tu peux retenter ta chance, qui sais tu gagneras peut être des millions !Mais tu peux acheter des vies "
msgbox " tu as " & argentscore & " sous tu vas dans la boutique de vie"
shop=inputbox ("tu veux acheter des vies oui ou non")
if (shop="oui") then
rep1 =cint (inputbox ("tu as " & argentscore & " sous tu veux acheter combien de vie.1 pour 99 pieces 2 pour 204 pieces 3 pour 550 pieces"))
else
wscript.quit
end if
if cint(rep1=1) then
vie = vie+1
argentscore=argentscore -99
end if
if cint(rep1=2) then
vie= vie+2
argentscore=argentscore -204
end if
if cint(rep1=3) then
vie= vie+3
argentscore=argentscore -550
else
msgbox "ce que tu as marquer n'existe pas tu perd la partie"
wscript.quit
end if
end if
if (argentscore < 0) then
msgbox "tricheur tu n'as pas asser de sous"
wscript.quit
end if
agr = inputbox ("il te reste " & gemme & " gemme(s) tu veux convertir des gemmes pour 550 sous oui ou non")
if (agr= "oui") then
gemme = gemme -1
argentscore=argentscore +550
end if
loop
else msgbox "code incorect"
end if
loop
dim a
dim b
dim c
dim d
dim e
dim f
dim g
dim h
dim i
dim aa
dim bb
dim cc
dim dd
dim ee
dim ff
dim gg
dim hh
dim ii
dim xgl1
dim xgl2
dim xgl3
dim xgc1
dim xgc2
dim xgc3
dim xgd1
dim xgd2
dim ogl1
dim ogl2
dim ogl3
dim ogc1
dim ogc2
dim ogc3
dim ogd1
dim ogd2
dim tour
dim tourm
dim inputm
dim input

a = 1
b = 2
c = 3
d = 4
e = 5
f = 6
g = 7
h = 8
i = 9
aa = 0
bb = 0
cc = 0
dd = 0
ee = 0
ff = 0
gg = 0
hh = 0
ii = 0
xgl1 = 0
xgl2 = 0
xgl3 = 0
xgc1 = 0
xgc2 = 0
xgc3 = 0
xgd1 = 0
xgd2 = 0
ogl1 = 0
ogl2 = 0
ogl3 = 0
ogc1 = 0
ogc2 = 0
ogc3 = 0
ogd1 = 0
ogd2 = 0
tourm = 0
tour = 0

msgbox"Bienvenue sur Tic-Tac-Toe !"

inputm = cint(inputbox("Que veux-tu faire ?"_
+chr(13)_
+"1 - Jouer          "_
+chr(13)_     
+"2 - Règle          "_
+chr(13)_        
+"3 - Crédit          "))

if (inputm = 2) then
msgbox("Les Règles:"_
+chr(13)_
+chr(13)_
+"Le but est d'aligner 3 pions de ta couleur."_
+chr(13)_
+"Pour cela il te suffit tour à tour"_
+chr(13)_
+"de choisir une case non utilisée")
inputm = 3
end if
if (inputm = 3) then
msgbox"Jeu développé par"_
+chr(13)_
+"Yannyellowgame"_
+chr(13)_
+chr(13)_
+"Dedicace:"_
+chr(13)_
+"Tutolande"_
+chr(13)_
+"pour m'avoir appris le VBS"_

inputm = 1
end if
if (inputm = 1) then
do
input = cint(inputbox("     "&a&"   #   "&b&"   #   "&c&""_
+chr(13)_
+"     ###########"_
+chr(13)_
+"     "&d&"   #   "&e&"   #   "&f&"              Votre choix ?"_
+chr(13)_
+"     ###########"_
+chr(13)_
+"     "&g&"   #   "&h&"   #   "&i&""_
+chr(13)_            
+"  "))
if (tour = 0) then
if (input = 1) then
if (aa = 0) then
a = "x"
aa = 1
xgl1 = xgl1 + 1
xgc1 = xgc1 + 1
xgd1 = xgd1 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 2) then
if (bb = 0) then
b = "x"
bb = 1
xgl1 = xgl1 + 1
xgc2 = xgc2 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 3) then
if (cc = 0) then
c = "x"
cc = 1
xgl1 = xgl1 + 1
xgc3 = xgc3 + 1
xgd2 = xgd2 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 4) then
if (dd = 0) then
d = "x"
dd = 1
xgl2 = xgl2 + 1
xgc1 = xgc1 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 5) then
if (ee = 0) then
e = "x"
ee = 1
xgl2 = xgl2 + 1
xgc2 = xgc2 + 1
xgd1 = xgd1 + 1
xgd2 = xgd2 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 6) then
if (ff = 0) then
f = "x"
ff = 1
xgl2 = xgl2 + 1
xgc2 = xgc2 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 7) then
if (gg = 0) then
g = "x"
gg = 1
xgl3 = xgl3 + 1
xgc1 = xgc1 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 8) then
if (hh = 0) then
h = "x"
hh = 1
xgl3 = xgl3 + 1
xgc2 = xgc2 + 1
xgd2 = xgd2 + 1
tour = 1
tourm = tourm + 1
end if
end if
if (input = 9) then
if (ii = 0) then
i = "x"
ii = 1
xgl3 = xgl3 + 1
xgc3 = xgc3 + 1
xgd1 = xgd1 + 1
tour = 1
tourm = tourm + 1
end if
end if
end if
if (tour = 1) then
if (aa = 0) then
a = "0"
aa = 1
ogl1 = ogl1 + 1
ogc1 = ogc1 + 1
ogd1 = ogd1 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 2) then
if (bb = 0) then
b = "0"
bb = 1
ogl1 = ogl1 + 1
ogc2 = ogc2 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 3) then
if (cc = 0) then
c = "0"
cc = 1
ogl1 = ogl1 + 1
ogc3 = ogc3 + 1
ogd2 = ogd2 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 4) then
if (dd = 0) then
d = "0"
dd = 1
ogl2 = ogl2 + 1
ogc1 = ogc1 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 5) then
if (ee = 0) then
e = "0"
ee = 1
ogl2 = ogl2 + 1
ogc2 = ogc2 + 1
ogd1 = ogd1 + 1
ogd2 = ogd2 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 6) then
if (ff = 0) then
f = "0"
ff = 1
ogl2 = ogl2 + 1
ogc2 = ogc2 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 7) then
if (gg = 0) then
g = "0"
gg = 1
ogl3 = ogl3 + 1
ogc1 = ogc1 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 8) then
if (hh = 0) then
h = "0"
hh = 1
ogl3 = ogl3 + 1
ogc2 = ogc2 + 1
ogd2 = ogd2 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (input = 9) then
if (ii = 0) then
i = "0"
ii = 1
ogl3 = ogl3 + 1
ogc3 = ogc3 + 1
ogd1 = ogd1 + 1
tour = 0
tourm = tourm + 1
end if
end if
if (xgl1 = 3) or (xgl2 = 3) or (xgl3 = 3) or (xgc1 = 3) or (xgc2 = 3) or (xgc3 = 3) or (xgd1 = 3) or(xgd2 = 3) then
msgbox"Les x gagne"
end if
if (ogl1 = 3) or (ogl2 = 3) or (ogl3 = 3) or (ogc1 = 3) or (ogc2 = 3) or (ogc3 = 3) or (ogd1 = 3) or(ogd2 = 3) then 
msgbox"Les 0 gangne"
end if
if (tourm = 9) then
msgbox"Match nulle"
end if
loop
end if

Contact

Programmes? thayodu59@gmail.com