added exclusion filters for tournament and created generic tournament post processing

main
hecht 7 years ago
parent 1c31547763
commit fd894c9dc5

@ -1,39 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
include_once('path.inc.php'); // get the path ;)
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once ('inclu/halloffame.inc.php');
include_once ('inclu/fruitdistribution.inc.php');
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);
$rang1 = getChar($results[0][0]);
insertIntoHallOfFame('Wochenturnier', $rang1['id'], $rang1['besitzer']);
$xiu=5;
if($xiu >= mt_random_wrapper(1, 100)) {
////////////////FRUCHT ARRAY
//include "array.php";
distributeFruit($rang1['besitzer']);
}
$prices[] = 50; // 1.
$prices[] = 40; // 2.
$prices[] = 30; // 3. + 4.
$prices[] = 20; // 5. - 8.
distributeShopPoints($prices, $results, 'Wochenturnier');

@ -45,10 +45,32 @@ include_once(ROOT_PATH.'/include/char.inc.php');
include_once(ROOT_PATH.'/include/rassen.inc.php'); include_once(ROOT_PATH.'/include/rassen.inc.php');
include_once(ROOT_PATH.'/include/define.inc.php'); include_once(ROOT_PATH.'/include/define.inc.php');
include_once(ROOT_PATH.'/include/event.inc.php'); include_once(ROOT_PATH.'/include/event.inc.php');
include_once(ROOT_PATH.'/include/items.inc.php');
defineIfNotDefined('ATTACK_SET_TOURNAMENT', 1); defineIfNotDefined('ATTACK_SET_TOURNAMENT', 1);
defineIfNotDefined('TOURNAMENT_FIGHT_DURATION', 5); defineIfNotDefined('TOURNAMENT_FIGHT_DURATION', 5);
function getFruitItem( $fruit_type, $drop_chance ) {
$item_hash = NULL;
if ( $drop_chance == 0 ) {
return NULL;
} else if($drop_chance >= 100 || $drop_chance >= mt_random_wrapper(1, 100)) {
if ($fruit_type == 'natur') {
$sql = 'SELECT id FROM wochen_markt WHERE art=\''.$fruit_type.'\' order by rand() LIMIT 1';
} else {
$sql = 'SELECT id FROM wochen_markt WHERE kategorie=\''.$fruit_type.'\' order by rand() LIMIT 1';
}
$qry = db_query($sql);
$id = mysqli_fetch_row($qry)[0];
$item_hash = item2Value(array('id' => $id, 'table_name' => 'wochen_markt'));
}
return $item_hash;
}
$name = $_GET['name']; // Name des Turniers (benötigt) $name = $_GET['name']; // Name des Turniers (benötigt)
$anzahl = $_GET['anzahl']; // Anzahl (benötigt) $anzahl = $_GET['anzahl']; // Anzahl (benötigt)
@ -65,6 +87,10 @@ $maxlevel = $_GET['maxlevel']; // selbsterklärend
$gain = $_GET['gain']; // ('Anmeldung', 'PL', 'Level') $gain = $_GET['gain']; // ('Anmeldung', 'PL', 'Level')
$randomize = $_GET['randomize']; // 1 für nach jeder Runde die reihenfolge setzen $randomize = $_GET['randomize']; // 1 für nach jeder Runde die reihenfolge setzen
$itemless = $_GET['itemless']; // gibt an ob das turnier die items ingorieren soll (standard sind items aktiv) $itemless = $_GET['itemless']; // gibt an ob das turnier die items ingorieren soll (standard sind items aktiv)
$fruit_chance = $_GET['fruit']; // gibt die prozentuale chance auf eine frucht an
$fruit_type = isset($_GET['fruit_type']) ? $_GET['fruit_type'] : 'natur'; // gibt den typ der frucht an
$exclude_winners = isset($_GET['exclude_winners']) && $_GET['exclude_winners']; // gibt an ob gewinner vorheriger turniere des typs ausgeschlossen werden
$exclude_fusi_count = $_GET['exclude_fusi_count'];
$npc = $_GET['npc']; $npc = $_GET['npc'];
@ -98,12 +124,13 @@ if($gruppenphase == 1){
} }
} }
$race_type = getRaceTypeName("NPC");
$auswahl_kriteria = '1'; $auswahl_kriteria = '1';
if($fusion != 1){ if($fusion != 1){
$auswahl_kriteria .= ' AND fusion_rasse = \'0\' '; $auswahl_kriteria .= ' AND fusion = \'nein\' ';
} else if(is_numeric($exclude_fusi_count) && $exclude_fusi_count > 0) {
$subselect = 'SELECT ec.char_id from event_chars ec inner join turniere t on ec.event_id = t.event_id WHERE art = \''.$name.'\' GROUP by ec.char_id HAVING count(*) >= '.$exclude_fusi_count;
$auswahl_kriteria .= ' AND (fusion = \'nein\' OR id NOT IN ( '.$subselect.' ) )';
} }
// Es sollen keine NPC mitmachen :) und nicht die Spezial Wanted NPCs // Es sollen keine NPC mitmachen :) und nicht die Spezial Wanted NPCs
@ -142,10 +169,15 @@ if(is_numeric($maxlevel)){
$auswahl_kriteria .= ' AND level <= '.$maxlevel.' '; $auswahl_kriteria .= ' AND level <= '.$maxlevel.' ';
} }
if ($exclude_winners == 1) {
$auswahl_kriteria .= ' AND id NOT IN( SELECT charid FROM highscore WHERE art = "'.$name.'") ';
}
// Erstma checken ob es überhaupt genug chars gibt ;) // Erstma checken ob es überhaupt genug chars gibt ;)
$sql = 'SELECT count(*) as anzahl from chars where '.$auswahl_kriteria; $sql = 'SELECT count(*) as anzahl from chars where '.$auswahl_kriteria;
echo $sql.'<br>'; // echo $sql.'<br>';
$qry = db_query($sql); $qry = db_query($sql);
$row = mysqli_fetch_assoc($qry); $row = mysqli_fetch_assoc($qry);
@ -182,9 +214,13 @@ if($gain == 'Anmeldung'){
exit; exit;
} }
echo $sql.'<br>'; // echo $sql.'<br>';
$qry = db_query($sql); $qry = db_query($sql);
while(($row = mysqli_fetch_assoc($qry)) && count($cid) < $anzahl){ while(($row = mysqli_fetch_assoc($qry)) && count($cid) < $anzahl){
// exclude winners of old tournaments in case requested
// exclude fusions that have participated multiple times in tournaments in case requested
// echo $row['id'].'<br>'; // echo $row['id'].'<br>';
$cid[] = $row['id']; $cid[] = $row['id'];
} }
@ -205,6 +241,11 @@ while($row = mysqli_fetch_assoc($qry)){
} else { } else {
$char_data = getCharWithBuffs($row['id']); // Equip für Turniere!! $char_data = getCharWithBuffs($row['id']); // Equip für Turniere!!
} }
$max_hp = explode(',', $char_data['hp'])[1];
$char_data['hp'] = join(',', array($max_hp, $max_hp));
$max_mp = explode(',', $char_data['mp'])[1];
$char_data['mp'] = join(',', array($max_mp, $max_mp));
addParticipant($event_id, $char_data); addParticipant($event_id, $char_data);
$char_array[] = $char_data; $char_array[] = $char_data;
@ -242,3 +283,15 @@ while(count($char_array) > 1){ // Solange bis nur ein Char übrig bleibt
} }
$char_array = $n_chars; $char_array = $n_chars;
} }
$end_time = $start_time + $counter * $duration;
$end_time_str = date("Y-m-d H:i:s",$end_time);
db_query('UPDATE event_chars SET block_begin = \''.$end_time_str.'\', block_end = \''.$end_time_str.'\' WHERE event_id = '.$event_id);
// Seems that we have a winner :D
$fruit_item_str = getFruitItem($fruit_type, $fruit_chance);
if ($fruit_item_str !== NULL) {
// add item in event_char_metadata
db_query('INSERT INTO event_char_metadata(event_id, event_char_id, `key`, `value`) values('.$event_id.','.$char_array[0]['id'].',\''.KEY_ITM_CHAR1.'\',\''.$fruit_item_str.'\')');
}

