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.
162 lines
6.1 KiB
162 lines
6.1 KiB
<?php
|
|
/*
|
|
*
|
|
* @copyright (c) 2010 animegame.eu
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
*
|
|
*/
|
|
include "db.php";
|
|
|
|
$mak_time = time();
|
|
$z_time = time() - 86400;
|
|
$chars_k = mysql_query("SELECT charakter FROM kampf_list WHERE zeit < '$mak_time' and rasse != 'NPC'");
|
|
while ($row4 = mysql_Fetch_array($chars_k)) {
|
|
mysql_query("UPDATE chars SET status='Frei' WHERE id='$row4[charakter]'");
|
|
}
|
|
|
|
mysql_query("DELETE FROM kampf_list WHERE zeit < '$mak_time' and rasse != 'NPC'");
|
|
//mysql_query("DELETE FROM user WHERE aktiv = 'nein' AND code_zeit < '$z_time'");
|
|
mysql_query("DELETE FROM top_kampf");
|
|
|
|
$platz1 = mysql_query("SELECT id, besitzer FROM chars WHERE level<'150' order by preis DESC LIMIT 3");
|
|
$x = 0;
|
|
$mac_geld = 3000;
|
|
while ($row = mysql_fetch_array($platz1)) {
|
|
$user = mysql_fetch_array(mysql_query("SELECT geld FROM user WHERE id='$row[besitzer]' LIMIT 3"));
|
|
$new_geld = $user[geld] + $mac_geld;
|
|
mysql_query("UPDATE user SET geld='$new_geld' WHERE id='$row[besitzer]'");
|
|
$mac_geld = $mac_geld -1000;
|
|
$x++;
|
|
}
|
|
|
|
$row = "";
|
|
$platz1 = mysql_query("SELECT id, anzahl, preis FROM item");
|
|
$x = 0;
|
|
while ($row = mysql_fetch_array($platz1)) {
|
|
if ($row[preis] >= 200000) {
|
|
$anzahl = 1;
|
|
}
|
|
if ($row[preis] < 200000) {
|
|
$anzahl = 5;
|
|
}
|
|
if ($row[preis] < 100000) {
|
|
$anzahl = 10;
|
|
}
|
|
if ($row[preis] < 50000) {
|
|
$anzahl = 20;
|
|
}
|
|
if ($row[preis] < 30000) {
|
|
$anzahl = 50;
|
|
}
|
|
if ($row[preis] < 20000) {
|
|
$anzahl = 60;
|
|
}
|
|
if ($row[preis] < 15000) {
|
|
$anzahl = 75;
|
|
}
|
|
if ($row[preis] < 10000) {
|
|
$anzahl = 100;
|
|
}
|
|
if ($row[preis] < 7000) {
|
|
$anzahl = 150;
|
|
}
|
|
if ($row[preis] < 5000) {
|
|
$anzahl = 200;
|
|
}
|
|
if ($row[preis] < 2000) {
|
|
$anzahl = 500;
|
|
}
|
|
if ($row[preis] < 1000) {
|
|
$anzahl = 1000;
|
|
}
|
|
if ($row[preis] < 500) {
|
|
$anzahl = 1500;
|
|
}
|
|
if ($row[preis] < 80) {
|
|
$anzahl = 5000;
|
|
}
|
|
mysql_query("UPDATE item SET anzahl='$anzahl' WHERE id='$row[id]'");
|
|
|
|
$x++;
|
|
}
|
|
|
|
$row = "";
|
|
|
|
mysql_query("DELETE FROM liga_kampf");
|
|
mysql_query("DELETE FROM wanted_kampf");
|
|
mysql_query("UPDATE chars SET status='Frei' WHERE status='Tod'");
|
|
mysql_query("UPDATE user SET pw_fight='4'");
|
|
|
|
//////////////////////////////////NPCS!!!!
|
|
|
|
$wahl = "starke+verteidigung+speed+ausdauer+glueck";
|
|
$row = mysql_fetch_array(mysql_query("SELECT name, level, starke, speed, verteidigung, ausdauer, glueck, hp, mp FROM chars WHERE level<'150' AND rasse!='NPC' ORDER BY ($wahl) DESC LIMIT 1"));
|
|
|
|
$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_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);
|
|
|
|
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");
|
|
|
|
//////////////////////////////////NPCS!!!!
|
|
|
|
$row = mysql_fetch_array(mysql_query("SELECT name, level, starke, speed, verteidigung, ausdauer, glueck, hp, mp FROM chars WHERE level<'150' AND rasse!='NPC' ORDER BY starke DESC LIMIT 1"));
|
|
|
|
$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_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);
|
|
|
|
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");
|
|
|
|
//////////////////NPC
|
|
$wahl = "starke+verteidigung+speed+ausdauer+glueck";
|
|
$row = mysql_fetch_array(mysql_query("SELECT hp, mp, name, level, starke, speed, verteidigung, ausdauer, glueck FROM chars WHERE level<'150' AND rasse!='NPC' ORDER BY level DESC LIMIT 1"));
|
|
|
|
$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_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);
|
|
|
|
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");
|
|
|
|
//////////////////NPC
|
|
$row = mysql_fetch_array(mysql_query("SELECT hp, mp, name, level, starke, speed, verteidigung, ausdauer, glueck FROM chars WHERE level<'150' AND rasse!='NPC' ORDER BY speed DESC LIMIT 1"));
|
|
|
|
$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_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);
|
|
|
|
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");
|
|
?>
|