adjusted mt_rand to mt_rand_wrapper

main
hecht 9 years ago
parent 2835c5ec33
commit 0f967c1c68

@ -12,6 +12,7 @@ include_once ('inclu/exp.inc.php');
include_once ('inclu/turnier.inc.php');
include_once ('inclu/char.inc.php');
include_once(ROOT_PATH. "/include/random.inc.php");
// do the stuff for the whole exp and money distribution there ;)
$results = generateTournamentResults('wochen', 15000, 0);
@ -21,7 +22,7 @@ insertIntoHallOfFame('Wochenturnier', $rang1['id'], $rang1['besitzer']);
$xiu=5;
if($xiu >= mt_rand(1, 100)) {
if($xiu >= mt_random_wrapper(1, 100)) {
////////////////FRUCHT ARRAY
//include "array.php";
distributeFruit($rang1['besitzer']);

@ -5,7 +5,10 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
$frucht_rate = mt_rand(1,$natur_frucht);
include_once(ROOT_PATH. "/include/random.inc.php");
$frucht_rate = mt_random_wrapper(1,$natur_frucht);
if($frucht_rate == 1) { $frucht_name = 15; } /////////15=ID fuer Sand Frucht
if($frucht_rate == 2) { $frucht_name = 8; } /////////8 = ID FueR Feuer Frucht

@ -6,6 +6,9 @@
*
*/
include "db.php";
include('path.inc.php');
include_once(ROOT_PATH. "/include/random.inc.php");
$mak_time = time();
$z_time = time() - 86400;
@ -95,14 +98,14 @@ $row = mysql_fetch_array(mysql_query("SELECT name, level, starke, speed, verteid
$new_hp = explode(",", $row[hp]);
$new_mp = explode(",", $row[mp]);
$beste_mp = (($new_mp[1] / 100) * mt_rand(75, 130)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_rand(80, 150)) + 3000;
$beste_mp = (($new_mp[1] / 100) * mt_random_wrapper(75, 130)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_random_wrapper(80, 150)) + 3000;
$beste_starke = ($row[starke] / 100) * mt_rand(75, 130);
$beste_speed = ($row[speed] / 100) * mt_rand(75, 110);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_rand(75, 110);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_rand(75, 130);
$beste_glueck = ($row[glueck] / 100) * mt_rand(75, 130);
$beste_starke = ($row[starke] / 100) * mt_random_wrapper(75, 130);
$beste_speed = ($row[speed] / 100) * mt_random_wrapper(75, 110);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_random_wrapper(75, 110);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_random_wrapper(75, 130);
$beste_glueck = ($row[glueck] / 100) * mt_random_wrapper(75, 130);
mysql_query("UPDATE chars SET hp='$beste_hp,$beste_hp', mp='$beste_mp,$beste_mp', starke='$beste_starke', speed='$beste_speed', verteidigung='$beste_verteidigung', ausdauer='$beste_ausdauer', glueck='$beste_glueck' WHERE id='$brolly' LIMIT 1");
@ -113,14 +116,14 @@ $row = mysql_fetch_array(mysql_query("SELECT name, level, starke, speed, verteid
$new_hp = explode(",", $row[hp]);
$new_mp = explode(",", $row[mp]);
$beste_mp = (($new_mp[1] / 100) * mt_rand(100, 150)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_rand(120, 220)) + 3000;
$beste_mp = (($new_mp[1] / 100) * mt_random_wrapper(100, 150)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_random_wrapper(120, 220)) + 3000;
$beste_starke = ($row[starke] / 100) * mt_rand(60, 110);
$beste_speed = ($row[speed] / 100) * mt_rand(60, 100);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_rand(100, 150);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_rand(100, 200);
$beste_glueck = ($row[glueck] / 100) * mt_rand(80, 100);
$beste_starke = ($row[starke] / 100) * mt_random_wrapper(60, 110);
$beste_speed = ($row[speed] / 100) * mt_random_wrapper(60, 100);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_random_wrapper(100, 150);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_random_wrapper(100, 200);
$beste_glueck = ($row[glueck] / 100) * mt_random_wrapper(80, 100);
mysql_query("UPDATE chars SET hp='$beste_hp,$beste_hp', mp='$beste_mp,$beste_mp', starke='$beste_starke', speed='$beste_speed', verteidigung='$beste_verteidigung', ausdauer='$beste_ausdauer', glueck='$beste_glueck' WHERE id='$bebi' LIMIT 1");
@ -131,14 +134,14 @@ $row = mysql_fetch_array(mysql_query("SELECT hp, mp, name, level, starke, speed,
$new_hp = explode(",", $row[hp]);
$new_mp = explode(",", $row[mp]);
$beste_mp = (($new_mp[1] / 100) * mt_rand(150, 200)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_rand(100, 200)) + 3000;
$beste_mp = (($new_mp[1] / 100) * mt_random_wrapper(150, 200)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_random_wrapper(100, 200)) + 3000;
$beste_starke = ($row[starke] / 100) * mt_rand(75, 120);
$beste_speed = ($row[speed] / 100) * mt_rand(75, 120);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_rand(80, 100);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_rand(60, 120);
$beste_glueck = ($row[glueck] / 100) * mt_rand(60, 200);
$beste_starke = ($row[starke] / 100) * mt_random_wrapper(75, 120);
$beste_speed = ($row[speed] / 100) * mt_random_wrapper(75, 120);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_random_wrapper(80, 100);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_random_wrapper(60, 120);
$beste_glueck = ($row[glueck] / 100) * mt_random_wrapper(60, 200);
mysql_query("UPDATE chars SET hp='$beste_hp,$beste_hp', mp='$beste_mp,$beste_mp', starke='$beste_starke', speed='$beste_speed', verteidigung='$beste_verteidigung', ausdauer='$beste_ausdauer', glueck='$beste_glueck' WHERE id='$flamingo' LIMIT 1");
@ -148,14 +151,14 @@ $row = mysql_fetch_array(mysql_query("SELECT hp, mp, name, level, starke, speed,
$new_hp = explode(",", $row[hp]);
$new_mp = explode(",", $row[mp]);
$beste_mp = (($new_mp[1] / 100) * mt_rand(80, 110)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_rand(80, 250)) + 3000;
$beste_mp = (($new_mp[1] / 100) * mt_random_wrapper(80, 110)) + 1000;
$beste_hp = (($new_hp[1] / 100) * mt_random_wrapper(80, 250)) + 3000;
$beste_starke = ($row[starke] / 100) * mt_rand(80, 120);
$beste_speed = ($row[speed] / 100) * mt_rand(80, 130);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_rand(80, 120);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_rand(80, 150);
$beste_glueck = ($row[glueck] / 100) * mt_rand(90, 100);
$beste_starke = ($row[starke] / 100) * mt_random_wrapper(80, 120);
$beste_speed = ($row[speed] / 100) * mt_random_wrapper(80, 130);
$beste_verteidigung = ($row[verteidigung] / 100) * mt_random_wrapper(80, 120);
$beste_ausdauer = ($row[ausdauer] / 100) * mt_random_wrapper(80, 150);
$beste_glueck = ($row[glueck] / 100) * mt_random_wrapper(90, 100);
mysql_query("UPDATE chars SET hp='$beste_hp,$beste_hp', mp='$beste_mp,$beste_mp', starke='$beste_starke', speed='$beste_speed', verteidigung='$beste_verteidigung', ausdauer='$beste_ausdauer', glueck='$beste_glueck' WHERE id='$mihawk' LIMIT 1");
?>

@ -6,6 +6,8 @@
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
function distributeFruit($user_id) {
$sql = 'SELECT id FROM wochen_markt WHERE art=\'natur\'';
$qry = mysql_query($sql);
@ -14,7 +16,7 @@ function distributeFruit($user_id) {
$fruits[] = $fruit;
}
$choice = mt_rand(0,$amount-1);
$choice = mt_random_wrapper(0,$amount-1);
$sql = 'INSERT wochen_ware SET item='.$fruits[$choice]['id'].', user='.$user_id;
echo $sql . '<br>';
mysql_query($sql);

@ -7,6 +7,8 @@
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
// + offset in Minuten
function insertUserTickerMessage($userid, $message, $offset = 0){
if($offset == 0){
@ -14,7 +16,7 @@ function insertUserTickerMessage($userid, $message, $offset = 0){
} else{
$timestamp = '\''.date('Y-m-d H:i:s', time() + $offset * 60).'\'';
}
for($msgid = 0; $msgid < 100000; $msgid += mt_rand(1,1000)){
for($msgid = 0; $msgid < 100000; $msgid += mt_random_wrapper(1,1000)){
$sql = 'INSERT INTO user_ticker(userid, date, msgid, text) values('.$userid.', '.$timestamp.', '.$msgid.', \''.$message.'\')';
mysql_query($sql);
if(mysql_affected_rows() == 1){
@ -31,7 +33,7 @@ function insertClanTickerMessage($clanid, $message, $offset = 0){
} else{
$timestamp = '\''.date('Y-m-d H:i:s', time() + $offset * 60).'\'';
}
for($msgid = 0; $msgid < 100000; $msgid += mt_rand(1,1000)){
for($msgid = 0; $msgid < 100000; $msgid += mt_random_wrapper(1,1000)){
$sql = 'INSERT INTO clan_ticker(clanid, date, msgid, text) values('.$clanid.', now(), '.$msgid.', \''.$message.'\')';
mysql_query($sql);
if(mysql_affected_rows() == 1){

@ -6,6 +6,8 @@
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
#####################################KAMPF SYSTEM
// $zufall_pl1 = Attacke p1
@ -17,11 +19,11 @@
// A1 (Attacke Spieler1) = 0.7 * S1 / SA + 0.3 * L1 / LA
// P2 (Parade Spieler2) = 0.6 * S2 / SA + 0.4 * L2 / LA
$lucka1 = mt_rand(0,$k_glueck[0]);
$luckp1 = mt_rand(0,$k_glueck[0]);
$lucka1 = mt_random_wrapper(0,$k_glueck[0]);
$luckp1 = mt_random_wrapper(0,$k_glueck[0]);
$lucka2 = mt_rand(0,$k_glueck[1]);
$luckp2 = mt_rand(0,$k_glueck[1]);
$lucka2 = mt_random_wrapper(0,$k_glueck[1]);
$luckp2 = mt_random_wrapper(0,$k_glueck[1]);
$speedsum = $speed_char1 + $speed_char2;
$lucksum1 = $lucka1 + $luckp2;

@ -5,6 +5,9 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
if(!$aktion_AV1[$x]) {
if($zufall_pl1 > $play2_ausweich) {
@ -16,7 +19,7 @@ $charsa1_4_def = ($k_ver[1]+$technick2[verteidigung]) / 1.1;
if($charsa1_def <= 2) { $charsa1_def = 2; }
if($charsa1_4_def < 1) { $charsa1_4_def = 1; }
$charsa1_def = mt_rand($charsa1_4_def,$charsa1_def);
$charsa1_def = mt_random_wrapper($charsa1_4_def,$charsa1_def);
$charsa1_str = $k_starke[0]*1.2+$technick1[starke];
$charsa1_4_str = ($k_starke[0]*1.2+$technick1[starke])+1;
@ -25,9 +28,9 @@ if($charsa1_str <= 2) { $charsa1_str = 2; }
if($charsa1_4_str < 1) { $charsa1_4_str = 1; }
$charsa1_str = mt_rand($charsa1_4_str,$charsa1_str);
$charsa1_str = mt_random_wrapper($charsa1_4_str,$charsa1_str);
$k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str + mt_rand(1,20)));
$k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str + mt_random_wrapper(1,20)));
$schaden_1 = $alt_hp - $k_hp[1];
if($alt_hp < $k_hp[1]) { $k_hp[1] = $alt_hp; $schaden_1 = 0; }
} else {
@ -46,16 +49,16 @@ $charsa2_4_def = ($k_ver[0]+$technick1[verteidigung]) / 1.1;
if($charsa2_def <= 2) { $charsa2_def = 2; }
if($charsa2_4_def < 1) { $charsa2_4_def = 1; }
$charsa2_def = mt_rand($charsa2_4_def,$charsa2_def);
$charsa2_def = mt_random_wrapper($charsa2_4_def,$charsa2_def);
$charsa2_str = $k_starke[1]*1.2+$technick2[starke];
$charsa2_4_str = ($k_starke[1] *1.2 +$technick2[starke]) +1;
if($charsa1_str <= 2) { $charsa1_str = 2; }
if($charsa2_4_str < 1) { $charsa2_4_str = 1; }
$charsa2_str = mt_rand($charsa2_4_str,$charsa2_str);
$charsa2_str = mt_random_wrapper($charsa2_4_str,$charsa2_str);
$k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_rand(1,20)));
$k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_random_wrapper(1,20)));
$schaden_2 = $alt_hp - $k_hp[0];
if($alt_hp < $k_hp[0]) { $k_hp[0] = $alt_hp; $schaden_2 = 0; }
} else {

@ -6,6 +6,8 @@
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
####################KAIOKEN-LOSE SPIELER 1
if($technick1['type'] == 'lose2') {
@ -14,7 +16,7 @@ if($technick1['type'] == 'lose2') {
$schaden_1 = 'Schw&auml;chen fehlgeschlagen';
$k_mp[0] = 0;
} else {
if($technick1['starke'] >= mt_rand(1,100)) {
if($technick1['starke'] >= mt_random_wrapper(1,100)) {
$schaden_1 = 'Schw&auml;chen';
$k_mp[1] -= $k_mp2[1] * ($technick1['speed'] / 100);
if($k_mp[1] < 0) {
@ -35,7 +37,7 @@ if($technick2['type'] == 'lose2') {
$k_mp[1] = 0;
} else {
if($technick2['starke'] >= mt_rand(1,100)) {
if($technick2['starke'] >= mt_random_wrapper(1,100)) {
$schaden_2 = 'Schw&auml;chen';
$k_mp[0] -= $k_mp1[1] * ($technick2['speed'] / 100);
if($k_mp[0] < 0) {

@ -6,12 +6,14 @@
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
if (!function_exists('getKTChance')) {
function getKTChance($ktuser_luck, $ktvictim_luck) {
$chance = 50;
$ktvictim_luck= mt_rand(0, $ktvictim_luck);
$ktuser_luck = mt_rand(0, $ktuser_luck);
$ktvictim_luck= mt_random_wrapper(0, $ktvictim_luck);
$ktuser_luck = mt_random_wrapper(0, $ktuser_luck);
if($ktvictim_luck < ($ktuser_luck*0.25)) {
$chance = 75;
}
@ -25,7 +27,7 @@ if (!function_exists('getKTChance')) {
################### Spieler 1
$chance = getKTChance($k_glueck[0], $k_glueck[1]);
$random = mt_rand(0,100);
$random = mt_random_wrapper(0,100);
if ($technick1['type'] == tausch) {
if ($k_mp[0] >= $technick1['mp']) {
@ -74,7 +76,7 @@ if ($technick1['type'] == tausch) {
################### Spieler 2
$chance = getKTChance($k_glueck[1], $k_glueck[0]);
$random = mt_rand(0,100);
$random = mt_random_wrapper(0,100);
if ($technick2['type'] == tausch) {
if ($k_mp[1] >= $technick2['mp']) {

@ -5,6 +5,9 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
################### Spieler 1
if($technick1[type] == "tausch2") {
@ -21,7 +24,7 @@ $technick1[starke]=$technick1[starke]+(($technick1[starke]/100)*$prozent_technik
$speeds_char1 = ($k_speed[0] + $technick1[speed]);
$speeds_char1_4 = ($k_speed[0] + $technick1[speed]) / 1.5;
if($speeds_char1_4 < 1) { $speeds_char1_4 = 1; }
$speed_char1 = mt_rand($speeds_char1_4,$speeds_char1);
$speed_char1 = mt_random_wrapper($speeds_char1_4,$speeds_char1);
} else {
@ -47,7 +50,7 @@ $technick2[starke]=$technick2[starke]+(($technick2[starke]/100)*$prozent_technik
$speeds_char2 = ($k_speed[1] + $technick2[speed]);
$speeds_char2_4 = ($k_speed[1] + $technick2[speed]) / 1.5;
if($speeds_char2_4 < 1) { $speeds_char2_4 = 1; }
$speed_char2 = mt_rand($speeds_char2_4,$speeds_char2);
$speed_char2 = mt_random_wrapper($speeds_char2_4,$speeds_char2);
} else {

@ -10,6 +10,7 @@ include('db.php');
include('path.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php');
include_once(ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once(ROOT_PATH. "/include/random.inc.php");
set_time_limit(0);
function rand_array($array)
@ -18,7 +19,7 @@ function rand_array($array)
mt_srand((double)microtime()*1000000);
for($i=$maxarray; $i>=0; $i--)
{
if($i>0) $zufall=mt_rand(0,$i);
if($i>0) $zufall=mt_random_wrapper(0,$i);
else $zufall=0;
$temp=$array[$i];
$array[$i]=$array[$zufall];

@ -5,13 +5,16 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
$uzze=0;
while($uzze < 10) {
$aktion_AV1[$uzze] = "";
$aktion_AV2[$uzze] = "";
$uzze++;
}
$ssj_tech_1="";
include_once(ROOT_PATH. "/include/random.inc.php");
$uzze = 0;
while ( $uzze < 10 ) {
$aktion_AV1 [$uzze] = "";
$aktion_AV2 [$uzze] = "";
$uzze ++;
}
$ssj_tech_1 = "";
$ssj_tech_2="";
$play1_ausweich="";
@ -118,8 +121,8 @@ $speeds_char2_4 = ($k_speed[1] + $technick2[speed]) / 1.5;
if($speeds_char1_4 < 1) { $speeds_char1_4 = 1; }
if($speeds_char2_4 < 1) { $speeds_char2_4 = 1; }
$speed_char1 = mt_rand($speeds_char1_4,$speeds_char1);
$speed_char2 = mt_rand($speeds_char2_4,$speeds_char2);
$speed_char1 = mt_random_wrapper($speeds_char1_4,$speeds_char1);
$speed_char2 = mt_random_wrapper($speeds_char2_4,$speeds_char2);
///////rechnung selber

@ -15,7 +15,7 @@ function rand_array($array)
mt_srand((double)microtime()*1000000);
for($i=$maxarray; $i>=0; $i--)
{
if($i>0) $zufall=mt_rand(0,$i);
if($i>0) $zufall=mt_random_wrapper(0,$i);
else $zufall=0;
$temp=$array[$i];
$array[$i]=$array[$zufall];

@ -5,6 +5,9 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once(ROOT_PATH. "/include/random.inc.php");
$uzze = 0;
while ($uzze < 10) {
$aktion_AV1[$uzze] = "";
@ -127,8 +130,8 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$speeds_char2_4 = 1;
}
$speed_char1 = mt_rand($speeds_char1_4, $speeds_char1);
$speed_char2 = mt_rand($speeds_char2_4, $speeds_char2);
$speed_char1 = mt_random_wrapper($speeds_char1_4, $speeds_char1);
$speed_char2 = mt_random_wrapper($speeds_char2_4, $speeds_char2);
include "kampf_include.php"; ////Rechnung

@ -11,6 +11,7 @@ ignore_user_abort(true);
include "db.php";
include_once("path.inc.php");
include_once(ROOT_PATH. "/include/defines.inc.php");
include_once(ROOT_PATH. "/include/random.inc.php");
// Da es wichtig ist, dass die Querys korrekt abgehandelt werden wurde folgender Code eingefuehrt
@ -112,7 +113,7 @@ function insertAuktionen(){
// Definiert wie hoch die Chance ist eine Niete zu bekommen. 0.5 = 50%
defineIfNotDefined('GEHEIM_CHANCE_NIETE', 0.5);
$anzahl_auktionen = mt_rand(GEHEIM_ANZAHL_AUKTIONEN_MIN,GEHEIM_ANZAHL_AUKTIONEN_MAX); // anzahl der auktionen die gleichzeitig starten (ein oder zwei)
$anzahl_auktionen = mt_random_wrapper(GEHEIM_ANZAHL_AUKTIONEN_MIN,GEHEIM_ANZAHL_AUKTIONEN_MAX); // anzahl der auktionen die gleichzeitig starten (ein oder zwei)
$anzahl_auktions_items = GEHEIM_ANZAHL_AUKTIONS_ITEMS;
$chance_niete = GEHEIM_CHANCE_NIETE * 100;
$startgebot = GEHEIM_START_GEBOT;
@ -140,17 +141,17 @@ function insertAuktionen(){
for($i = 0; $i<$anzahl_auktionen; $i++) {
// Termin festlegen
// Start Sonntag->0,Montag->1,Dienstag->2, Mittwoch->3, Donnerstag->4
$off = mt_rand(0,4);
$off = mt_random_wrapper(0,4);
$start = 'TIMESTAMPADD(Day,'.$off.',\''.$date[date].' 20:00:00\')';
$deadline = 'TIMESTAMPADD(Day,'.($off+3).',\''.$date[date].' 20:00:00\')';
for($t = 0; $t<$anzahl_auktions_items; $t++) {
if(mt_rand(1,100) <= $chance_niete) {
if(mt_random_wrapper(1,100) <= $chance_niete) {
$item_table = 'sp_ware';
$item_id = $nieten_id;
} else {
$item_table = 'wochen_ware';
$item_id = $frucht[mt_rand(0,$fruchtcount-1)];
$item_id = $frucht[mt_random_wrapper(0,$fruchtcount-1)];
}
$test = 'INSERT INTO auktion (itemid, itemname, tablename, anbieter, anzahl, deadline, startgebot, startdate) VALUES('.$item_id.',\'Geheim!\',\''.$item_table.'\',1,1,'.$deadline.','.$startgebot.','.$start.')';
// echo $test."<br>\n";

@ -9,6 +9,7 @@
include('db.php');
include('path.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php');
include_once(ROOT_PATH. "/include/random.inc.php");
set_time_limit(0);
@ -18,7 +19,7 @@ function rand_array($array)
mt_srand((double)microtime()*1000000);
for($i=$maxarray; $i>=0; $i--)
{
if($i>0) $zufall=mt_rand(0,$i);
if($i>0) $zufall=mt_random_wrapper(0,$i);
else $zufall=0;
$temp=$array[$i];
$array[$i]=$array[$zufall];

@ -5,13 +5,16 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
$uzze=0;
while($uzze < 10) {
$aktion_AV1[$uzze] = "";
$aktion_AV2[$uzze] = "";
$uzze++;
}
$ssj_tech_1="";
include_once(ROOT_PATH. "/include/random.inc.php");
$uzze = 0;
while ( $uzze < 10 ) {
$aktion_AV1 [$uzze] = "";
$aktion_AV2 [$uzze] = "";
$uzze ++;
}
$ssj_tech_1 = "";
$ssj_tech_2="";
$play1_ausweich="";
@ -118,8 +121,8 @@ $speeds_char2_4 = ($k_speed[1] + $technick2[speed]) / 1.5;
if($speeds_char1_4 < 1) { $speeds_char1_4 = 1; }
if($speeds_char2_4 < 1) { $speeds_char2_4 = 1; }
$speed_char1 = mt_rand($speeds_char1_4,$speeds_char1);
$speed_char2 = mt_rand($speeds_char2_4,$speeds_char2);
$speed_char1 = mt_random_wrapper($speeds_char1_4,$speeds_char1);
$speed_char2 = mt_random_wrapper($speeds_char2_4,$speeds_char2);
include "kampf_include.php"; ////Rechnung

Loading…
Cancel
Save