Ediwiki

Wiki officiel de l'éditeur de carte du jeu Slayers Online

Outils pour utilisateurs

Outils du site


var_char:rand

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
var_char:rand [2008/01/09 17:54] – créée frostfallvar_char:rand [2022/09/25 19:11] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 ====== %rand(chiffre)% ====== ====== %rand(chiffre)% ======
 ===== Explications ===== ===== Explications =====
-Cette fonction permet d'utiliser un chiffre aléatoire compris entre 0 et chiffre.+Cette fonction permet d'utiliser un chiffre aléatoire compris entre 0 et chiffre-1. 
 + 
 + 
 +===== Exemple jeu de dés ===== 
 +<html> 
 +<style type=text/css> 
 +TEXTAREA { 
 +  background-color : white; 
 +  font-family : MS Sans Serif; 
 +  font-size : 8px; 
 +
 +</style> 
 +<center> 
 +<table cellspacing=2> 
 +<tr height=25><th colspan=3 align=left>Page 1</th></tr> 
 +<tr><td><b>Conditions d'événements</b></td><td></td><td><b>Commande événements</b></td></tr> 
 +<tr><td> 
 +<TEXTAREA ROWS=7 COLS=30 SIZE=255 WRAP=soft readonly> 
 +Appuie sur bouton 
 +Variable[0]=0 
 +</TEXTAREA> 
 +</td> 
 +<td width=20> 
 +</td> 
 +<td> 
 +<TEXTAREA ROWS=7 COLS=50 SIZE=255 WRAP=soft readonly> 
 +Message('on va jouer aux dés, je lance...'
 +// le chiffre sera compris entre 1 et 100 
 +Variable[0]=%rand(100)%+1 
 +</TEXTAREA> 
 +</td> 
 +</tr> 
 +</table> 
 +<table cellspacing=2> 
 +<tr height=25><th colspan=3 align=left>Page 2</th></tr> 
 +<tr><td><b>Conditions d'événements</b></td><td></td><td><b>Commande événements</b></td></tr> 
 +<tr><td> 
 +<TEXTAREA ROWS=7 COLS=30 SIZE=255 WRAP=soft readonly> 
 +Automatique 
 +Variable[0]>=50 
 +</TEXTAREA> 
 +</td> 
 +<td width=20> 
 +</td> 
 +<td> 
 +<TEXTAREA ROWS=7 COLS=50 SIZE=255 WRAP=soft readonly> 
 +Message('Zut tu as gagné!'
 +Variable[0]=0 
 +</TEXTAREA> 
 +</td> 
 +</tr> 
 +</table> 
 +<table cellspacing=2> 
 +<tr height=25><th colspan=3 align=left>Page 3</th></tr> 
 +<tr><td><b>Conditions d'événements</b></td><td></td><td><b>Commande événements</b></td></tr> 
 +<tr><td> 
 +<TEXTAREA ROWS=7 COLS=30 SIZE=255 WRAP=soft readonly> 
 +Automatique 
 +Variable[0]<50 
 +</TEXTAREA> 
 +</td> 
 +<td width=20> 
 +</td> 
 +<td> 
 +<TEXTAREA ROWS=7 COLS=50 SIZE=255 WRAP=soft readonly> 
 +Message('tu as perdu!'
 +Variable[0]=0 
 +</TEXTAREA> 
 +</td> 
 +</tr> 
 +</table> 
 +</html>
  
-===== Exemple ===== 
-  Condition('%rand(100)%>50') 
-  Message('tu as gagné') 
  
var_char/rand.1199897650.txt.gz · Dernière modification : 2022/09/25 19:10 (modification externe)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki