diff --git a/cronjob/clan_.php b/cronjob/clan_.php deleted file mode 100644 index 96527ba..0000000 --- a/cronjob/clan_.php +++ /dev/null @@ -1,93 +0,0 @@ -=0; $i--) - { - if($i>0) $zufall=mt_rand(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"; -mysql_query("UPDATE online SET clan_tick=clan_tick+1 WHERE id='1' LIMIT 1"); -$tick_zahl = mysql_fetch_array(mysql_query("SELECT clan_tick FROM online WHERE id='1' LIMIT 1")); - -mysql_query("DELETE FROM clan_kampf"); -$kampf_offen = mysql_query("SELECT an, besitzer, charakter1, charakter2, charakter3, charakter4, charakter5, charakter6, -gcharakter1, gcharakter2, gcharakter3, gcharakter4, gcharakter5, gcharakter6 FROM clan_k_list WHERE aktiv='1' AND tick='$tick_zahl[clan_tick]' "); - -$char1_list = "0"; -$char2_list = "0"; -$iw=1; -while($aktive_clans = mysql_fetch_array($kampf_offen)) { -$clan1[] = $aktive_clans[besitzer]; -$clan1[] = $aktive_clans[besitzer]; -$clan1[] = $aktive_clans[besitzer]; -$clan2[] = $aktive_clans[an]; -$clan2[] = $aktive_clans[an]; -$clan2[] = $aktive_clans[an]; - -$char1_array[0] = $aktive_clans[charakter1]; -$char1_array[1] = $aktive_clans[charakter2]; -$char1_array[2] = $aktive_clans[charakter3]; -$char1_array[3] = $aktive_clans[charakter4]; -$char1_array[4] = $aktive_clans[charakter5]; -$char1_array[5] = $aktive_clans[charakter6]; - -$char2_array[0] = $aktive_clans[gcharakter1]; -$char2_array[1] = $aktive_clans[gcharakter2]; -$char2_array[2] = $aktive_clans[gcharakter3]; -$char2_array[3] = $aktive_clans[gcharakter4]; -$char2_array[4] = $aktive_clans[gcharakter5]; -$char2_array[5] = $aktive_clans[gcharakter6]; - - $char1_array = rand_array($char1_array); - $char1_array = array_unique($char1_array); - - $char2_array = rand_array($char2_array); - $char2_array = array_unique($char2_array); - - -$char1_list .= ",".$char1_array[0].""; -$char1_list .= ",".$char1_array[1].""; -$char1_list .= ",".$char1_array[2].""; - -$char2_list .= ",".$char2_array[0].""; -$char2_list .= ",".$char2_array[1].""; -$char2_list .= ",".$char2_array[2].""; - -} - -$char1_list_exploder = explode(",", $char1_list); -$char2_list_exploder = explode(",", $char2_list); - - -$yt=1; -while($iw < count($char1_list_exploder)) { -$chara_1 = mysql_fetch_array(mysql_query("SELECT * FROM chars WHERE id='$char1_list_exploder[$iw]'")); -$chara_2 = mysql_fetch_array(mysql_query("SELECT * FROM chars WHERE id='$char2_list_exploder[$iw]'")); - - $round = 1; - include "clan_kampf.php"; - -$yt++; -$iw++; -} - -mysql_query("DELETE FROM clan_k_list WHERE tick='$tick_zahl[clan_tick]'"); -?> \ No newline at end of file diff --git a/cronjob/clan_exp.php b/cronjob/clan_exp.php deleted file mode 100644 index 8ba04e5..0000000 --- a/cronjob/clan_exp.php +++ /dev/null @@ -1,27 +0,0 @@ -= $exp_rows1[max_exp] AND $exp_rows1[level] != 5) { -mysql_query("UPDATE clan SET level=level+1, max_exp='$new_max_exp1', member=member+2 WHERE id='$clan1[$iws]'"); -} - -if($EXP_new2+$exp_rows2[min_exp] >= $exp_rows2[max_exp] AND $exp_rows2[level] != 5) { -mysql_query("UPDATE clan SET level=level+1, max_exp='$new_max_exp2', member=member+2 WHERE id='$clan2[$iws]'"); -} - -?> \ No newline at end of file diff --git a/cronjob/clan_kampf.php b/cronjob/clan_kampf.php deleted file mode 100644 index 54f3d35..0000000 --- a/cronjob/clan_kampf.php +++ /dev/null @@ -1,214 +0,0 @@ - $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { - -$technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); -$prozent_technik1 = (20*$technick1[aktiv])-20; -$technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[at_id]' LIMIT 10")); - -$technick2 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke2[$x]' LIMIT 10")); -$prozent_technik2 = (20*$technick2[aktiv])-20; -$technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[at_id]' LIMIT 10")); - - -///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte -include "kampf/andere_technik.php"; /////////////////// Wenn man ne andere technik sich aussuchen will... - - -$technick1[speed]=$technick1[speed]+(($technick1[speed]/100)*$prozent_technik1); -$technick2[speed]=$technick2[speed]+(($technick2[speed]/100)*$prozent_technik2); - -$technick1[verteidigung]=$technick1[verteidigung]+(($technick1[verteidigung]/100)*$prozent_technik1); -$technick2[verteidigung]=$technick2[verteidigung]+(($technick2[verteidigung]/100)*$prozent_technik2); - -$technick1[starke]=$technick1[starke]+(($technick1[starke]/100)*$prozent_technik1); -$technick2[starke]=$technick2[starke]+(($technick2[starke]/100)*$prozent_technik2); - - - -$speeds_char1 = ($k_speed[0] + $technick1[speed]); -$speeds_char2 = ($k_speed[1] + $technick2[speed]); - -$speeds_char1_4 = ($k_speed[0] + $technick1[speed]) / 1.5; -$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); - - - -include "kampf_include.php"; - - -#####################################KAMPF SYSTEM -include "kampf/kampf_rechnung.php"; - - - -$db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_kampf WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1")); - -mysql_query("UPDATE clan_kampf SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]' WHERE id='$db_query[id]'"); - - -$x++; -} -###########################EXP VERTEILUNG - -if($k_hp[0] <= 0 AND $k_hp[1] <= 0) { - - if($k_hp[0] > $k_hp[1]) { - $k_hp[0] = $k_hp1[1]; - } else { - $k_hp[1] = $k_hp2[1]; - } -} -$s=0; -while($s < 2) { - -if($s == 1) { - -if($k_hp[0] > $k_hp[1]) { $X13 = HALLO; } else { $X23 = HALLO; } -} - -if($k_hp[1] < $k_aufgabe[1] OR $X13 == "HALLO") { -$clan1_win = 1; -$clan2_win = 0; -$k_exp[1] = 0; -$k_geld[1] = 2000; -$k_exp[0] = 0; -$k_geld[0] = 5000; - -$sieger = $chara_1[id]; -$verlierer = $chara_2[id]; - -} - -if($k_hp[0] < $k_aufgabe[0] OR $X23 == "HALLO") { - -$sieger = $chara_2[id]; -$verlierer = $chara_1[id]; - -$clan1_win= 0; -$clan2_win = 1; -$k_exp[1] = 0; -$k_geld[1] = 5000; -$k_exp[0] = 0; -$k_geld[0] = 2000; - - -} - -if($k_exp[0]) { $s=2; } else { $s++; } - -} -$iws = $iw-1; -mysql_query("UPDATE clan_kampf SET clan1_id='$clan1[$iws]', clan2_id='$clan2[$iws]', exp1='$k_exp[0]', win='$sieger', lose='$verlierer', exp2='$k_exp[1]', geld1='$k_geld[0]', geld2='$k_geld[1]', clan1_win='$clan1_win', clan2_win='$clan2_win' WHERE id='$db_query[id]'"); - - -if($yt == 3) { -$yt=0; -$win_rows1 = mysql_num_rows(mysql_query("SELECT id FROM clan_kampf WHERE clan1_win='1' AND clan1_id='$clan1[$iws]' LIMIT 2")); -$win_rows2 = mysql_num_rows(mysql_query("SELECT id FROM clan_kampf WHERE clan2_win='1' AND clan2_id='$clan2[$iws]' LIMIT 2")); - -if($win_rows1 > $win_rows2) { - -////CLAN 1 WINS -$exp_rows1 = mysql_fetch_array(mysql_query("SELECT siege, level, min_exp, max_exp FROM clan WHERE id='$clan1[$iws]' LIMIT 1")); -$exp_rows2 = mysql_fetch_array(mysql_query("SELECT siege, level, min_exp, max_exp FROM clan WHERE id='$clan2[$iws]' LIMIT 1")); - -$EXP_new1 = ($exp_rows2[siege]+10) * 30; -$EXP_new2 = ($exp_rows1[siege]+10) * 15; - -include "clan_exp.php"; - -mysql_query("UPDATE clan SET geld=geld+'5000', siege=siege+1, min_exp=min_exp+'$EXP_new1' WHERE id='$clan1[$iws]'"); -mysql_query("UPDATE clan SET geld=geld+'2000', niederlagen=niederlagen+1, min_exp=min_exp+'$EXP_new2' WHERE id='$clan2[$iws]'"); -} else { - -$exp_rows1 = mysql_fetch_array(mysql_query("SELECT siege, level, min_exp, max_exp FROM clan WHERE id='$clan1[$iws]' LIMIT 1")); -$exp_rows2 = mysql_fetch_array(mysql_query("SELECT siege, level, min_exp, max_exp FROM clan WHERE id='$clan2[$iws]' LIMIT 1")); - -$EXP_new2 = ($exp_rows1[siege]+10) * 30; -$EXP_new1 = ($exp_rows2[siege]+10) * 15; - - -include "clan_exp.php"; - -////CLAN 2 WINS - -mysql_query("UPDATE clan SET geld=geld+'2000', niederlagen=niederlagen+1, min_exp=min_exp+'$EXP_new1' WHERE id='$clan1[$iws]'"); -mysql_query("UPDATE clan SET geld=geld+'5000', siege=siege+1, min_exp=min_exp+'$EXP_new2' WHERE id='$clan2[$iws]'"); -} - -} - -?> \ No newline at end of file diff --git a/cronjob/clanfights.inc.php b/cronjob/clanfights.inc.php deleted file mode 100644 index 2fa5071..0000000 --- a/cronjob/clanfights.inc.php +++ /dev/null @@ -1,225 +0,0 @@ - now()'; - $row = mysql_fetch_assoc(mysql_query($sql)); - if ($row['anzahl'] > 0) { - $GLOBALS['char_status'][$charid] = 'Turnier'; - return 'Turnier'; - } - $sql = 'SELECT count(*) as anzahl from quests where charid = ' . $charid; - $row = mysql_fetch_assoc(mysql_query($sql)); - if ($row['anzahl'] > 0) { - $GLOBALS['char_status'][$charid] = 'Schatz Suche'; - return 'Schatz Suche'; - } - $sql = 'SELECT count(*) as anzahl from kampf where db_satz = ' . $charid; - $row = mysql_fetch_assoc(mysql_query($sql)); - if ($row['anzahl'] > 0) { - $GLOBALS['char_status'][$charid] = 'Kampf'; - return 'Kampf'; - } - - $sql = 'SELECT count(*) as anzahl FROM kampf_list where charakter = ' . $charid; - $row = mysql_fetch_assoc(mysql_query($sql)); - if ($row['anzahl'] > 0) { - $GLOBALS['char_status'][$charid] = 'Kampf erstellt'; - return 'Kampf erstellt'; - } - $sql = 'SELECT count(*) as anzahl FROM turnier1 where charakter = ' . $charid; - $row = mysql_fetch_assoc(mysql_query($sql)); - if ($row['anzahl'] > 0) { - $GLOBALS['char_status'][$charid] = 'Angemeldet'; - return 'Angemeldet'; - } - $GLOBALS['char_status'][$charid] = 'Frei'; - return 'Frei'; -} - -function getPicture($char){ - // Sichergehen, dass Char geladen wurde - if($char['bild'] == null || $char['bild'] == ''){ - return 'design/bilder/avatare/noavart.gif'; - } - return $char['bild']; -} - -function getChar2($charid) { - // Fehlerkontrolle - if(!is_numeric($charid)){ - return null; - } else { - $char = mysql_fetch_assoc(mysql_query('Select * from chars where id = '.$charid)); - if(!$char){return null;} -// Speichere in $char['stauts'] den aktuellen Status des Chars (buffer-Strategie ist hierbei die selbe) - $char['status'] = getStatus($char['id'],$buffer_enabled); - $char['bild'] = getPicture($char); - } - return $char; -} - -function starteClanFight($chara_1, $chara_2, $clanfight_id, $runde, $kampf){ - global $sieger, $verlierer; - include 'kampf_clan.php'; -} - -function starteClanFight_survival($chara_1, $fighter_a, $chara_2, $fighter_b, $clanfight_id, $runde, $kampf){ - global $sieger, $verlierer, $fighter_team_a_array, $fighter_team_b_array; - include 'kampf_clan1.php'; -} - -function clanFightExecute($id) { - $pkt_a_satz= 0; - $pkt_b_satz= 0; - $pkt_runde_a= 0; - $pkt_runde_b= 0; - $rundenzaehler= 1; - $kampfzaehler= 1; - - $clanfight_daten= mysql_fetch_assoc(mysql_query('SELECT fighter, gfighter, numberoffighter FROM clan_fight_list WHERE id='.$id.' LIMIT 1')); - $fighter_a_array= explode(",",$clanfight_daten['fighter']); - $fighter_b_array= explode(",",$clanfight_daten['gfighter']); - - for ($x=1;;$x++) { - /*if ($rundenzaehler == 7) { - break; - }*/ - - $fighter_a= mt_rand(0, count($fighter_a_array)-1); - $fighter_b= mt_rand(0, count($fighter_b_array)-1); - - $char_a= getChar2($fighter_a_array[$fighter_a]); - $char_b= getChar2($fighter_b_array[$fighter_b]); - - starteClanFight($char_a, $char_b, $id, $rundenzaehler, $kampfzaehler); - - $kampfzaehler++; - - if ($fighter_a_array[$fighter_a] == $sieger) { - $pkt_a_satz++; - } else { - $pkt_b_satz++; - } - - unset($fighter_a_array[$fighter_a]); - unset($fighter_b_array[$fighter_b]); - sort($fighter_a_array); - sort($fighter_b_array); - - #if ($pkt_a_satz == 3 OR $pkt_b_satz == 3) { - if ($pkt_a_satz + $pkt_b_satz == $clanfight_daten['numberoffighter']) { - if ($pkt_a_satz > $pkt_b_satz) { - $pkt_runde_a++; - } elseif ($pkt_a_satz < $pkt_b_satz) { - $pkt_runde_b++; - } - - $fighter_a_array= explode(",",$clanfight_daten['fighter']); - $fighter_b_array= explode(",",$clanfight_daten['gfighter']); - - $rundenzaehler++; - $kampfzaehler= 1; - $pkt_a_satz= 0; - $pkt_b_satz= 0; - if ($pkt_runde_a + $pkt_runde_b == 6) { - break; - } - } - } -} - -function selectFighterOfTeams($fighter_team_a_array,$fighter_team_b_array,$sieger='') { - global $fighter_a, $fighter_b, $sieger; - if (empty($sieger)) { - $fighter_a= mt_rand(0, count($fighter_team_a_array)-1); - $fighter_b= mt_rand(0, count($fighter_team_b_array)-1); - } else { - for ($y=0;$y diff --git a/cronjob/kampf_clan.php b/cronjob/kampf_clan.php deleted file mode 100644 index 31450ce..0000000 --- a/cronjob/kampf_clan.php +++ /dev/null @@ -1,183 +0,0 @@ -Bug 1'; - exit; -} -################## Kaempfer 1 -$char1_quis_item = explode(",", $chara_1[kampf_item]); -$char1_item_helm = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[0]' LIMIT 1")); -$char1_item_rustung = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[1]' LIMIT 1")); -$char1_item_schild = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[2]' LIMIT 1")); -$char1_item_schwert = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[3]' LIMIT 1")); -$char1_item_schuhe = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[4]' LIMIT 1")); - -$k_hp1 = explode(",", $chara_1[hp]); -$k_mp1 = explode(",", $chara_1[mp]); - -$k_starke[0] = $chara_1[starke] + $char1_item_helm[starke] + $char1_item_rustung[starke] + $char1_item_schild[starke] + $char1_item_schwert[starke] + $char1_item_schuhe[starke]; -$k_speed[0] = $chara_1[speed] + $char1_item_helm[speed] + $char1_item_rustung[speed] + $char1_item_schild[speed] + $char1_item_schwert[speed] + $char1_item_schuhe[speed]; -$k_ver[0] = $chara_1[verteidigung] + $char1_item_helm[verteidigung] + $char1_item_rustung[verteidigung] + $char1_item_schild[verteidigung] + $char1_item_schwert[verteidigung] + $char1_item_schuhe[verteidigung]; -$k_hp1[0] += $char1_item_helm[hp] + $char1_item_rustung[hp] + $char1_item_schild[hp] + $char1_item_schwert[hp] + $char1_item_schuhe[hp]; -$k_hp1[1] += $char1_item_helm[hp] + $char1_item_rustung[hp] + $char1_item_schild[hp] + $char1_item_schwert[hp] + $char1_item_schuhe[hp]; -$k_mp1[0] += $char1_item_helm[mp] + $char1_item_rustung[mp] + $char1_item_schild[mp] + $char1_item_schwert[mp] + $char1_item_schuhe[mp]; -$k_mp1[1] += $char1_item_helm[mp] + $char1_item_rustung[mp] + $char1_item_schild[mp] + $char1_item_schwert[mp] + $char1_item_schuhe[mp]; - -$k_ausdauer[0] = $chara_1[ausdauer]; -$k_glueck[0] = $chara_1[glueck]; - -$k_attacke1 = explode(",", $chara_1[attacken]); -$k_select1_1 = explode(",", $chara_1[auswahl1]); -$k_select1_2 = explode(",", $chara_1[auswahl2]); -$k_select1_3 = explode(",", $chara_1[auswahl3]); -$k_attacke1_2 = explode(",", $chara_1[attacken2]); - -$k_hp[0] = round($k_hp1[0]); -$k_mp[0] = round($k_mp1[0]); - -$k_aufgabe_a_1 = $k_hp1[1] / 100; -$k_aufgabe[0] = $k_aufgabe_a_1 * $chara_1[aufgeben]; - -################## Kaempfer 2 -$char2_quis_item = explode(",", $chara_2[kampf_item]); -$char2_item_helm = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[0]' LIMIT 1")); -$char2_item_rustung = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[1]' LIMIT 1")); -$char2_item_schild = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[2]' LIMIT 1")); -$char2_item_schwert = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[3]' LIMIT 1")); -$char2_item_schuhe = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[4]' LIMIT 1")); - -$k_hp2 = explode(",", $chara_2[hp]); -$k_mp2 = explode(",", $chara_2[mp]); - -$k_starke[1] = $chara_2[starke] + $char2_item_helm[starke] + $char2_item_rustung[starke] + $char2_item_schild[starke] + $char2_item_schwert[starke] + $char2_item_schuhe[starke]; -$k_speed[1] = $chara_2[speed] + $char2_item_helm[speed] + $char2_item_rustung[speed] + $char2_item_schild[speed] + $char2_item_schwert[speed] + $char2_item_schuhe[speed]; -$k_ver[1] = $chara_2[verteidigung] + $char2_item_helm[verteidigung] + $char2_item_rustung[verteidigung] + $char2_item_schild[verteidigung] + $char2_item_schwert[verteidigung] + $char2_item_schuhe[verteidigung]; -$k_hp2[0] += $char2_item_helm[hp] + $char2_item_rustung[hp] + $char2_item_schild[hp] + $char2_item_schwert[hp] + $char2_item_schuhe[hp]; -$k_hp2[1] += $char2_item_helm[hp] + $char2_item_rustung[hp] + $char2_item_schild[hp] + $char2_item_schwert[hp] + $char2_item_schuhe[hp]; -$k_mp2[0] += $char2_item_helm[mp] + $char2_item_rustung[mp] + $char2_item_schild[mp] + $char2_item_schwert[mp] + $char2_item_schuhe[mp]; -$k_mp2[1] += $char2_item_helm[mp] + $char2_item_rustung[mp] + $char2_item_schild[mp] + $char2_item_schwert[mp] + $char2_item_schuhe[mp]; - -$k_ausdauer[1] = $chara_2[ausdauer]; -$k_glueck[1] = $chara_2[glueck]; - -$k_attacke2 = explode(",", $chara_2[attacken]); -$k_select2_1 = explode(",", $chara_2[auswahl1]); -$k_select2_2 = explode(",", $chara_2[auswahl2]); -$k_select2_3 = explode(",", $chara_2[auswahl3]); -$k_attacke2_2 = explode(",", $chara_2[attacken2]); - -$k_hp[1] = round($k_hp2[0]); -$k_mp[1] = round($k_mp2[0]); - -$k_aufgabe_a_2 = $k_hp2[1] / 100; -$k_aufgabe[1] = $k_aufgabe_a_2 * $chara_2[aufgeben]; - -$runden_type1 = 0; -$runden_type2 = 0; -$x = 0; - -$runden_summon1 = ""; -$runden_summon2 = ""; -$runden_gif1 = 0; -$runden_gif_technik1 = ""; -$runden_gif2 = 0; -$runden_gif_technik2 = ""; - -if ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { - $sql = "INSERT clan_fights SET hp1='$k_hp[0]', hp2='$k_hp[1]', mp1='$k_mp[0]', mp2='$k_mp[1]', schaden1='$schaden_1', schaden2='$schaden_2', attacke1='$technick1[name]', attacke2='$technick2[name]', char1='$chara_1[id]', char2='$chara_2[id]', starke1='$k_starke[0]', starke2='$k_starke[1]', ver1='$k_ver[0]', ver2='$k_ver[1]', speed1='$k_speed[0]', speed2='$k_speed[1]', ausdauer1='$k_ausdauer[0]', ausdauer2='$k_ausdauer[1]', clanfight_id='$clanfight_id', runde='$runde', kampf='$kampf'"; - mysql_query($sql); -// echo $sql . '
'; - if (mysql_affected_rows() == 0) { - echo '"' . $sql . '" konnte nicht ausgefürt werden!
'; - } -} else { - echo "Unbekannter B.U.G"; - echo '
Bug 2'; - #displayErrorMessage(NULL, 'Unbekannter B.U.G!', displayHistoryBackLink()); - exit; -} - -while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { - - $technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); - $prozent_technik1 = (20 * $technick1[aktiv]) - 20; - $technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[at_id]' LIMIT 10")); - - $technick2 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke2[$x]' LIMIT 10")); - $prozent_technik2 = (20 * $technick2[aktiv]) - 20; - $technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[at_id]' LIMIT 10")); - - ///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte - include "kampf/andere_technik.php"; /////////////////// Wenn man ne andere technik sich aussuchen will... - - $technick1[speed] = $technick1[speed] + (($technick1[speed] / 100) * $prozent_technik1); - $technick2[speed] = $technick2[speed] + (($technick2[speed] / 100) * $prozent_technik2); - - $technick1[verteidigung] = $technick1[verteidigung] + (($technick1[verteidigung] / 100) * $prozent_technik1); - $technick2[verteidigung] = $technick2[verteidigung] + (($technick2[verteidigung] / 100) * $prozent_technik2); - - $technick1[starke] = $technick1[starke] + (($technick1[starke] / 100) * $prozent_technik1); - $technick2[starke] = $technick2[starke] + (($technick2[starke] / 100) * $prozent_technik2); - - $speed_char1 = ($k_speed[0] + $technick1[speed]); - $speed_char2 = ($k_speed[1] + $technick2[speed]); - - // Speedbug - // $speeds_char1_4 = ($k_speed[0] + $technick1[speed]) / 1.5; - // $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); - - ///////rechnung selber - include "kampf_include.php"; - - #####################################KAMPF SYSTEM - include "kampf/kampf_rechnung.php"; - - #$db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1")); - $db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') order by id DESC LIMIT 1")); - - mysql_query("UPDATE clan_fights SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]' WHERE id='$db_query[id]'"); - - $x++; -} - -if ($k_hp[0] <= 0 AND $k_hp[1] <= 0) { - if ($k_hp[0] > $k_hp[1]) { - $k_hp[0] = $k_hp1[1]; - } else { - $k_hp[1] = $k_hp2[1]; - } -} - -if ($k_hp[1] < $k_aufgabe[1] OR $k_hp[1] < $k_hp[0]) { - $sieger = $chara_1['id']; - $verlierer = $chara_2['id']; -} - -if ($k_hp[0] < $k_aufgabe[0] OR $k_hp[0] < $k_hp[1]) { - $sieger = $chara_2['id']; - $verlierer = $chara_1['id']; -} - -mysql_query("UPDATE clan_fights SET win='$sieger', lose='$verlierer' WHERE id='$db_query[id]'"); - -?> \ No newline at end of file diff --git a/cronjob/kampf_clan1.php b/cronjob/kampf_clan1.php deleted file mode 100644 index d3a33e7..0000000 --- a/cronjob/kampf_clan1.php +++ /dev/null @@ -1,199 +0,0 @@ - $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { - $sql = "INSERT clan_fights SET hp1='$k_hp[0]', hp2='$k_hp[1]', mp1='$k_mp[0]', mp2='$k_mp[1]', schaden1='$schaden_1', schaden2='$schaden_2', attacke1='$technick1[name]', attacke2='$technick2[name]', char1='$chara_1[id]', char2='$chara_2[id]', starke1='$k_starke[0]', starke2='$k_starke[1]', ver1='$k_ver[0]', ver2='$k_ver[1]', speed1='$k_speed[0]', speed2='$k_speed[1]', ausdauer1='$k_ausdauer[0]', ausdauer2='$k_ausdauer[1]', clanfight_id='$clanfight_id', runde='$runde', kampf='$kampf'"; - mysql_query($sql); -// echo $sql . '
'; - if (mysql_affected_rows() == 0) { - echo '"' . $sql . '" konnte nicht ausgefürt werden!
'; - } -} else { - displayErrorMessage(NULL, 'Unbekannter B.U.G!', displayHistoryBackLink()); - exit; -} - -while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { - - $technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); - $prozent_technik1 = (20 * $technick1[aktiv]) - 20; - $technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[at_id]' LIMIT 10")); - - $technick2 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke2[$x]' LIMIT 10")); - $prozent_technik2 = (20 * $technick2[aktiv]) - 20; - $technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[at_id]' LIMIT 10")); - - ///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte - include "kampf/andere_technik.php"; /////////////////// Wenn man ne andere technik sich aussuchen will... - #include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/andere_technik.php'); /////////////////// Wenn man ne andere technik sich aussuchen will... - - $technick1[speed] = $technick1[speed] + (($technick1[speed] / 100) * $prozent_technik1); - $technick2[speed] = $technick2[speed] + (($technick2[speed] / 100) * $prozent_technik2); - - $technick1[verteidigung] = $technick1[verteidigung] + (($technick1[verteidigung] / 100) * $prozent_technik1); - $technick2[verteidigung] = $technick2[verteidigung] + (($technick2[verteidigung] / 100) * $prozent_technik2); - - $technick1[starke] = $technick1[starke] + (($technick1[starke] / 100) * $prozent_technik1); - $technick2[starke] = $technick2[starke] + (($technick2[starke] / 100) * $prozent_technik2); - - $speed_char1 = ($k_speed[0] + $technick1[speed]); - $speed_char2 = ($k_speed[1] + $technick2[speed]); - - // Speedbug - // $speeds_char1_4 = ($k_speed[0] + $technick1[speed]) / 1.5; - // $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); - - ///////rechnung selber - include "kampf_include.php"; - - #####################################KAMPF SYSTEM - include "kampf/kampf_rechnung.php"; - - #$db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1")); - $db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') order by id DESC LIMIT 1")); - - mysql_query("UPDATE clan_fights SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]' WHERE id='$db_query[id]'"); - - $x++; -} - -if ($k_hp[0] <= 0 AND $k_hp[1] <= 0) { - if ($k_hp[0] > $k_hp[1]) { - $k_hp[0] = $k_hp1[1]; - } else { - $k_hp[1] = $k_hp2[1]; - } -} - -if ($k_hp[1] < $k_aufgabe[1] OR $k_hp[1] < $k_hp[0] OR $k_hp[1] == $k_hp[0]) { - $hp1_new= $k_hp[0].','.$k_hp1[1]; - $mp1_new= $k_mp[0].','.$k_mp1[1]; - $fighter_team_a_array[$fighter_a][hp]= $hp1_new; - $fighter_team_a_array[$fighter_a][mp]= $mp1_new; - $sieger = $chara_1['id']; - $verlierer = $chara_2['id']; -} - -if ($k_hp[0] < $k_aufgabe[0] OR $k_hp[0] < $k_hp[1]) { - $hp2_new= $k_hp[1].','.$k_hp2[1]; - $mp2_new= $k_mp[1].','.$k_mp2[1]; - $fighter_team_b_array[$fighter_b][hp]= $hp2_new; - $fighter_team_b_array[$fighter_b][mp]= $mp2_new; - $sieger = $chara_2['id']; - $verlierer = $chara_1['id']; -} - -mysql_query("UPDATE clan_fights SET win='$sieger', lose='$verlierer' WHERE id='$db_query[id]'"); - -?> \ No newline at end of file