You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.8 KiB
52 lines
1.8 KiB
<?php
|
|
/*
|
|
*
|
|
* @copyright (c) 2010 animegame.eu
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
*
|
|
*/
|
|
include "db.php";
|
|
|
|
$row2 = mysql_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 = mysql_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];
|
|
}
|
|
|
|
}
|
|
|
|
|
|
mysql_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");
|
|
mysql_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");
|
|
/*
|
|
mysql_query("UPDATE user SET geld='$new_geld1' WHERE id='$row[i1id]' LIMIT 1");
|
|
mysql_query("UPDATE user SET geld='$new_geld2' WHERE id='$row[i2id]' LIMIT 1");
|
|
*/
|
|
?>
|