Steve ha fatto la maggior parte di esso se non ricordo corretto:?
Apri mchat.php
Cerca:
Codice: Seleziona tutto
$sql_ary = array(
'forum_id' => 0,
Codice: Seleziona tutto
$find_chars = array("//roll_dice");
$roll_dice = mt_rand(2,12);
switch ($roll_dice)
{
case $roll_dice == '1':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice1.gif" width="32" height="32" alt="1" />';
break;
case $roll_dice == '2':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice2.gif" width="32" height="32" alt="2" />';
break;
case $roll_dice == '3':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice3.gif" width="32" height="32" alt="3" />';
break;
case $roll_dice == '4':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice4.gif" width="32" height="32" alt="4" />';
break;
case $roll_dice == '5':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice5.gif" width="32" height="32" alt="5" />';
break;
case $roll_dice == '6':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" />';
break;
case $roll_dice == '7':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice1.gif" width="32" height="32" alt="7" />';
break;
case $roll_dice == '8':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice2.gif" width="32" height="32" alt="8" />';
break;
case $roll_dice == '9':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice3.gif" width="32" height="32" alt="9" />';
break;
case $roll_dice == '10':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice4.gif" width="32" height="32" alt="10" />';
break;
case $roll_dice == '11':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice5.gif" width="32" height="32" alt="11" />';
break;
case $roll_dice == '12':
$roll_dice = '<img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="6" /> <img src="' . $phpbb_root_path . 'images/dice6.gif" width="32" height="32" alt="12" />';
break;
}
$message = str_replace($find_chars, $roll_dice, $message);