rand() werkt niet?

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Bart Waarom verplicht

Bart Waarom verplicht

04/07/2004 12:40:00
Quote Anchor link
Ik ben bezig met een roulette script, en die is ookal bijna af :), maar het cijfer blijft de hele tijd hetzelfde (of bijna de hele tijd)

Ik weet dat het niet aan de code ligt, want die is zover ik weet helemaal goed :S....

Waar kan het dan aanliggen?
Of heeft iemand anders een betere manier om een random getal tussen de 0 en de 36 te krijgen?
Gewijzigd op 16/12/2004 15:55:00 door Bart Waarom verplicht
 
PHP hulp

PHP hulp

27/07/2021 11:31:48
 
Mitch X

Mitch X

04/07/2004 12:51:00
Quote Anchor link
rand(0,36); zou het gewo0n moeten doen ...
 
Rick

Rick

04/07/2004 13:03:00
Quote Anchor link
misschien heb je een oude php versie?
voor versie 4.2 moest je random namelijk zelf seeden omdat ie anders niet echt random was
 
Bart Waarom verplicht

Bart Waarom verplicht

04/07/2004 13:11:00
Quote Anchor link
PHP Version 4.3.4

:S
 
Bart Waarom verplicht

Bart Waarom verplicht

04/07/2004 13:17:00
Quote Anchor link
Misschien komt het doordat het in een submit zit ofzo? Want dan krijg ik ook telkens hetzelfde nummer :S?
Gewijzigd op 04/07/2004 13:32:00 door Bart Waarom verplicht
 
Mitch X

Mitch X

04/07/2004 13:22:00
Quote Anchor link
Soms kan jah,
de kans op bv 36 is 1/36 = 2,7777777777777777777777777777778 %.
 
Bart Waarom verplicht

Bart Waarom verplicht

04/07/2004 14:06:00
Quote Anchor link
Maar niet als je em 5-10 keer achter elkaar krijg (min.)
 
Appz

Appz

04/07/2004 15:32:00
Quote Anchor link
het moet werken!

probeer hetvolgende eens:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?
//getallen
$getal = rand(0,37);
if($getal > 36) {echo "00";
   }
else {
     echo $getal;
   };
  
echo "<br><br>";


// kijken of getal rood of zwart is
$a = array(1, 3, 5, 7, 9, 12 , 14, 16, 18, 19, 21, 23, 25, 27, 28 , 30 , 32 , 34 , 36);

if (in_array($getal, $a, true)) {
      echo "rood";
}

else {
    echo "zwart";
    } ;

echo "<br><br>";

// kijken of getal hoger of lager is dan 18
if ($getal >18 and $getal <37) {
echo "hoog";
}
else {
echo "laag"; }

?>


voorbeeld staat op:
www.deliefhebbers.nl/table.php

nog geen rekening gehouden met de 0 en 00..
 
Bart Waarom verplicht

Bart Waarom verplicht

05/07/2004 03:38:00
Quote Anchor link
Het probleem is, is dat ik telkens hetzelfde getal krijg....

het script zelf is verder goed..
Gewijzigd op 05/07/2004 09:17:00 door Bart Waarom verplicht
 
Appz

Appz

05/07/2004 09:19:00
Quote Anchor link
Laat dan eens een voorbeeld van je script zien, of post hem hier.
 
Bart Waarom verplicht

Bart Waarom verplicht