@ -0,0 +1,51 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
/**
* This script checks for completed tournaments to add the winner in the "hall-of-fame"
*/
include('db.php');
include('path.inc.php');
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once (ROOT_PATH.'/include/event.inc.php');
include_once (ROOT_PATH.'/include/halloffame.inc.php');
$tournaments = array();
$tournament_event_ids = array();
$qry = db_query('SELECT * FROM turniere WHERE ausgewertet = FALSE');
while ($row = mysqli_fetch_assoc($qry)) {
$tournament_event_ids[] = $row['event_id'];
$tournaments[$row['event_id']] = $row;
}
$sql = 'select event_id, MAX(visible) < now() as done, MAX(event_fight_id) as final_fight_id FROM event_fights WHERE event_id IN ('.join(',', $tournament_event_ids).') GROUP BY event_id';
$qry = db_query($sql);
$tournaments_done = array();
while ($row = mysqli_fetch_assoc($qry)) {
if ($row['done']) {
$event_id = $row['event_id'];
$tournament = $tournaments[$event_id];
// determine the winner of the tournament ...
$final_fight = getEventFight($event_id, $row['final_fight_id']);
$winner_char = getEventChar($event_id, $final_fight['winner']);
$row = mysqli_fetch_assoc(db_query('Select max(id) as round from online'));
insertIntoHallOfFameFull($row['round'], $tournament['art'], $winner_char['char_id'], $winner_char['char_name'], $winner_char['user_id'], $winner_char['user_name'], '\''.$tournament['datum'].'\'', $tournament['id']);
$tournaments_done[] = $tournament['id'];
}
}
if (count($tournaments_done) > 0) {
db_query('UPDATE turniere SET ausgewertet = TRUE WHERE id IN ('.join(',', $tournaments_done).')');
}

