Gérez votre site :

52 621 Webmasters - 771 621 Membres INSCRIPTION - Mot de passe oublié ?

Discussion du forum

News

Vous êtes sur la discussion [TUTO] Faire un loterie détaillée

Forum :: Questions IF :: Discussion
Ouvert [TUTO] Faire un loterie détaillée
de Crokys (villa-city - créé le 24 aout 2012 à 12h 14
10 reponses - 477 vues
modifié il y a 11 ans
Bon, alors, c'est un peu long. Bien entendu, on peux faire un loterie sans variable mais elle est beaucoup moins détaillée. Ici, on pourra avoir les boutons : Jouer, un choix de pile ou face, le lancé de la pièce, notre récompense [- ou +] et le bouton rejouer.
Pour tester : http://www.webidev.com/villa-city
______________________________________
Barème :
-----------
Normal : Oublié, il y'a trop d'action.
Beta+ : Vous pouvez.
Webi+ : Quelle question !
______________________________________
Outils :
--------
2 variables :
----------------
Var1 (au choix : illimitée, limité, ici on le fait illimité) : Nom : Pièce, non besoin, non vitale.

Var2 : Nom : Pile/Face, non besoin, non vitale.
_____________________________________
7 actions (oui c'est beaucoup)

Action1 : Lancer la pièce, prix : 0, Affecte : Pile/Face +1, requiert : //

Action 2 : Récompense, prix : +50, Affecte Pile/Face +1, requiert : //

Action3 : Jouer à la loterie, prix : 0, Affecte : Pièce +1, requiert : //

Action4 : Pile, prix : 0, Affecte : Pile/Face +1, requiert : //

Action5 : Face, prix :0, Affecte : Pile/Face +1, requiert : //

Action6 : Récompense, prix : -25, Affecte Pile/Face +1, requiert : //

Action7 : Rejouer à la loterie, prix : 0, Affecte ;
-Pièce -50
-Pile/Face -50
(ça c'est histoire que tous recommence à 0)
_____________________________________
Bon le code haha, la rigolade.
--------------------------------------
IF VarPièce =0][Mod Action3][/IF]<center>[IF VarPile/Face =0][IF VarPièce =1]<small>Choisis ton côté :</small>[Mod Action4] ou [Mod Action5][/IF][/IF][IF VarPile/Face =1]<img http://bildberg.eu/DKAeOqRu.png>
[Mod Action1][/IF][IF VarPile/Face =2]<img http://bildberg.eu/wLvmyCyq.png>[/IF]
[IF VarPile/Face =2][IF Seconde =0][Mod Action2][/IF][IF Seconde =1][Mod Action6][/IF][IF Seconde =2][Mod Action2][/IF][IF Seconde =3][Mod Action6][/IF][IF Seconde =4][Mod Action2][/IF][IF Seconde =5][Mod Action6][/IF][IF Seconde =6][Mod Action2][/IF][IF Seconde =7][Mod Action6][/IF][IF Seconde =8][Mod Action2][/IF][IF Seconde =9][Mod Action6][/IF][IF Seconde =10][Mod Action2][/IF][IF Seconde =11][Mod Action6][/IF][IF Seconde =12][Mod Action2][/IF][IF Seconde =13][Mod Action6][/IF][IF Seconde =14][Mod Action2][/IF][IF Seconde =15][Mod Action6][/IF][IF Seconde =16][Mod Action2][/IF][IF Seconde =17][Mod Action6][/IF][IF Seconde =18][Mod Action2][/IF][IF Seconde =19][Mod Action6][/IF][IF Seconde =20][Mod Action2][/IF][IF Seconde =21][Mod Action6][/IF][IF Seconde =22][Mod Action2][/IF][IF Seconde =23][Mod Action6][/IF][IF Seconde =24][Mod Action2][/IF][IF Seconde =25][Mod Action6][/IF][IF Seconde =26][Mod Action2][/IF][IF Seconde =27][Mod Action6][/IF][IF Seconde =28][Mod Action2][/IF][IF Seconde =29][Mod Action6][/IF][IF Seconde =30][Mod Action2][/IF][IF Seconde =31][Mod Action6][/IF][IF Seconde =32][Mod Action2][/IF][IF Seconde =33][Mod Action6][/IF][IF Seconde =34][Mod Action2][/IF][IF Seconde =35][Mod Action6][/IF][IF Seconde =36][Mod Action2][/IF][IF Seconde =37][Mod Action6][/IF][IF Seconde =38][Mod Action2][/IF][IF Seconde =39][Mod Action6][/IF][IF Seconde =40][Mod Action2][/IF][IF Seconde =41][Mod Action6][/IF][IF Seconde =42][Mod Action2][/IF][IF Seconde =43][Mod Action6][/IF][IF Seconde =44][Mod Action2][/IF][IF Seconde =45][Mod Action6][/IF][IF Seconde =46][Mod Action2][/IF][IF Seconde =47][Mod Action6][/IF][IF Seconde =48][Mod Action2][/IF][IF Seconde =49][Mod Action6][/IF][IF Seconde =50][Mod Action2][/IF][IF Seconde =51][Mod Action6][/IF][IF Seconde =52][Mod Action2][/IF][IF Seconde =53][Mod Action6][/IF][IF Seconde =54][Mod Action2][/IF][IF Seconde =55][Mod Action6][/IF][IF Seconde =56][Mod Action2][/IF][IF Seconde =57][Mod Action6][/IF][IF Seconde =58][Mod Action2][/IF][IF Seconde =59][Mod Action6][/IF][IF Seconde =60][Mod Action2][/IF][/IF][IF VarPièce =1][IF VarPile/Face =3][Mod Action7][/IF][/IF]
____________________________________________
Les secondes sont pour éviter que les 2 actions Récompense +50 et récompense -25 restent les mêmes pendant des heures.
Il y'a beaucoup de texte, mais si vous savez maniez tous ça, vous comprendrez.


En espérant avoir aidé n_n
Voici les réponses de cette discussion : (page 1/1)

le 24 aout 2012 à 12h 15 (il y a 11 ans)
En ligne Crokys (villa-city
ERREUR : Au tout début du code, j'ai oublié le "["
le 24 aout 2012 à 13h 20 (il y a 11 ans)
En ligne [Boubou] (cat-or-cat
Belle loterie.
Tres bon tuto.
le 24 aout 2012 à 13h 22 (il y a 11 ans)
En ligne Cяσκys (clik-clak
Merci ♥
le 25 aout 2012 à 16h 13 (il y a 11 ans)
En ligne [Admin]asma (mon-chaton-virtuels
sa m'ecrit Erreur IF : Erreur de syntaxe dans la condition : ' Varpiece ==0'.
le 25 aout 2012 à 17h 40 (il y a 11 ans)
En ligne [Admin]asma (mon-chaton-virtuels
comment faire
le 25 aout 2012 à 19h 14 (il y a 11 ans)
En ligne [Admin]asma (mon-chaton-virtuels
merci de me repondre le plus vite possible
le 25 aout 2012 à 23h 05 (il y a 11 ans)
En ligne Crokys (villa-city
C'est le début du code ?
IF VarPiece =0] ?

Je me suis trompée c'est :
[IF VarX=0]
le 26 aout 2012 à 0h 36 (il y a 11 ans)
En ligne [Admin]asma (mon-chaton-virtuels
merci beaucoupSmiley
le 26 aout 2012 à 21h 35 (il y a 11 ans)
En ligne Crokys (roulette
De rien =)

le 26 aout 2012 à 21h 54 (il y a 11 ans)
En ligne Crokys (roulette
En fait pour tester le jeu de la roulette > webidev.com/roulette

Si vous voulez le code > http://textup.fr/26625Wb
Poster un message
Veuillez vous connecter pour poster sur le forum.

Webidev | v2.10.0 | © Webidev 2007 - 2024 | Contact