05/07/2004 17:20:00
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?
if($casino == "roulette")
{
?>
<b>-> <a href="index.php?do=rpg&rpg=casino&casino=roulette"><font color=black>Roulette</a></b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?
$roulette_lucky_number
= rand(0,36);
if($rl_do == "")
{

?>

<br><br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
$get_rpg_bank_pre
= mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank_pre)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
echo "Money pocket: <b>".$money_pocket."</b> Dellor.<br>";
echo "Money bank: &nbsp;&nbsp;<b>".$money_bank."</b> Dellor.<br>";
?>


<br>
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br>
<br>

<div style="position: absolute; left: 125px; top: 59px;">
<FORM METHOD=POST ACTION="index.php?do=rpg&rpg=casino&casino=roulette&rl_do=1">
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=158 valign=center align=center><font size="1" color="white">0 &nbsp;&nbsp;<INPUT TYPE="text" NAME="0" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">1 &nbsp;&nbsp;<INPUT TYPE="text" NAME="1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">2 &nbsp;&nbsp;<INPUT TYPE="text" NAME="2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">3 &nbsp;&nbsp;<INPUT TYPE="text" NAME="3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">4 &nbsp;&nbsp;<INPUT TYPE="text" NAME="4" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">5 &nbsp;&nbsp;<INPUT TYPE="text" NAME="5" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">6 &nbsp;&nbsp;<INPUT TYPE="text" NAME="6" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">7 &nbsp;&nbsp;<INPUT TYPE="text" NAME="7" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">8 &nbsp;&nbsp;<INPUT TYPE="text" NAME="8" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">9 &nbsp;&nbsp;<INPUT TYPE="text" NAME="9" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">10 <INPUT TYPE="text" NAME="10" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">11 <INPUT TYPE="text" NAME="11" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">12 <INPUT TYPE="text" NAME="12" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">13 <INPUT TYPE="text" NAME="13" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">14 <INPUT TYPE="text" NAME="14" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">15 <INPUT TYPE="text" NAME="15" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">16 <INPUT TYPE="text" NAME="16" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">17 <INPUT TYPE="text" NAME="17" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">18 <INPUT TYPE="text" NAME="18" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">19 <INPUT TYPE="text" NAME="19" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">20 <INPUT TYPE="text" NAME="20" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">21 <INPUT TYPE="text" NAME="21" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">22 <INPUT TYPE="text" NAME="22" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">23 <INPUT TYPE="text" NAME="23" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">24 <INPUT TYPE="text" NAME="24" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">25 <INPUT TYPE="text" NAME="25" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">26 <INPUT TYPE="text" NAME="26" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">27 <INPUT TYPE="text" NAME="27" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">28 <INPUT TYPE="text" NAME="28" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">29 <INPUT TYPE="text" NAME="29" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">30 <INPUT TYPE="text" NAME="30" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">31 <INPUT TYPE="text" NAME="31" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">32 <INPUT TYPE="text" NAME="32" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">33 <INPUT TYPE="text" NAME="33" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">34 <INPUT TYPE="text" NAME="34" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">35 <INPUT TYPE="text" NAME="35" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">36 <INPUT TYPE="text" NAME="36" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R1 <INPUT TYPE="text" NAME="R1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R2 <INPUT TYPE="text" NAME="R2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R3 <INPUT TYPE="text" NAME="R3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C1 <INPUT TYPE="text" NAME="C1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C2 <INPUT TYPE="text" NAME="C2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C3 <INPUT TYPE="text" NAME="C3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>


<br>


<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Odd <INPUT TYPE="text" NAME="odd" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Even <INPUT TYPE="text" NAME="even" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">1-18 <INPUT TYPE="text" NAME="low" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">19-36 <INPUT TYPE="text" NAME="high" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="red"><b>Red</b> <INPUT TYPE="text" NAME="red" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="black"><b>Black</b> <INPUT TYPE="text" NAME="black" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<br></div><br><br><br><br><br><br>
<INPUT TYPE="submit" value="Let's do it!"><INPUT TYPE="reset">
</FORM>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?
}
elseif($rl_do == "1")
{


$nr_0 = $_POST['0'];
$nr_1 = $_POST['1'];
$nr_2 = $_POST['2'];
$nr_3 = $_POST['3'];
$nr_4 = $_POST['4'];
$nr_5 = $_POST['5'];
$nr_6 = $_POST['6'];
$nr_7 = $_POST['7'];
$nr_8 = $_POST['8'];
$nr_9 = $_POST['9'];
$nr_10 = $_POST['10'];
$nr_11 = $_POST['11'];
$nr_12 = $_POST['12'];
$nr_13 = $_POST['13'];
$nr_14 = $_POST['14'];
$nr_15 = $_POST['15'];
$nr_16 = $_POST['16'];
$nr_17 = $_POST['17'];
$nr_18 = $_POST['18'];
$nr_19 = $_POST['19'];
$nr_20 = $_POST['20'];
$nr_21 = $_POST['21'];
$nr_22 = $_POST['22'];
$nr_23 = $_POST['23'];
$nr_24 = $_POST['24'];
$nr_25 = $_POST['25'];
$nr_26 = $_POST['26'];
$nr_27 = $_POST['27'];
$nr_28 = $_POST['28'];
$nr_29 = $_POST['29'];
$nr_30 = $_POST['30'];
$nr_31 = $_POST['31'];
$nr_32 = $_POST['32'];
$nr_33 = $_POST['33'];
$nr_34 = $_POST['34'];
$nr_35 = $_POST['35'];
$nr_36 = $_POST['36'];
$even = $_POST['even'];
$odd = $_POST['odd'];
$low = $_POST['low'];
$high = $_POST['high'];
$black = $_POST['black'];
$red = $_POST['red'];
$r1 = $_POST['R1'];
$r2 = $_POST['R2'];
$r3 = $_POST['R3'];
$c1 = $_POST['C1'];
$c2 = $_POST['C2'];
$c3 = $_POST['C3'];



if($nr_0 == "0" AND $nr_1 == "0" AND $nr_2 == "0" AND $nr_3 == "0" AND $nr_4 == "0" AND $nr_5 == "0" AND $nr_6 == "0" AND $nr_7 == "0" AND $nr_8 == "0" AND $nr_9 == "0" AND $nr_10 == "0" AND $nr_11 == "0" AND $nr_12 == "0" AND $nr_13 == "0" AND $nr_14 == "0" AND $nr_15 == "0" AND $nr_16 == "0" AND $nr_17 == "0" AND $nr_18 == "0" AND $nr_19 == "0" AND $nr_20 == "0" AND $nr_21 == "0" AND $nr_22 == "0" AND $nr_23 == "0" AND $nr_24 == "0" AND $nr_25 == "0" AND $nr_26 == "0" AND $nr_27 == "0" AND $nr_28 == "0" AND $nr_29 == "0" AND $nr_30 == "0" AND $nr_31 == "0" AND $nr_32 == "0" AND $nr_33 == "0" AND $nr_34 == "0" AND $nr_35 == "0" AND $nr_36 == "0" AND $even == "0" AND $odd == "0" AND $low == "0" AND $high == "0" AND $black == "0" AND $red == "0" AND $r1 == "0" AND $r2 == "0" AND $r3 == "0"  AND $c1 == "0" AND $c2 == "0" AND $c3 == "0")

{

echo "<b> -> Error</b><br><br>No ammount was filled in!";
}

else
{

$uitgaven = $nr_0 + $nr_1 + $nr_2 + $nr_3 + $nr_4 + $nr_5 + $nr_6 + $nr_7 + $nr_8 + $nr_9 + $nr_10 + $nr_11 + $nr_12 + $nr_13 + $nr_14 + $nr_15 + $nr_16 + $nr_17 + $nr_18 + $nr_19 + $nr_20 + $nr_21 + $nr_22 + $nr_23 + $nr_24 + $nr_25 + $nr_26 + $nr_27 + $nr_28 + $nr_29 + $nr_30 + $nr_31 + $nr_32 + $nr_33 + $nr_34 + $nr_35 + $nr_36 + $even + $odd + $low + $high + $black + $red + $r1 + $r2 + $r3 + $c1 + $c2 + $c3;

$get_rpg_bank = mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
if($money_pocket < $uitgaven)
{

?>
<b> -> Error</b><br><br>
You dont have enough money!<br>
You need
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_pocket - $uitgave; ?>
Dellor more.<br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?
}
else
{

$lucky_number = $roulette_lucky_number;
unset($roulette_lucky_number);

$kleur = roulette_kleur($lucky_number);
if($lucky_number % 2 == 0) { $type = "even"; } else { $type = "odd"; }
$money_won = 0;

// 35 tegen 1 uitrekenen
if($lucky_number == 1) { $money_won = $money_won + $nr_1 * 35; }
elseif($lucky_number == 2) { $money_won = $money_won + $nr_2 * 35; }
elseif($lucky_number == 3) { $money_won = $money_won + $nr_3 * 35; }
elseif($lucky_number == 4) { $money_won = $money_won + $nr_4 * 35; }
elseif($lucky_number == 5) { $money_won = $money_won + $nr_5 * 35; }
elseif($lucky_number == 6) { $money_won = $money_won + $nr_6 * 35; }
elseif($lucky_number == 7) { $money_won = $money_won + $nr_7 * 35; }
elseif($lucky_number == 8) { $money_won = $money_won + $nr_8 * 35; }
elseif($lucky_number == 9) { $money_won = $money_won + $nr_9 * 35; }
elseif($lucky_number == 10) { $money_won = $money_won + $nr_10 * 35; }
elseif($lucky_number == 11) { $money_won = $money_won + $nr_11 * 35; }
elseif($lucky_number == 12) { $money_won = $money_won + $nr_12 * 35; }
elseif($lucky_number == 13) { $money_won = $money_won + $nr_13 * 35; }
elseif($lucky_number == 14) { $money_won = $money_won + $nr_14 * 35; }
elseif($lucky_number == 15) { $money_won = $money_won + $nr_15 * 35; }
elseif($lucky_number == 16) { $money_won = $money_won + $nr_16 * 35; }
elseif($lucky_number == 17) { $money_won = $money_won + $nr_17 * 35; }
elseif($lucky_number == 18) { $money_won = $money_won + $nr_18 * 35; }
elseif($lucky_number == 19) { $money_won = $money_won + $nr_19 * 35; }
elseif($lucky_number == 20) { $money_won = $money_won + $nr_20 * 35; }
elseif($lucky_number == 21) { $money_won = $money_won + $nr_21 * 35; }
elseif($lucky_number == 22) { $money_won = $money_won + $nr_22 * 35; }
elseif($lucky_number == 23) { $money_won = $money_won + $nr_23 * 35; }
elseif($lucky_number == 24) { $money_won = $money_won + $nr_24 * 35; }
elseif($lucky_number == 25) { $money_won = $money_won + $nr_25 * 35; }
elseif($lucky_number == 26) { $money_won = $money_won + $nr_26 * 35; }
elseif($lucky_number == 27) { $money_won = $money_won + $nr_27 * 35; }
elseif($lucky_number == 28) { $money_won = $money_won + $nr_28 * 35; }
elseif($lucky_number == 29) { $money_won = $money_won + $nr_29 * 35; }
elseif($lucky_number == 30) { $money_won = $money_won + $nr_30 * 35; }
elseif($lucky_number == 31) { $money_won = $money_won + $nr_31 * 35; }
elseif($lucky_number == 32) { $money_won = $money_won + $nr_32 * 35; }
elseif($lucky_number == 33) { $money_won = $money_won + $nr_33 * 35; }
elseif($lucky_number == 34) { $money_won = $money_won + $nr_34 * 35; }
elseif($lucky_number == 35) { $money_won = $money_won + $nr_35 * 35; }
elseif($lucky_number == 36) { $money_won = $money_won + $nr_36 * 35; }
elseif($lucky_number == 0) { $money_won = $money_won + $nr_0 * 135; }
else { $money_won = ""; }

//Even - oneven uitrekenen
if($type == "odd") { $money_won = $money_won + $odd * 2; }
elseif($type == "even") { $money_won = $money_won + $even * 2; }

//Kleur uitrekenen
if($kleur == "red") { $money_won = $money_won + $red * 2; }
elseif($kleur == "black") { $money_won = $money_won + $black * 2; }

//Low - high
if($lucky_number >= 19) { $money_won = $money_won + $high * 4; }
elseif($lucky_number >= 0) { $money_won = $money_won + $low * 4; }

//row
$row = roulette_r($lucky_number);
if($row == "r1") { $money_won = $money_won + $r1 * 2; }
elseif($row == "r2") { $money_won = $money_won + $r2 * 2; }
elseif($row == "r3") { $money_won = $money_won + $r3 * 2; }

//colom
$col = roulette_c($lucky_number);
if($col == "c1") { $money_won = $money_won + $c1 * 2; }
elseif($col == "c2") { $money_won = $money_won + $c2 * 2; }
elseif($col == "c3") { $money_won = $money_won + $c3 * 2; }



?>
<br><br>

<div id="nr1">
<img src="./rpg/guns/roulette_wheel.gif"><br>
Spinning the wheel...
</div>
<div id="nr2" style="display:none;">
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br><br>
The lucky number was <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $lucky_number; ?>
</b>.<br>
The color of that number is <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $kleur; ?>
</b>.<br><br>
Type:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $type; ?>
.<br><br>
You spended:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $uitgaven; ?>
.<br>
You win <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_won; ?>
</b>.<br><br>

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
<?
$money_got
= $money_won - $uitgaven;

if($money_got < 0)
{

echo 'You have lost money. You now have '.$money_got.' Dellor.';
}


$new_geldzak = $money_pocket + $money_got;
mysql_query("UPDATE rpg_bank SET geldzak = '".$new_geldzak."' WHERE username = '".$userid."'") or die ("query mislukt, error: ". mysql_error());
?>

</div>
<script language="JavaScript">
setTimeout("hide('nr1')", 2000);
setTimeout("hide('nr2')", 2000);
</script>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
}
}
}
}

?>


Heb em zo direct gekopieerd van mun site...
Kan zijn dat er een } te veel of te weinig is...
 
Mitch X

Mitch X

05/07/2004 17:21:00
Quote Anchor link
Dan moet je met 'lagen' werken:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
<?
if(true)
{

   if(true)
   {

      if(true)
      {

         # Code
      }
   }
}

?>

Zo kan je wel zien of het goed gaat :)
 
Bart Waarom verplicht

Bart Waarom verplicht

05/07/2004 17:25:00
Quote Anchor link
Dat doe ik al -_-
 
Dbr Br

Dbr Br

05/07/2004 18:01:00
Quote Anchor link
En als je hem dan wel eens doet seeden?


srand((int)microtime()*1234567);
$randnum = rand(33,255)
 
Bart Waarom verplicht

Bart Waarom verplicht

05/07/2004 18:05:00
Quote Anchor link
OOk niet :S...
 

27/11/2004 15:14:00
Quote Anchor link
Quote:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?
if($casino == "roulette")
{
?>
<b>-> <a href="index.php?do=rpg&rpg=casino&casino=roulette"><font color=black>Roulette</a></b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?
$roulette_lucky_number
= rand(0,36);
if($rl_do == "")
{

?>

<br><br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
$get_rpg_bank_pre
= mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank_pre)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
echo "Money pocket: <b>".$money_pocket."</b> Dellor.<br>";
echo "Money bank:   <b>".$money_bank."</b> Dellor.<br>";
?>


<br>
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br>
<br>

<div style="position: absolute; left: 125px; top: 59px;">
<FORM METHOD=POST ACTION="index.php?do=rpg&rpg=casino&casino=roulette&rl_do=1">
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=158 valign=center align=center><font size="1" color="white">0   <INPUT TYPE="text" NAME="0" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">1   <INPUT TYPE="text" NAME="1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">2   <INPUT TYPE="text" NAME="2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">3   <INPUT TYPE="text" NAME="3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">4   <INPUT TYPE="text" NAME="4" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">5   <INPUT TYPE="text" NAME="5" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">6   <INPUT TYPE="text" NAME="6" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">7   <INPUT TYPE="text" NAME="7" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">8   <INPUT TYPE="text" NAME="8" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">9   <INPUT TYPE="text" NAME="9" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">10 <INPUT TYPE="text" NAME="10" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">11 <INPUT TYPE="text" NAME="11" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">12 <INPUT TYPE="text" NAME="12" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">13 <INPUT TYPE="text" NAME="13" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">14 <INPUT TYPE="text" NAME="14" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">15 <INPUT TYPE="text" NAME="15" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">16 <INPUT TYPE="text" NAME="16" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">17 <INPUT TYPE="text" NAME="17" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">18 <INPUT TYPE="text" NAME="18" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">19 <INPUT TYPE="text" NAME="19" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">20 <INPUT TYPE="text" NAME="20" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">21 <INPUT TYPE="text" NAME="21" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">22 <INPUT TYPE="text" NAME="22" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">23 <INPUT TYPE="text" NAME="23" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">24 <INPUT TYPE="text" NAME="24" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">25 <INPUT TYPE="text" NAME="25" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">26 <INPUT TYPE="text" NAME="26" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">27 <INPUT TYPE="text" NAME="27" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">28 <INPUT TYPE="text" NAME="28" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">29 <INPUT TYPE="text" NAME="29" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">30 <INPUT TYPE="text" NAME="30" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">31 <INPUT TYPE="text" NAME="31" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">32 <INPUT TYPE="text" NAME="32" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">33 <INPUT TYPE="text" NAME="33" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">34 <INPUT TYPE="text" NAME="34" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">35 <INPUT TYPE="text" NAME="35" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">36 <INPUT TYPE="text" NAME="36" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R1 <INPUT TYPE="text" NAME="R1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R2 <INPUT TYPE="text" NAME="R2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R3 <INPUT TYPE="text" NAME="R3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C1 <INPUT TYPE="text" NAME="C1" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C2 <INPUT TYPE="text" NAME="C2" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C3 <INPUT TYPE="text" NAME="C3" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>


<br>


<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Odd <INPUT TYPE="text" NAME="odd" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Even <INPUT TYPE="text" NAME="even" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">1-18 <INPUT TYPE="text" NAME="low" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">19-36 <INPUT TYPE="text" NAME="high" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="red"><b>Red</b> <INPUT TYPE="text" NAME="red" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="black"><b>Black</b> <INPUT TYPE="text" NAME="black" value="0" size=1 STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<br></div><br><br><br><br><br><br>
<INPUT TYPE="submit" value="Let's do it!"><INPUT TYPE="reset">
</FORM>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?
}
elseif($rl_do == "1")
{


$nr_0 = $_POST['0'];
$nr_1 = $_POST['1'];
$nr_2 = $_POST['2'];
$nr_3 = $_POST['3'];
$nr_4 = $_POST['4'];
$nr_5 = $_POST['5'];
$nr_6 = $_POST['6'];
$nr_7 = $_POST['7'];
$nr_8 = $_POST['8'];
$nr_9 = $_POST['9'];
$nr_10 = $_POST['10'];
$nr_11 = $_POST['11'];
$nr_12 = $_POST['12'];
$nr_13 = $_POST['13'];
$nr_14 = $_POST['14'];
$nr_15 = $_POST['15'];
$nr_16 = $_POST['16'];
$nr_17 = $_POST['17'];
$nr_18 = $_POST['18'];
$nr_19 = $_POST['19'];
$nr_20 = $_POST['20'];
$nr_21 = $_POST['21'];
$nr_22 = $_POST['22'];
$nr_23 = $_POST['23'];
$nr_24 = $_POST['24'];
$nr_25 = $_POST['25'];
$nr_26 = $_POST['26'];
$nr_27 = $_POST['27'];
$nr_28 = $_POST['28'];
$nr_29 = $_POST['29'];
$nr_30 = $_POST['30'];
$nr_31 = $_POST['31'];
$nr_32 = $_POST['32'];
$nr_33 = $_POST['33'];
$nr_34 = $_POST['34'];
$nr_35 = $_POST['35'];
$nr_36 = $_POST['36'];
$even = $_POST['even'];
$odd = $_POST['odd'];
$low = $_POST['low'];
$high = $_POST['high'];
$black = $_POST['black'];
$red = $_POST['red'];
$r1 = $_POST['R1'];
$r2 = $_POST['R2'];
$r3 = $_POST['R3'];
$c1 = $_POST['C1'];
$c2 = $_POST['C2'];
$c3 = $_POST['C3'];



if($nr_0 == "0" AND $nr_1 == "0" AND $nr_2 == "0" AND $nr_3 == "0" AND $nr_4 == "0" AND $nr_5 == "0" AND $nr_6 == "0" AND $nr_7 == "0" AND $nr_8 == "0" AND $nr_9 == "0" AND $nr_10 == "0" AND $nr_11 == "0" AND $nr_12 == "0" AND $nr_13 == "0" AND $nr_14 == "0" AND $nr_15 == "0" AND $nr_16 == "0" AND $nr_17 == "0" AND $nr_18 == "0" AND $nr_19 == "0" AND $nr_20 == "0" AND $nr_21 == "0" AND $nr_22 == "0" AND $nr_23 == "0" AND $nr_24 == "0" AND $nr_25 == "0" AND $nr_26 == "0" AND $nr_27 == "0" AND $nr_28 == "0" AND $nr_29 == "0" AND $nr_30 == "0" AND $nr_31 == "0" AND $nr_32 == "0" AND $nr_33 == "0" AND $nr_34 == "0" AND $nr_35 == "0" AND $nr_36 == "0" AND $even == "0" AND $odd == "0" AND $low == "0" AND $high == "0" AND $black == "0" AND $red == "0" AND $r1 == "0" AND $r2 == "0" AND $r3 == "0"  AND $c1 == "0" AND $c2 == "0" AND $c3 == "0")

{

echo "<b> -> Error</b><br><br>No ammount was filled in!";
}

else
{

$uitgaven = $nr_0 + $nr_1 + $nr_2 + $nr_3 + $nr_4 + $nr_5 + $nr_6 + $nr_7 + $nr_8 + $nr_9 + $nr_10 + $nr_11 + $nr_12 + $nr_13 + $nr_14 + $nr_15 + $nr_16 + $nr_17 + $nr_18 + $nr_19 + $nr_20 + $nr_21 + $nr_22 + $nr_23 + $nr_24 + $nr_25 + $nr_26 + $nr_27 + $nr_28 + $nr_29 + $nr_30 + $nr_31 + $nr_32 + $nr_33 + $nr_34 + $nr_35 + $nr_36 + $even + $odd + $low + $high + $black + $red + $r1 + $r2 + $r3 + $c1 + $c2 + $c3;

$get_rpg_bank = mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
if($money_pocket < $uitgaven)
{

?>
<b> -> Error</b><br><br>
You dont have enough money!<br>
You need
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_pocket - $uitgave; ?>
Dellor more.<br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?
}
else
{

$lucky_number = $roulette_lucky_number;
unset($roulette_lucky_number);

$kleur = roulette_kleur($lucky_number);
if($lucky_number % 2 == 0) { $type = "even"; } else { $type = "odd"; }
$money_won = 0;

// 35 tegen 1 uitrekenen
if($lucky_number == 1) { $money_won = $money_won + $nr_1 * 35; }
elseif($lucky_number == 2) { $money_won = $money_won + $nr_2 * 35; }
elseif($lucky_number == 3) { $money_won = $money_won + $nr_3 * 35; }
elseif($lucky_number == 4) { $money_won = $money_won + $nr_4 * 35; }
elseif($lucky_number == 5) { $money_won = $money_won + $nr_5 * 35; }
elseif($lucky_number == 6) { $money_won = $money_won + $nr_6 * 35; }
elseif($lucky_number == 7) { $money_won = $money_won + $nr_7 * 35; }
elseif($lucky_number == 8) { $money_won = $money_won + $nr_8 * 35; }
elseif($lucky_number == 9) { $money_won = $money_won + $nr_9 * 35; }
elseif($lucky_number == 10) { $money_won = $money_won + $nr_10 * 35; }
elseif($lucky_number == 11) { $money_won = $money_won + $nr_11 * 35; }
elseif($lucky_number == 12) { $money_won = $money_won + $nr_12 * 35; }
elseif($lucky_number == 13) { $money_won = $money_won + $nr_13 * 35; }
elseif($lucky_number == 14) { $money_won = $money_won + $nr_14 * 35; }
elseif($lucky_number == 15) { $money_won = $money_won + $nr_15 * 35; }
elseif($lucky_number == 16) { $money_won = $money_won + $nr_16 * 35; }
elseif($lucky_number == 17) { $money_won = $money_won + $nr_17 * 35; }
elseif($lucky_number == 18) { $money_won = $money_won + $nr_18 * 35; }
elseif($lucky_number == 19) { $money_won = $money_won + $nr_19 * 35; }
elseif($lucky_number == 20) { $money_won = $money_won + $nr_20 * 35; }
elseif($lucky_number == 21) { $money_won = $money_won + $nr_21 * 35; }
elseif($lucky_number == 22) { $money_won = $money_won + $nr_22 * 35; }
elseif($lucky_number == 23) { $money_won = $money_won + $nr_23 * 35; }
elseif($lucky_number == 24) { $money_won = $money_won + $nr_24 * 35; }
elseif($lucky_number == 25) { $money_won = $money_won + $nr_25 * 35; }
elseif($lucky_number == 26) { $money_won = $money_won + $nr_26 * 35; }
elseif($lucky_number == 27) { $money_won = $money_won + $nr_27 * 35; }
elseif($lucky_number == 28) { $money_won = $money_won + $nr_28 * 35; }
elseif($lucky_number == 29) { $money_won = $money_won + $nr_29 * 35; }
elseif($lucky_number == 30) { $money_won = $money_won + $nr_30 * 35; }
elseif($lucky_number == 31) { $money_won = $money_won + $nr_31 * 35; }
elseif($lucky_number == 32) { $money_won = $money_won + $nr_32 * 35; }
elseif($lucky_number == 33) { $money_won = $money_won + $nr_33 * 35; }
elseif($lucky_number == 34) { $money_won = $money_won + $nr_34 * 35; }
elseif($lucky_number == 35) { $money_won = $money_won + $nr_35 * 35; }
elseif($lucky_number == 36) { $money_won = $money_won + $nr_36 * 35; }
elseif($lucky_number == 0) { $money_won = $money_won + $nr_0 * 135; }
else { $money_won = ""; }

//Even - oneven uitrekenen
if($type == "odd") { $money_won = $money_won + $odd * 2; }
elseif($type == "even") { $money_won = $money_won + $even * 2; }

//Kleur uitrekenen
if($kleur == "red") { $money_won = $money_won + $red * 2; }
elseif($kleur == "black") { $money_won = $money_won + $black * 2; }

//Low - high
if($lucky_number >= 19) { $money_won = $money_won + $high * 4; }
elseif($lucky_number >= 0) { $money_won = $money_won + $low * 4; }

//row
$row = roulette_r($lucky_number);
if($row == "r1") { $money_won = $money_won + $r1 * 2; }
elseif($row == "r2") { $money_won = $money_won + $r2 * 2; }
elseif($row == "r3") { $money_won = $money_won + $r3 * 2; }

//colom
$col = roulette_c($lucky_number);
if($col == "c1") { $money_won = $money_won + $c1 * 2; }
elseif($col == "c2") { $money_won = $money_won + $c2 * 2; }
elseif($col == "c3") { $money_won = $money_won + $c3 * 2; }



?>
<br><br>

<div id="nr1">
<img src="./rpg/guns/roulette_wheel.gif"><br>
Spinning the wheel...
</div>
<div id="nr2" style="display:none;">
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br><br>
The lucky number was <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $lucky_number; ?>
</b>.<br>
The color of that number is <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $kleur; ?>
</b>.<br><br>
Type:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $type; ?>
.<br><br>
You spended:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $uitgaven; ?>
.<br>
You win <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_won; ?>
</b>.<br><br>

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
<?
$money_got
= $money_won - $uitgaven;

if($money_got < 0)
{

echo 'You have lost money. You now have '.$money_got.' Dellor.';
}


$new_geldzak = $money_pocket + $money_got;
mysql_query("UPDATE rpg_bank SET geldzak = '".$new_geldzak."' WHERE username = '".$userid."'") or die ("query mislukt, error: ". mysql_error());
?>

</div>
<script language="JavaScript">
setTimeout("hide('nr1')", 2000);
setTimeout("hide('nr2')", 2000);
</script>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
}
}
}
}