@ -1,75 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
include_once('path.inc.php'); // get the path ;)
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once ('inclu/messagefunctions.inc.php');
include_once ('inclu/halloffame.inc.php');
include_once ('inclu/fruitdistribution.inc.php');
include_once ('inclu/exp.inc.php');
include_once (ROOT_PATH.'/include/usergroup.inc.php');
include_once ('inclu/turnier.inc.php');
include_once ('inclu/char.inc.php');
// calculate the avg level of the chars participating
$sql = '(Select distinct(char1) as x from turnier_kampf where art = \'gross\' ) union (Select distinct(char2) as x from turnier_kampf where art = \'gross\' )';
$charids = array();
$qry1 = db_query($sql);
while($row = mysqli_fetch_assoc($qry1)){
$charids[] = $row['x'];
}
$sql2 = 'Select avg(level) as dlevel from chars where id in ('.join(',', $charids).')';
$row = mysqli_fetch_assoc(db_query($sql2));
$dlevel = ceil($row['dlevel']);
// do the stuff for the whole exp and money distribution there ;)
//$results = generateTournamentResults('gross', 250000, 2000000);
// Franky && Sinnes request no more money for rounds
$results = generateTournamentResults('gross', 250000, 0);
$rang1 = getChar($results[0][0]);
insertIntoHallOfFame('Weltturnier', $rang1['id'], $rang1['besitzer']);
//$natur_frucht = mysqli_num_rows(db_query("SELECT id FROM wochen_markt WHERE art='natur'")); ///wieviel TF gibt es?.
////////////////FRUCHT ARRAY
//include "array.php";
distributeFruit($rang1['besitzer']);
//Schutz vor automatischem löschen hinzufügen für den sieger :)
$usergroups = getUserGroups($rang1['besitzer']);
if(!isUserInGroup($usergroups, INAKTIV_LOESCHSCHUTZ) && !isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) {
addUserToGroup($rang1['besitzer'], INAKTIV_LOESCHSCHUTZ);
}
// Durchschnittslevel
$summe = 20000000/(1+exp(5-$dlevel/14));
// Now distribute the shop points ;)
$prices[] = 4000000; // 1.
$prices[] = 3000000; // 2.
$prices[] = 2000000; // 3. + 4.
$cprices[] = ceil($summe/2);
$cprices[] = ceil($summe/4);
$cprices[] = ceil($summe/8);
distributeUserPrices($prices, $results, 'Weltturnier');
#distributeShopPoints($prices, $results, 'Weltturnier');
// clan prices are not distributed anymore!!
//distributeClanPrices($cprices, $results, 'Weltturnier');
?>

@ -1,79 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
include_once('path.inc.php'); // get the path ;)
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once ('inclu/messagefunctions.inc.php');
include_once ('inclu/halloffame.inc.php');
include_once ('inclu/fruitdistribution.inc.php');
include_once ('inclu/exp.inc.php');
include_once (ROOT_PATH.'/include/usergroup.inc.php');
include_once ('inclu/turnier.inc.php');
include_once ('inclu/char.inc.php');
$turnier_kurz = 'grossst';
$turnier_name = 'Weltturnier Non-Fusion';
// calculate the avg level of the chars participating
$sql = '(Select distinct(char1) as x from turnier_kampf where art = \''.$turnier_kurz.'\' ) union (Select distinct(char2) as x from turnier_kampf where art = \''.$turnier_kurz.'\' )';
$charids = array();
$qry1 = db_query($sql);
while($row = mysqli_fetch_assoc($qry1)){
$charids[] = $row['x'];
}
$sql2 = 'Select avg(level) as dlevel from chars where id in ('.join(',', $charids).')';
$row = mysqli_fetch_assoc(db_query($sql2));
$dlevel = ceil($row['dlevel']);
// do the stuff for the whole exp and money distribution there ;)
//$results = generateTournamentResults($turnier_kurz, 250000, 2000000);
// Franky && Sinnes request no more money for rounds
$results = generateTournamentResults($turnier_kurz, 250000, 0);
$rang1 = getChar($results[0][0]);
insertIntoHallOfFame($turnier_name, $rang1['id'], $rang1['besitzer']);
//$natur_frucht = mysqli_num_rows(db_query("SELECT id FROM wochen_markt WHERE art='natur'")); ///wieviel TF gibt es?.
////////////////FRUCHT ARRAY
//include "array.php";
distributeParamecia($rang1['besitzer']);
//Schutz vor automatischem löschen hinzufügen für den sieger :)
$usergroups = getUserGroups($rang1['besitzer']);
if(!isUserInGroup($usergroups, INAKTIV_LOESCHSCHUTZ) && !isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) {
addUserToGroup($rang1['besitzer'], INAKTIV_LOESCHSCHUTZ);
}
// Durchschnittslevel
$summe = 20000000/(1+exp(5-$dlevel/14));
// Now distribute the shop points ;)
$prices[] = 4000000; // 1.
$prices[] = 3000000; // 2.
$prices[] = 2000000; // 3. + 4.
$cprices[] = ceil($summe/2);
$cprices[] = ceil($summe/4);
$cprices[] = ceil($summe/8);
distributeUserPrices($prices, $results, $turnier_name);
#distributeShopPoints($prices, $results, $turnier_name);
// clan prices are not distributed anymore!!
//distributeClanPrices($cprices, $results, $turnier_name);
?>

