Quellcode gesäubert
main
radiskull 13 years ago
parent e7a7b0e705
commit 7519a923ed

@ -124,11 +124,11 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte
include (ROOT_PATH . '/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['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['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);

@ -66,33 +66,33 @@ if ($kampf1['art2'] == 'NPC') { // No Arena-Exp on NPC-Fights
}
$arenas_exps = explode(',', $arena[exp]);
$starke1 = explode(',', $kampf1[starke1]);
$starke2 = explode(',', $kampf1[starke2]);
$ver1 = explode(',', $kampf1[ver1]);
$ver2 = explode(',', $kampf1[ver2]);
$speed1 = explode(',', $kampf1[speed1]);
$speed2 = explode(',', $kampf1[speed2]);
$ausdauer1 = explode(',', $kampf1[ausdauer1]);
$ausdauer2 = explode(',', $kampf1[ausdauer2]);
$arenas_exps = explode(',', $arena['exp']);
$starke1 = explode(',', $kampf1['starke1']);
$starke2 = explode(',', $kampf1['starke2']);
$ver1 = explode(',', $kampf1['ver1']);
$ver2 = explode(',', $kampf1['ver2']);
$speed1 = explode(',', $kampf1['speed1']);
$speed2 = explode(',', $kampf1['speed2']);
$ausdauer1 = explode(',', $kampf1['ausdauer1']);
$ausdauer2 = explode(',', $kampf1['ausdauer2']);
$glueck1 = explode(',', $kampf1['glueck1']);
$glueck2 = explode(',', $kampf1['glueck2']);
$schaden1 = explode(',', $kampf1[schaden1]);
$schaden2 = explode(',', $kampf1[schaden2]);
$attacke1 = explode(',', $kampf1[attacke1]);
$attacke2 = explode(',', $kampf1[attacke2]);
$schaden1 = explode(',', $kampf1['schaden1']);
$schaden2 = explode(',', $kampf1['schaden2']);
$attacke1 = explode(',', $kampf1['attacke1']);
$attacke2 = explode(',', $kampf1['attacke2']);
$hp1 = explode(',', $kampf1[hp1]);
$hp2 = explode(',', $kampf1[hp2]);
$mp1 = explode(',', $kampf1[mp1]);
$mp2 = explode(',', $kampf1[mp2]);
$hp1 = explode(',', $kampf1['hp1']);
$hp2 = explode(',', $kampf1['hp2']);
$mp1 = explode(',', $kampf1['mp1']);
$mp2 = explode(',', $kampf1['mp2']);
$a_hp1 = explode(',', $char_1[hp]);
$a_hp2 = explode(',', $char_2[hp]);
$a_mp1 = explode(',', $char_1[mp]);
$a_mp2 = explode(',', $char_2[mp]);
$a_hp1 = explode(',', $char_1['hp']);
$a_hp2 = explode(',', $char_2['hp']);
$a_mp1 = explode(',', $char_1['mp']);
$a_mp2 = explode(',', $char_2['mp']);
$runde = 1;
$a_mp1[1] = round($a_mp1[1]);
@ -111,7 +111,7 @@ $runde = $runde -1;
if ($kampf1['id']) {
$char_infos = getChar($char_id);
$alt_exp = explode(',', $char_infos[exp]);
$alt_exp = explode(',', $char_infos['exp']);
if ($kampf1['char1'] == $char_id) {
$new_exp = $kampf1['exp1'];
@ -159,18 +159,18 @@ if ($kampf1['id']) {
###################################################CHARAKTER WIN
if ($kampf1[win] == "$my_charakter[name]") {
$new_siege = $my_charakter[siege] + 1;
if ($kampf1['win'] == "$my_charakter[name]") {
$new_siege = $my_charakter['siege'] + 1;
////////NPC item verteilung
if ($kampf1[art2] == "NPC") {
$item = mysql_fetch_array(mysql_query("SELECT item, mal, datensatz, wieviel, feld FROM npc_item WHERE charakter='$kampf1[char2]'"));
if ($kampf1['art2'] == "NPC") {
$item = mysql_fetch_array(mysql_query('SELECT item, mal, datensatz, wieviel, feld FROM npc_item WHERE charakter='.$kampf1['char2'].';'));
$schon_bekommen = mysql_num_rows(mysql_query("SELECT id FROM npc_ware WHERE charakter='$kampf1[char2]' AND user='$user_ida[id]' LIMIT 20"));
if ($schon_bekommen >= $item[mal]) {
if ($schon_bekommen >= $item['mal']) {
/////item schon bekommen
//wtf?! :D wasn das für ne if-anweisung :D :D :D
} else {
if ($item['datensatz'] == "ware") {
@ -179,7 +179,16 @@ if ($kampf1['id']) {
}
elseif ($item['datensatz'] == "chars") {
$punkte_block = 1;
//muss gemacht werden weil bei hp/mp ein String steht und kein int
if($item['feld'] == 'hp' || $item['feld'] == 'mp') {
$chars = getCharsOfUser($user_ida['id']);
foreach ($chars as $tmp_char) {
$values = explode(',', $tmp_char[$item['feld']]);
mysql_query('UPDATE '.$item['datensatz'].' SET '.$item['feld'].'=\''.$values[0].','.($values[1]+$item['wieviel']).'\' WHERE besitzer='.$user_ida['id'].' AND id='.$tmp_char['id']);
}
} else {
mysql_query("UPDATE $item[datensatz] SET $item[feld]=$item[feld]+'$item[wieviel]' WHERE besitzer='$user_ida[id]' LIMIT 10");
}
mysql_query("INSERT npc_ware SET user='$user_ida[id]', charakter='$kampf1[char2]'");
} else {
$satz = "item";

Loading…
Cancel
Save