?>


Heb em zo direct gekopieerd van mun site...
Kan zijn dat er een } te veel of te weinig is...
 
Daniel

Daniel

27/11/2004 17:47:00
Quote Anchor link
bij roulette hoef je niet persee op een getal te zette je kunt ook op een kleur zette rood/zwart
 
Bart Waarom verplicht

Bart Waarom verplicht

27/11/2004 18:12:00
Quote Anchor link
Dit topic is al heeeel oud en het probleem is ook llang verholpen...


Post: 04.07.2004 12:40
Nu: 27.11.2004 18:12

_-_'
 
Paul v.Dun

Paul v.Dun

16/12/2004 14:10:00
Quote Anchor link
Quote:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?
if($casino == "roulette")
{
?>
<b>-> <a href="index.php?do=rpg&rpg=casino&casino=roulette&PHPSESSID=2712b49dc4a3bcd30053c9c3e225e8ba"><font color=black>Roulette</a></b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?
$roulette_lucky_number
= rand(0,36);
if($rl_do == "")
{

?>

<br><br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
$get_rpg_bank_pre
= mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank_pre)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
echo "Money pocket: <b>".$money_pocket."</b> Dellor.<br>";
echo "Money bank:   <b>".$money_bank."</b> Dellor.<br>";
?>


<br>
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br>
<br>

<div style="position: absolute; left: 125px; top: 59px;">
<FORM METHOD="POST" ACTION="index.php?do=rpg&rpg=casino&casino=roulette&rl_do=1"><input type="hidden" name="PHPSESSID" value="2712b49dc4a3bcd30053c9c3e225e8ba" />
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=158 valign=center align=center><font size="1" color="white">0   <INPUT TYPE="text" NAME="0" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">1   <INPUT TYPE="text" NAME="1" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">2   <INPUT TYPE="text" NAME="2" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">3   <INPUT TYPE="text" NAME="3" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">4   <INPUT TYPE="text" NAME="4" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">5   <INPUT TYPE="text" NAME="5" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">6   <INPUT TYPE="text" NAME="6" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">7   <INPUT TYPE="text" NAME="7" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">8   <INPUT TYPE="text" NAME="8" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">9   <INPUT TYPE="text" NAME="9" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">10 <INPUT TYPE="text" NAME="10" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">11 <INPUT TYPE="text" NAME="11" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">12 <INPUT TYPE="text" NAME="12" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">13 <INPUT TYPE="text" NAME="13" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">14 <INPUT TYPE="text" NAME="14" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">15 <INPUT TYPE="text" NAME="15" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">16 <INPUT TYPE="text" NAME="16" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">17 <INPUT TYPE="text" NAME="17" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">18 <INPUT TYPE="text" NAME="18" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">19 <INPUT TYPE="text" NAME="19" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">20 <INPUT TYPE="text" NAME="20" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">21 <INPUT TYPE="text" NAME="21" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">22 <INPUT TYPE="text" NAME="22" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">23 <INPUT TYPE="text" NAME="23" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">24 <INPUT TYPE="text" NAME="24" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">25 <INPUT TYPE="text" NAME="25" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">26 <INPUT TYPE="text" NAME="26" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">27 <INPUT TYPE="text" NAME="27" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">28 <INPUT TYPE="text" NAME="28" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">29 <INPUT TYPE="text" NAME="29" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">30 <INPUT TYPE="text" NAME="30" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">31 <INPUT TYPE="text" NAME="31" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">32 <INPUT TYPE="text" NAME="32" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">33 <INPUT TYPE="text" NAME="33" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">34 <INPUT TYPE="text" NAME="34" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=black width=50 valign=center align=center><font size="1" color="white">35 <INPUT TYPE="text" NAME="35" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=RED width=50 valign=center align=center><font size="1" color="white">36 <INPUT TYPE="text" NAME="36" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R1 <INPUT TYPE="text" NAME="R1" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R2 <INPUT TYPE="text" NAME="R2" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">R3 <INPUT TYPE="text" NAME="R3" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C1 <INPUT TYPE="text" NAME="C1" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C2 <INPUT TYPE="text" NAME="C2" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=50 valign=center align=center><font size="1" color="white">C3 <INPUT TYPE="text" NAME="C3" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>


<br>


<table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Odd <INPUT TYPE="text" NAME="odd" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">Even <INPUT TYPE="text" NAME="even" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">1-18 <INPUT TYPE="text" NAME="low" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="white">19-36 <INPUT TYPE="text" NAME="high" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
<tr>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="red"><b>Red</b> <INPUT TYPE="text" NAME="red" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
<td bgcolor=GREEN width=60 valign=center align=center><font size="1" color="black"><b>Black</b> <INPUT TYPE="text" NAME="black" value="0" size="1" STYLE="width: 22; height: 15; font-size:xx-small; text-align:center"></td>
</tr>
</table>
<br></div><br><br><br><br><br><br>
<INPUT TYPE="submit" value="Let's do it!"><INPUT TYPE="reset">
</FORM>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?
}
elseif($rl_do == "1")
{


$nr_0 = $_POST['0'];
$nr_1 = $_POST['1'];
$nr_2 = $_POST['2'];
$nr_3 = $_POST['3'];
$nr_4 = $_POST['4'];
$nr_5 = $_POST['5'];
$nr_6 = $_POST['6'];
$nr_7 = $_POST['7'];
$nr_8 = $_POST['8'];
$nr_9 = $_POST['9'];
$nr_10 = $_POST['10'];
$nr_11 = $_POST['11'];
$nr_12 = $_POST['12'];
$nr_13 = $_POST['13'];
$nr_14 = $_POST['14'];
$nr_15 = $_POST['15'];
$nr_16 = $_POST['16'];
$nr_17 = $_POST['17'];
$nr_18 = $_POST['18'];
$nr_19 = $_POST['19'];
$nr_20 = $_POST['20'];
$nr_21 = $_POST['21'];
$nr_22 = $_POST['22'];
$nr_23 = $_POST['23'];
$nr_24 = $_POST['24'];
$nr_25 = $_POST['25'];
$nr_26 = $_POST['26'];
$nr_27 = $_POST['27'];
$nr_28 = $_POST['28'];
$nr_29 = $_POST['29'];
$nr_30 = $_POST['30'];
$nr_31 = $_POST['31'];
$nr_32 = $_POST['32'];
$nr_33 = $_POST['33'];
$nr_34 = $_POST['34'];
$nr_35 = $_POST['35'];
$nr_36 = $_POST['36'];
$even = $_POST['even'];
$odd = $_POST['odd'];
$low = $_POST['low'];
$high = $_POST['high'];
$black = $_POST['black'];
$red = $_POST['red'];
$r1 = $_POST['R1'];
$r2 = $_POST['R2'];
$r3 = $_POST['R3'];
$c1 = $_POST['C1'];
$c2 = $_POST['C2'];
$c3 = $_POST['C3'];



if($nr_0 == "0" AND $nr_1 == "0" AND $nr_2 == "0" AND $nr_3 == "0" AND $nr_4 == "0" AND $nr_5 == "0" AND $nr_6 == "0" AND $nr_7 == "0" AND $nr_8 == "0" AND $nr_9 == "0" AND $nr_10 == "0" AND $nr_11 == "0" AND $nr_12 == "0" AND $nr_13 == "0" AND $nr_14 == "0" AND $nr_15 == "0" AND $nr_16 == "0" AND $nr_17 == "0" AND $nr_18 == "0" AND $nr_19 == "0" AND $nr_20 == "0" AND $nr_21 == "0" AND $nr_22 == "0" AND $nr_23 == "0" AND $nr_24 == "0" AND $nr_25 == "0" AND $nr_26 == "0" AND $nr_27 == "0" AND $nr_28 == "0" AND $nr_29 == "0" AND $nr_30 == "0" AND $nr_31 == "0" AND $nr_32 == "0" AND $nr_33 == "0" AND $nr_34 == "0" AND $nr_35 == "0" AND $nr_36 == "0" AND $even == "0" AND $odd == "0" AND $low == "0" AND $high == "0" AND $black == "0" AND $red == "0" AND $r1 == "0" AND $r2 == "0" AND $r3 == "0"  AND $c1 == "0" AND $c2 == "0" AND $c3 == "0")

{

echo "<b> -> Error</b><br><br>No ammount was filled in!";
}

else
{

$uitgaven = $nr_0 + $nr_1 + $nr_2 + $nr_3 + $nr_4 + $nr_5 + $nr_6 + $nr_7 + $nr_8 + $nr_9 + $nr_10 + $nr_11 + $nr_12 + $nr_13 + $nr_14 + $nr_15 + $nr_16 + $nr_17 + $nr_18 + $nr_19 + $nr_20 + $nr_21 + $nr_22 + $nr_23 + $nr_24 + $nr_25 + $nr_26 + $nr_27 + $nr_28 + $nr_29 + $nr_30 + $nr_31 + $nr_32 + $nr_33 + $nr_34 + $nr_35 + $nr_36 + $even + $odd + $low + $high + $black + $red + $r1 + $r2 + $r3 + $c1 + $c2 + $c3;

$get_rpg_bank = mysql_query("SELECT * FROM rpg_bank WHERE username = '".$userid."'") or die ("query mislukt");
while($obj = mysql_fetch_object($get_rpg_bank)){ $money_pocket = $obj->geldzak; $money_bank = $obj->geldbank; }
if($money_pocket < $uitgaven)
{

?>
<b> -> Error</b><br><br>
You dont have enough money!<br>
You need
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_pocket - $uitgave; ?>
Dellor more.<br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?
}
else
{

$lucky_number = $roulette_lucky_number;
unset($roulette_lucky_number);

$kleur = roulette_kleur($lucky_number);
if($lucky_number % 2 == 0) { $type = "even"; } else { $type = "odd"; }
$money_won = 0;

// 35 tegen 1 uitrekenen
if($lucky_number == 1) { $money_won = $money_won + $nr_1 * 35; }
elseif($lucky_number == 2) { $money_won = $money_won + $nr_2 * 35; }
elseif($lucky_number == 3) { $money_won = $money_won + $nr_3 * 35; }
elseif($lucky_number == 4) { $money_won = $money_won + $nr_4 * 35; }
elseif($lucky_number == 5) { $money_won = $money_won + $nr_5 * 35; }
elseif($lucky_number == 6) { $money_won = $money_won + $nr_6 * 35; }
elseif($lucky_number == 7) { $money_won = $money_won + $nr_7 * 35; }
elseif($lucky_number == 8) { $money_won = $money_won + $nr_8 * 35; }
elseif($lucky_number == 9) { $money_won = $money_won + $nr_9 * 35; }
elseif($lucky_number == 10) { $money_won = $money_won + $nr_10 * 35; }
elseif($lucky_number == 11) { $money_won = $money_won + $nr_11 * 35; }
elseif($lucky_number == 12) { $money_won = $money_won + $nr_12 * 35; }
elseif($lucky_number == 13) { $money_won = $money_won + $nr_13 * 35; }
elseif($lucky_number == 14) { $money_won = $money_won + $nr_14 * 35; }
elseif($lucky_number == 15) { $money_won = $money_won + $nr_15 * 35; }
elseif($lucky_number == 16) { $money_won = $money_won + $nr_16 * 35; }
elseif($lucky_number == 17) { $money_won = $money_won + $nr_17 * 35; }
elseif($lucky_number == 18) { $money_won = $money_won + $nr_18 * 35; }
elseif($lucky_number == 19) { $money_won = $money_won + $nr_19 * 35; }
elseif($lucky_number == 20) { $money_won = $money_won + $nr_20 * 35; }
elseif($lucky_number == 21) { $money_won = $money_won + $nr_21 * 35; }
elseif($lucky_number == 22) { $money_won = $money_won + $nr_22 * 35; }
elseif($lucky_number == 23) { $money_won = $money_won + $nr_23 * 35; }
elseif($lucky_number == 24) { $money_won = $money_won + $nr_24 * 35; }
elseif($lucky_number == 25) { $money_won = $money_won + $nr_25 * 35; }
elseif($lucky_number == 26) { $money_won = $money_won + $nr_26 * 35; }
elseif($lucky_number == 27) { $money_won = $money_won + $nr_27 * 35; }
elseif($lucky_number == 28) { $money_won = $money_won + $nr_28 * 35; }
elseif($lucky_number == 29) { $money_won = $money_won + $nr_29 * 35; }
elseif($lucky_number == 30) { $money_won = $money_won + $nr_30 * 35; }
elseif($lucky_number == 31) { $money_won = $money_won + $nr_31 * 35; }
elseif($lucky_number == 32) { $money_won = $money_won + $nr_32 * 35; }
elseif($lucky_number == 33) { $money_won = $money_won + $nr_33 * 35; }
elseif($lucky_number == 34) { $money_won = $money_won + $nr_34 * 35; }
elseif($lucky_number == 35) { $money_won = $money_won + $nr_35 * 35; }
elseif($lucky_number == 36) { $money_won = $money_won + $nr_36 * 35; }
elseif($lucky_number == 0) { $money_won = $money_won + $nr_0 * 135; }
else { $money_won = ""; }

//Even - oneven uitrekenen
if($type == "odd") { $money_won = $money_won + $odd * 2; }
elseif($type == "even") { $money_won = $money_won + $even * 2; }

//Kleur uitrekenen
if($kleur == "red") { $money_won = $money_won + $red * 2; }
elseif($kleur == "black") { $money_won = $money_won + $black * 2; }

//Low - high
if($lucky_number >= 19) { $money_won = $money_won + $high * 4; }
elseif($lucky_number >= 0) { $money_won = $money_won + $low * 4; }

//row
$row = roulette_r($lucky_number);
if($row == "r1") { $money_won = $money_won + $r1 * 2; }
elseif($row == "r2") { $money_won = $money_won + $r2 * 2; }
elseif($row == "r3") { $money_won = $money_won + $r3 * 2; }

//colom
$col = roulette_c($lucky_number);
if($col == "c1") { $money_won = $money_won + $c1 * 2; }
elseif($col == "c2") { $money_won = $money_won + $c2 * 2; }
elseif($col == "c3") { $money_won = $money_won + $c3 * 2; }



?>
<br><br>

<div id="nr1">
<img src="./rpg/guns/roulette_wheel.gif"><br>
Spinning the wheel...
</div>
<div id="nr2" style="display:none;">
<table cellpadding=1 cellspacing=2>
<tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Odd</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>Even</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="red"><b>Red</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="black"><b>Black</b></td>
</tr><tr>
<td width=15> </td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>1-18</b></td>
<td bgcolor=GREEN width=40 valign=center align=center><font size="1" color="white"><b>19-36</b></td>
</tr>
</table>
<br>


<table cellpadding=1 cellspacing=2>
<tr><td width=30></td><td bgcolor=GREEN width=67 valign=center align=center><font size="1" color="white">0</td></tr>


</table><table cellpadding=1 cellspacing=2 border=0>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">1</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">2</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">3</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">4</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">5</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">6</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">7</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">8</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">9</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C1 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">10</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">11</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">12</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">13</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">14</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">15</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">16</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">17</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">18</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">19</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">20</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">21</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C2 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">22</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">23</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">24</td>
</tr>

</table><table cellpadding=1 cellspacing=2 border=0>

<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">25</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">26</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">27</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">28</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">29</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">30</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">31</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">32</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">33</td>
</tr>
<tr>
<td bgcolor=GREEN width=30 valign=center align=center><font size="1" color="white">C3 ></td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">34</td>
<td bgcolor=black width=20 valign=center align=center><font size="1" color="white">35</td>
<td bgcolor=RED width=20 valign=center align=center><font size="1" color="white">36</td>
</tr>
</table><table cellpadding=1 cellspacing=2>
<tr>
<td width=30 valign=center align=center></td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R1</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R2</td>
<td bgcolor=GREEN width=20 valign=center align=center><font size="1" color="white">^<br>R3</td>
</tr>
</table>
<br><br>
The lucky number was <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $lucky_number; ?>
</b>.<br>
The color of that number is <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $kleur; ?>
</b>.<br><br>
Type:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $type; ?>
.<br><br>
You spended:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $uitgaven; ?>
.<br>
You win <b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $money_won; ?>
</b>.<br><br>

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
<?
$money_got
= $money_won - $uitgaven;

if($money_got < 0)
{

echo 'You have lost money. You now have '.$money_got.' Dellor.';
}


$new_geldzak = $money_pocket + $money_got;
mysql_query("UPDATE rpg_bank SET geldzak = '".$new_geldzak."' WHERE username = '".$userid."'") or die ("query mislukt, error: ". mysql_error());
?>

</div>
<script language="JavaScript">
setTimeout("hide('nr1')", 2000);
setTimeout("hide('nr2')", 2000);
</script>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?
}
}
}
}

?>


Heb em zo direct gekopieerd van mun site...
Kan zijn dat er een } te veel of te weinig is...
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.