@ -1,68 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once('char.inc.php');
/**
*
* @param unknown_type $title
* @param unknown_type $charid
* @param unknown_type $userid
* @return boolean if the insert was successful
*/
function insertIntoHallOfFame($title, $charid, $userid){
echo 'insertIntoHallOfFame('.$title.', '.$charid.', '.$userid.')<br>';
$row = mysqli_fetch_assoc(db_query('Select max(id) as round from online'));
$char = getChar($charid);
$user = mysqli_fetch_assoc(db_query('Select * from user where id = '.$userid));
if(!$row){
echo 'insertIntoHallOfFame failed as the basic methods failed!<br>';
return false;
}
return insertIntoHallOfFameFull($row['round'], $title, $charid, $char['name'], $userid, $user['nickname'], 'CURRENT_DATE');
}
function insertIntoHallOfFameFull($round = '', $title = '', $charid = '', $charname = '', $userid = '', $username = '', $date = ''){
echo 'insertIntoHallOfFame('.$title.', '.$charid.', '.$charname.', '.$username.', '.$userid.', '.$date.')<br>';
// These Entries may not be ''
if(!is_numeric($round) || $date == '' || $title == ''){
echo 'insertIntoHallOfFame failed as the extended methods failed!<br>';
return false;
}
$columns = 'art, runde, datum, charname, username';
$values = '\''.$title.'\','.$round.','.$date.',\''.$charname.'\',\''.$username.'\'';
if(is_numeric($charid)){
$columns .= ',charid';
$values .= ','.$charid;
}
if(is_numeric($userid)){
$columns .= ',userid';
$values .= ','.$userid;
}
$sql = 'INSERT INTO highscore('.$columns.') values('.$values.')';
// echo $sql.'<br>';
$qry = db_query($sql);
return db_affected_rows() > 0;
}
function getHallOfFame($title, $userid) {
$row = mysqli_fetch_assoc(db_query('Select max(id) as round from online'));
return getHallOfFameFull($row['round'],$title, $userid);
}
function getHallOfFameFull($round = '', $title = '', $userid = '') {
$sql = 'select count(*) from highscore where runde='.$round.' and userid='.$userid;
$row = mysqli_fetch_row($sql);
return $row[0];
}
?>

@ -1,44 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
include_once('path.inc.php'); // get the path ;)
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once ('inclu/halloffame.inc.php');
include_once ('inclu/turnier.inc.php');
include_once ('inclu/char.inc.php');
$name = 'klein';
// do the stuff for the whole exp and money distribution there ;)
$results = generateTournamentResults($name, 10000, 0);
$rang1 = getChar($results[0][0]);
// Hall of fame!
// insertIntoHallOfFame($title, $charid, $userid);
insertIntoHallOfFame('Anf&auml;ngerturnier', $rang1['id'], $rang1['besitzer']);
/* FIXME: Before we can do this we have to resolve the include chaos!!
if(getHallOfFameEntryCount('Anf&auml;ngerturnier', $rang1['id']) >= 2) {
// remove all chars that are registered
db_query('DELETE FROM turnier1 WHERE art = \'klein\' AND besitzer = '.$rang1['besitzer']);
}
*/
// Now distribute the shop points ;)
$prices[] = 25; // 1. (max win)
$prices[] = 20; // 2. (max win - 1)
$prices[] = 15; // 3. + 4. (max win -2)
distributeShopPoints($prices, $results, 'Anfängerturnier');
?>

@ -1,52 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
$row2 = db_query("SELECT c1.lernpunkte AS c1lern, c2.lernpunkte AS c2lern, u.round, u.win, u.hp1, u.hp2,c1.hp AS c1hp, c2.hp AS c2hp, c1.mp AS c1mp, c2.mp AS c2mp, u.mp1, u.mp2, c1.id AS c1id, c2.id AS c2id, c1.exp AS c1exp, c2.exp AS c2exp, i1.geld AS i1geld, i2.geld AS i2geld,
i1.id AS i1id, i2.id AS i2id FROM turnier_kampf u LEFT JOIN chars c1 ON(c1.id=u.char1) LEFT JOIN user i1 ON(i1.id=c1.besitzer) LEFT JOIN chars c2 ON(c2.id=u.char2) LEFT JOIN user i2 ON(i2.id=c2.besitzer) WHERE u.art='chu_pruef' ORDER BY u.round ASC");
$x=0;
while($row = mysqli_fetch_array($row2)) {
if($row[round] == 4) {
$new_geld1 = 200000;
$trainings_points1 = 20;
$new_lernpunkte1 = 4;
$new_geld2 += 200000;
$trainings_points2 = 20;
$new_lernpunkte2 = 4;
if($row[win] == $row[c1id]) {
$new_geld1 += 300000;
$trainings_points1 += 30;
$new_lernpunkte1 = 6;
}
if($row[win] == $row[c2id]) {
$new_lernpunkte2 = 6;
$trainings_points2 += 50;
$new_geld2 += 500000;
}
//////////////////pause
$weiter_1[0]= $row[c1id];
$weiter_1[1]= $row[c2id];
}
}
db_query("UPDATE chars SET n_missionpunkte=n_missionpunkte+45000, training_points=training_points+'$trainings_points1', lernpunkte='$new_lernpunkte1' WHERE id='$weiter_1[0]' LIMIT 1");
db_query("UPDATE chars SET n_missionpunkte=n_missionpunkte+45000, training_points=training_points+'$trainings_points2', lernpunkte='$new_lernpunkte2' WHERE id='$weiter_1[1]' LIMIT 1");
/*
db_query("UPDATE user SET geld='$new_geld1' WHERE id='$row[i1id]' LIMIT 1");
db_query("UPDATE user SET geld='$new_geld2' WHERE id='$row[i2id]' LIMIT 1");
*/
?>

@ -1,111 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
set_time_limit(0);
$art_1 ="chu_pruef";
function rand_array($array)
{
$maxarray=count($array)-1;
mt_srand((double)microtime()*1000000);
for($i=$maxarray; $i>=0; $i--)
{
if($i>0) $zufall=mt_random_wrapper(0,$i);
else $zufall=0;
$temp=$array[$i];
$array[$i]=$array[$zufall];
$array[$zufall]=$temp;
$newarray[]=$array[$i];
array_pop($array);
}
return $newarray;
}
include "db.php";
$max_charakter = mysqli_num_rows(db_query("SELECT id FROM n_turnier_reg LIMIT 16"));
if($max_charakter<16) {
echo "Turnier kann nicht beginn.";
exit;
}
db_query("DELETE FROM turnier_kampf WHERE art='$art_1'");
$char1 = db_query("SELECT charakter FROM n_turnier_reg ORDER BY id ASC LIMIT 16");
while($row=mysqli_fetch_array($char1))
{
$test2[]=$row['charakter'];
}
$test2 = rand_array($test2);
$test3=$test2;
reset($test3);
while(current($test3)!=end($test2))
{
if(empty($list)) $list=current($test3);
else $list.=','.next($test3);
}
$result=db_query("SELECT * FROM chars WHERE id IN(".$list.") LIMIT 16");
while($row=mysqli_fetch_array($result))
{
$charas[$row['id']]=$row;
}
$a8=0;
$b8=1;
$round = 1;
while($a8 < 16)
{
$chara_1 = $charas[$test2[$a8]];
$chara_2 = $charas[$test2[$b8]];
include "turnier_kampf.php";
$a8+=2;
$b8+=2;
}
while($round < 4)
{
unset($test9);
$chars_win = db_query("SELECT win FROM turnier_kampf WHERE round='$round' AND art='$art_1'");
while($row9 = mysqli_fetch_array($chars_win))
{
$test9[]=$row9['win'];
}
$round++;
$k9=0;
$l9=1;
while($k9 < count($test9))
{
$chara_1 = $charas[$test9[$k9]];
$chara_2 = $charas[$test9[$l9]];
include "turnier_kampf.php";
$k9+=2;
$l9+=2;
}
}
db_query("DELETE FROM n_turnier_reg ORDER BY id ASC LIMIT 16");
?>

@ -1,42 +0,0 @@
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include "db.php";
include_once('path.inc.php'); // get the path ;)
include_once (ROOT_PATH.'/include/sqlwrapper.inc.php');
include_once ('inclu/halloffame.inc.php');
include_once ('inclu/fruitdistribution.inc.php');
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");
$turnier_kurz = 'wochenst';
$turnier_name = 'Wochenturnier Non-Fusion';
// do the stuff for the whole exp and money distribution there ;)
$results = generateTournamentResults($turnier_kurz, 15000, 0);
$rang1 = getChar($results[0][0]);
insertIntoHallOfFame($turnier_name , $rang1['id'], $rang1['besitzer']);
$xiu=5;
if($xiu >= mt_random_wrapper(1, 100)) {
////////////////FRUCHT ARRAY
//include "array.php";
distributeParamecia($rang1['besitzer']);
}
$prices[] = 50; // 1.
$prices[] = 40; // 2.
$prices[] = 30; // 3. + 4.
$prices[] = 20; // 5. - 8.
distributeShopPoints($prices, $results, $turnier_name);
Loading…
Cancel
Save