3) { $SummonTimeJS = 'Summon It!'; if(!$_SESSION['opponent']){ $_SESSION['opponent'] = array('atk' => rand(($user['atk']/10), ($user['atk'])), 'vit' => rand(($user['vit']/10), ($user['vit']/2)), 'agi' => rand(($user['agi']/10), ($user['agi']/2)), 'def' => rand(($user['def']/10), ($user['def']/2)), 'hp' => '0'); $_SESSION['opponent']['hp'] = ($_SESSION['opponent']['vit']*2); } $opponent_atk = rand(10, 100); $opponent_vit = rand(10, 100); $opponent_agi = rand(10, 100); $opponent_def = rand(10, 100); $opponent_hp = $opponent_vit * 2; $member = mysql_query('SELECT * FROM `undying_member` WHERE `user` = "'.$user['id'].'" ORDER BY `id` DESC LIMIT 1'); $member = mysql_fetch_array($member); $battle = mysql_query('SELECT * FROM `undying` WHERE `id` = "'.$member['battle'].'"'); $battle = mysql_fetch_array($battle); if($member['exit'] == 0 && $battle['start'] == 1 && $battle['end'] == 0) { $HellGate = 'Started'; $title = 'Gerbang Neraka'; $header = 'Gerbang Neraka'; $_SESSION['place'] = 'Gerbang Neraka'; $hp_progress = round(100/(($user['vit']*2)/$user['hp'])); if($hp_progress > 100) $hp_progress = 100; include './inc/head.php'; $titans = mysql_result(mysql_query('SELECT COUNT(*) FROM `undying_member` WHERE `dead` = "0" AND `battle` = "'.$battle['id'].'"'),0); if($titans == 0 OR $battle['opponents'] == 0) { mysql_query('UPDATE `undying` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"'); header('location: /hellgate/'); exit; } if($battle['time'] < time()) { mysql_query('UPDATE `undying` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"'); header('location: /hellgate/'); exit; } if($member['dead'] == 0) { if($_GET['out_gate_confirm'] == true) { mysql_query('UPDATE `undying_member` SET `dead` = "1", `exit` = "1" WHERE `battle` = "'.$battle['id'].'" AND `user` = "'.$user['id'].'"'); $_SESSION['ok'] = 'Berhasil keluar dari pertempuran!'; exit(header('location: /hellgate/')); } if(isset($_GET['out_gate'])) { $HellGate = false; echo ""; include './inc/foot.php'; exit; } if ($_GET['heal']==true) { if ((time () - $member['last_heal'])>60 && $_GET['r'] == $_SESSION['refresh']) { $_SESSION['refresh'] = rand(10000000,99999999); mysql_query ("UPDATE `undying_member` SET `hp`='" . ceil (($user['vit']*2)) . "',`last_heal`='" . time () . "' WHERE (`id`='$member[id]')") or die(mysql_error()); } header ("location: /hellgate/attack/".$_SESSION['refresh']."/"); exit; } $getr = strdef(_num($_GET['r'])); if(isset($_GET['stone']) && $member['stone'] < time() && $getr == $_SESSION['refresh'] && $user['stone'] > 0) { $_SESSION['refresh'] = rand(10000000,99999999); mysql_query("UPDATE `undying_member` SET `stone` = ".(time()+60)." WHERE `battle` = ".$battle['id']." AND `user` = ".$user['id'].""); mysql_query("UPDATE `users` SET `stone` = `stone`-'1' WHERE `id` = ".$user['id'].""); $member['stone'] = (time()+60); $user['stone'] -= 1; } if(isset($_GET['grass']) && $member['grass'] < time() && $getr == $_SESSION['refresh'] && $user['grass'] > 0) { $_SESSION['refresh'] = rand(10000000,99999999); mysql_query("UPDATE `undying_member` SET `grass` = ".(time()+60)." WHERE `battle` = ".$battle['id']." AND `user` = ".$user['id'].""); mysql_query("UPDATE `users` SET `grass` = `grass`-'1' WHERE `id` = ".$user['id'].""); $member['grass'] = (time()+60); $user['grass'] -= 1; } echo "
"; if($_GET['attack'] == true && $battle['opponents'] && $_GET['r'] == $_SESSION['refresh']) { $_SESSION['refresh'] = rand(10000000,99999999); if($member['time'] > time() OR $user['mp'] < 50) { header('location: /hellgate/'); exit; } $HE_ATTAC = 'BENAR'; if($user['ability_1'] > 0) { switch($user['ability_1']) { case 0: $a_1_bonus = 25; $a_1_chanse = 5; break; case 1: $a_1_bonus = 25; $a_1_chanse = 5; break; case 2: $a_1_bonus = 30; $a_1_chanse = 5; break; case 3: $a_1_bonus = 35; $a_1_chanse = 5; break; case 4: $a_1_bonus = 40; $a_1_chanse = 5; break; case 5: $a_1_bonus = 45; $a_1_chanse = 5; break; case 6: $a_1_bonus = 45; $a_1_chanse = 8; break; case 7: $a_1_bonus = 50; $a_1_chanse = 8; break; case 8: $a_1_bonus = 55; $a_1_chanse = 8; break; case 9: $a_1_bonus = 60; $a_1_chanse = 8; break; case 10: $a_1_bonus = 65; $a_1_chanse = 8; break; case 11: $a_1_bonus = 65; $a_1_chanse = 11; break; case 12: $a_1_bonus = 70; $a_1_chanse = 11; break; case 13: $a_1_bonus = 75; $a_1_chanse = 11; break; case 14: $a_1_bonus = 80; $a_1_chanse = 11; break; case 15: $a_1_bonus = 85; $a_1_chanse = 11; break; case 16: $a_1_bonus = 85; $a_1_chanse = 14; break; case 17: $a_1_bonus = 90; $a_1_chanse = 14; break; case 18: $a_1_bonus = 95; $a_1_chanse = 14; break; case 19: $a_1_bonus = 100; $a_1_chanse = 14; break; case 20: $a_1_bonus = 105; $a_1_chanse = 14; break; case 21: $a_1_bonus = 105; $a_1_chanse = 17; break; case 22: $a_1_bonus = 145; $a_1_chanse = 20; break; case 23: $a_1_bonus = 165; $a_1_chanse = 23; break; case 24: $a_1_bonus = 165; $a_1_chanse = 23; break; } if(mt_rand(0, 100) <= $a_1_chanse) { $a_1 = true; } } if($user['ability_2'] > 0) { switch($user['ability_2']) { case 0: $a_2_bonus = 25; $a_2_chanse = 5; break; case 1: $a_2_bonus = 25; $a_2_chanse = 5; break; case 2: $a_2_bonus = 30; $a_2_chanse = 5; break; case 3: $a_2_bonus = 35; $a_2_chanse = 5; break; case 4: $a_2_bonus = 40; $a_2_chanse = 5; break; case 5: $a_2_bonus = 45; $a_2_chanse = 5; break; case 6: $a_2_bonus = 45; $a_2_chanse = 8; break; case 7: $a_2_bonus = 50; $a_2_chanse = 8; break; case 8: $a_2_bonus = 55; $a_2_chanse = 8; break; case 9: $a_2_bonus = 60; $a_2_chanse = 8; break; case 10: $a_2_bonus = 65; $a_2_chanse = 8; break; case 11: $a_2_bonus = 65; $a_2_chanse = 11; break; case 12: $a_2_bonus = 70; $a_2_chanse = 11; break; case 13: $a_2_bonus = 75; $a_2_chanse = 11; break; case 14: $a_2_bonus = 80; $a_2_chanse = 11; break; case 15: $a_2_bonus = 85; $a_2_chanse = 11; break; case 16: $a_2_bonus = 85; $a_2_chanse = 14; break; case 17: $a_2_bonus = 90; $a_2_chanse = 14; break; case 18: $a_2_bonus = 95; $a_2_chanse = 14; break; case 19: $a_2_bonus = 100; $a_2_chanse = 14; break; case 20: $a_2_bonus = 105; $a_2_chanse = 14; break; case 21: $a_2_bonus = 105; $a_2_chanse = 17; break; case 22: $a_2_bonus = 145; $a_2_chanse = 20; break; case 23: $a_2_bonus = 165; $a_2_chanse = 23; break; case 24: $a_2_bonus = 165; $a_2_chanse = 23; break; } if(mt_rand(0, 100) <= $a_2_chanse) { $a_2 = true; } } if($user['ability_3'] > 0) { switch($user['ability_3']) { case 0: $a_3_bonus = 5; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 1: $a_3_bonus = 5; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 2: $a_3_bonus = 8; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 3: $a_3_bonus = 11; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 4: $a_3_bonus = 14; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 5: $a_3_bonus = 17; $a_3_crit_chanse = 5; $a_3_chanse = 20; break; case 6: $a_3_bonus = 17; $a_3_crit_chanse = 7; $a_3_chanse = 25; break; case 7: $a_3_bonus = 20; $a_3_crit_chanse = 7; $a_3_chanse = 25; break; case 8: $a_3_bonus = 23; $a_3_crit_chanse = 7; $a_3_chanse = 25; break; case 9: $a_3_bonus = 26; $a_3_crit_chanse = 7; $a_3_chanse = 25; break; case 10: $a_3_bonus = 29; $a_3_crit_chanse = 7; $a_3_chanse = 25; break; case 11: $a_3_bonus = 29; $a_3_crit_chanse = 9; $a_3_chanse = 30; break; case 12: $a_3_bonus = 32; $a_3_crit_chanse = 9; $a_3_chanse = 30; break; case 13: $a_3_bonus = 35; $a_3_crit_chanse = 9; $a_3_chanse = 30; break; case 14: $a_3_bonus = 38; $a_3_crit_chanse = 9; $a_3_chanse = 30; break; case 15: $a_3_bonus = 41; $a_3_crit_chanse = 9; $a_3_chanse = 30; break; case 16: $a_3_bonus = 41; $a_3_crit_chanse = 11; $a_3_chanse = 35; break; case 17: $a_3_bonus = 44; $a_3_crit_chanse = 11; $a_3_chanse = 35; break; case 18: $a_3_bonus = 47; $a_3_crit_chanse = 11; $a_3_chanse = 35; break; case 19: $a_3_bonus = 50; $a_3_crit_chanse = 11; $a_3_chanse = 35; break; case 20: $a_3_bonus = 53; $a_3_crit_chanse = 11; $a_3_chanse = 35; break; case 21: $a_3_bonus = 53; $a_3_crit_chanse = 13; $a_3_chanse = 40; break; case 22: $a_3_bonus = 77; $a_3_crit_chanse = 15; $a_3_chanse = 45; break; case 23: $a_3_bonus = 89; $a_3_crit_chanse = 17; $a_3_chanse = 50; break; case 24: $a_3_bonus = 89; $a_3_crit_chanse = 17; $a_3_chanse = 50; break; } if(mt_rand(0, 100) <= $a_3_chanse) { $a_3 = true; } } if($user['ability_4'] > 0) { switch($user['ability_4']) { case 0: $a_4_bonus = 20; $a_4_chanse = 5; break; case 1: $a_4_bonus = 20; $a_4_chanse = 5; break; case 2: $a_4_bonus = 22; $a_4_chanse = 5; break; case 3: $a_4_bonus = 24; $a_4_chanse = 5; break; case 4: $a_4_bonus = 26; $a_4_chanse = 5; break; case 5: $a_4_bonus = 28; $a_4_chanse = 5; break; case 6: $a_4_bonus = 28; $a_4_chanse = 10; break; case 7: $a_4_bonus = 30; $a_4_chanse = 10; break; case 8: $a_4_bonus = 32; $a_4_chanse = 10; break; case 9: $a_4_bonus = 34; $a_4_chanse = 10; break; case 10: $a_4_bonus = 36; $a_4_chanse = 10; break; case 11: $a_4_bonus = 36; $a_4_chanse = 15; break; case 12: $a_4_bonus = 38; $a_4_chanse = 15; break; case 13: $a_4_bonus = 40; $a_4_chanse = 15; break; case 14: $a_4_bonus = 42; $a_4_chanse = 15; break; case 15: $a_4_bonus = 44; $a_4_chanse = 15; break; case 16: $a_4_bonus = 44; $a_4_chanse = 20; break; case 17: $a_4_bonus = 46; $a_4_chanse = 20; break; case 18: $a_4_bonus = 48; $a_4_chanse = 20; break; case 19: $a_4_bonus = 50; $a_4_chanse = 20; break; case 20: $a_4_bonus = 52; $a_4_chanse = 20; break; case 21: $a_4_bonus = 52; $a_4_chanse = 25; break; case 22: $a_4_bonus = 68; $a_4_chanse = 30; break; case 23: $a_4_bonus = 76; $a_4_chanse = 35; break; case 24: $a_4_bonus = 76; $a_4_chanse = 35; break; } if(mt_rand(0, 100) <= $a_4_chanse) { $a_4 = true; } } $dmg +=round(rand(($user['atk']/6),($user['atk']/4))); if($a_1 == true) { $dmg += round(($dmg / 100) * $a_1_bonus); } $dmg -= round(rand(($_SESSION['opponent']['def']/12),($_SESSION['opponent']['def']/7))); if($dmg < 0) { $dmg = 0; } if($a_3 == true) { $crit = ( (rand(1,2) * ($user['agi'] / 100) + $a_3_crit_chanse ) - (rand(1,2) * ($_SESSION['opponent']['agi'] / 100))); } else { $crit = ( (rand(1,2) * ($user['agi'] / 100) ) - (rand(1,2) * ($_SESSION['opponent']['agi'] / 100))); } if(mt_rand(0, 100) <= $crit) { $dmg *= 2; if($a_3 == true) { $dmg += round(($dmg / 100) * $a_3_bonus); } $_crit = true; } $dodge = ( (rand(1,2) * ($_SESSION['opponent']['agi']/ 100) ) - (rand(1,2) * ($user['agi'] / 100))); if(mt_rand(0, 100) <= $dodge) { $dmg = 0; } $opponent_dmg +=round(rand(($_SESSION['opponent']['atk']/6),($_SESSION['opponent']['atk']/4))); if($a_2 == true) { $opponent_dmg -= round(($opponent_dmg / 100) * $a_2_bonus); } $opponent_dmg -= round(rand(($user['def']/12),($user['def']/7))); if($opponent_dmg < 0) { $opponent_dmg = 0; } $opponent_crit = ( (rand(1,2) * ($_SESSION['opponent']['agi'] / 100) ) - (rand(1,2) * ($user['agi'] / 100))); if(mt_rand(0, 100) <= $opponent_crit) { $opponent_dmg *= 2; if($a_4 == true) { $opponent_dmg -= round(($opponent_dmg / 100) * $a_4_bonus); } $_opponent_crit = true; } $opponent_dodge = ( (rand(1,2) * ($user['agi'] / 100) ) - (rand(1,2) * ($_SESSION['opponent']['agi'] / 100))); if(mt_rand(0, 100) <= $opponent_dodge) { $opponent_dmg = 0; } if($member['stone'] > time()) $dmg += ceil (($dmg / 100) * 35); if($opponent_dmg > 0){ if($member['grass'] > time()) $opponent_dmg -= ceil (($opponent_dmg / 100) * 35); } $_SESSION['opponent']['hp'] -= $dmg; mysql_query('UPDATE `undying_member` SET `time` = "'.(time() + 5).'", `dmg` = "'.($member['dmg'] + $dmg).'" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"'); if($dmg > $_SESSION['opponent']['hp']) { mysql_query("UPDATE `users` SET `undying`=`undying`+'1' WHERE `id`='".$user['id']."'"); mysql_query('UPDATE `undying_member` SET `kills` = "'.($member['kills'] + 1).'" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"'); mysql_query('UPDATE `undying` SET `opponents` = "'.($battle['opponents'] - 1).'" WHERE `id` = "'.$battle['id'].'"'); $battle['opponents'] -= '1'; if($battle['opponents'] - 1 == 0) { header('location: /hellgate/'); } unset($_SESSION['opponent']); } if($opponent_dmg > $user['hp']) { $_hp = $user['hp']; } else { $_hp = $opponent_dmg; } if($opponent_dmg > 0) { mysql_query('UPDATE `users` SET `hp` = "'.($user['hp'] - $_hp).'" WHERE `id` = "'.$user['id'].'"'); } mysql_query('UPDATE `users` SET `mp` = "'.($user['mp']-50).'" WHERE `id` = "'.$user['id'].'"'); if($opponent_dmg > $user['hp']) { mysql_query('UPDATE `undying_member` SET `dead` = "1" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"'); if($titans - 1 == 0) { header('location: /hellgate/'); } } echo "
"; echo " Kerusakan yang dibuat: ".$dmg."".($_crit == true ? ' (krit)':'').""; if($opponent_dmg > 0) { echo "
Kamu diserang musuh: ".$opponent_dmg." ".($_opponent_crit == true ? '(krit)':'').""; } if($a_1 == true OR $a_2 == true OR $a_3 == true OR $a_4 == true OR $a_5 == true) { echo "
"; if($a_1 == true) echo ' \'*\'/ '; if($a_2 == true) echo ' \'*\'/ '; if($a_3 == true) echo ' \'*\'/ '; if($a_4 == true) echo ' \'*\'/ '; if($a_5 == true) echo ' \'*\'/ '; } if($dmg > $_SESSION['opponent']['hp']) { echo "
"; echo " Kamu membunuh musuh!"; } echo "
"; echo "
"; } else { } $opponentsnya = $battle['opponents']; if ($_SESSION['anuanu']=='farhan') { $opponentsnya = $battle['opponents']-1; unset($_SESSION['anuanu']); } if($member['time'] > time()) { echo "
Kamu harus menunggu ".($member['time']-time())." detik sebelum serangan berikutnya...
"; echo "
"; } echo "
Titans: ".$titans.""; echo " "; echo "Musuh  Musuh : ".$opponentsnya."
"; echo "
"; echo "
"; if($user['mp'] < ($user['mana'] / 2)) { if($_GET['mana'] == true) { mysql_query('UPDATE `users` SET `mp` = "'.$user['mana'].'" WHERE `id` = "'.$user['id'].'"'); header('location: /hellgate/'); } echo "Isi Energi"; } else { echo "Serang"; } echo "
"; echo "
"; echo "
"; if($HE_ATTAC OR $member['dmg'] > 0){ $Waktu_Tunggu = $member['time']-time(); if($Waktu_Tunggu < 0) $Waktu_Tunggu = '0'; if($HE_ATTAC) $Waktu_Tunggu = '5'; echo "
Tunggu ".($Waktu_Tunggu)." detik
"; echo "
"; } echo ""; echo ""; echo ""; echo "
"; echo ""; echo " Batu
"; if($member['stone'] > time()) echo ''._time($member['stone'] - time()).' '; elseif($user['stone'] > 0) echo "+35% kerusakan "; else echo "0 pc. "; echo "
"; echo ""; echo " Herba
"; if($member['grass'] > time()) echo ''._time($member['stone'] - time()).' '; elseif($user['grass'] > 0) echo "+35% kecerdasan "; else echo "0 pc. "; echo "
"; echo "
"; echo " Total kerusakan: ".$member['dmg']."
"; if($member['kills'] > 0) echo" Musuh dibunuh: ".$member['kills']."
"; echo "
Pertempuran berakhir dalam ".timedetail($battle['time']-time())."
"; echo "
"; echo "
"; } else { $opponentsnya = $battle['opponents']; echo "
"; echo "
Titans: ".$titans.""; echo " "; echo "Musuh  Musuh : ".$opponentsnya.""; echo "
Kamu telah mati, tunggu sampai pertempuran selesai
"; echo "
"; echo "
"; echo "Segarkan"; echo "
"; echo " Total kerusakan: ".$member['dmg']."
"; if($member['kills'] > 0) echo" Musuh dibunuh: ".$member['kills']."
"; echo "
Pertempuran berakhir dalam ".timedetail($battle['time']-time())."
"; echo "
"; echo "
"; } } else { $title = 'Gerbang Neraka'; $header = 'Gerbang Neraka'; $_SESSION['place'] = 'Gerbang Neraka'; include './inc/head.php'; echo ""; echo "
"; if($member['exit'] == 0 && $battle['start'] == 1 && $battle['end'] == 1) { $BattleID = $member['battle']; echo "
"; echo "
"; if($member['dmg'] == 0){ mysql_query('UPDATE `undying_member` SET `dmg` = "'.(rand(round($user['atk']/2),$user['atk'])*rand(2,4)).'" WHERE `id` = "'.$user['id'].'"'); } $titans = mysql_fetch_assoc(mysql_query('SELECT COUNT(*) FROM `undying_member` WHERE `dead` = "0" `battle` = "'.$battle['id'].'"')); if($titans == 0 && $battle['opponents'] > 0 OR $battle['opponents'] > 0) { $_g = round($member['kills'] / 2); $_s = rand(1,2) * round(rand(($member['dmg'] / 100), $member['dmg']) / 2); $_exp = rand(1,1) * round(round(round($member['dmg'] / 100) * 10) / 2); if ($_s < 1) { $_s = rand(1,3); $_s = $_s * $user['level']; } if ($_exp < 1) { $_exp = rand(1,2); $_exp = $_exp * $user['level']; } echo "

Kalah

"; } else { $EndingBattle = 'Show'; $_g = $member['kills']; $_s = rand(1,5) * round(rand(($member['dmg'] / 100), $member['dmg'])); $_exp = rand(1,2) * round(round($member['dmg'] / 100)); if ($_s < 1) { $_s = rand(1,10); $_s = $_s * $user['level']; } if ($_exp < 1) { $_exp = rand(1,4); $_exp = $_exp * $user['level']; } echo "

Kemenangan!

"; } $member = mysql_query('SELECT * FROM `undying_member` WHERE `user` = "'.$user['id'].'" ORDER BY `id` DESC LIMIT 1'); $member = mysql_fetch_array($member); echo "
"; echo "Piala: "; if ($member['kills'] > 0) echo "g ".$_g." emas "; echo "s ".$_s." perak "; echo "exp ".$_exp." pengalaman
"; echo "
"; echo "
"; if($guild_memb && $guild_memb['bonus'] > 0) { $_exp += round($_exp/100) * $guild_memb['bonus']; } if($premium) { $_exp+= round($_exp/ 100) * 25; } if($guild) { mysql_query('UPDATE `guilds` SET `exp` = `exp` + '.$_exp.' WHERE `id` = "'.$guild['id'].'"'); mysql_query('UPDATE `guild_memb` SET `exp` = `exp` + '.$_exp.', `exp_today` = `exp_today` + '.$_exp.' WHERE `guild` = "'.$guild['id'].'" AND `user` = "'.$user['id'].'"'); } mysql_query('UPDATE `users` SET `gold` = "'.($user['gold'] + $_g).'", `silver` = "'.($user['silver'] + $_s).'", `exp` = "'.($user['exp'] + $_exp).'" WHERE `id` = "'.$user['id'].'"'); mysql_query('UPDATE `undying_member` SET `exit` = "1" WHERE `battle` = "'.$battle['id'].'" AND `user` = "'.$user['id'].'"'); quest('2',$user['id'],$member['kills']); } else { } echo "
"; // z = echo "
"; if($member['exit'] == 0 && $battle['start'] == 1 && $battle['end'] == 1) { # echo "
"; echo "
Prestasi kamu
"; echo " Musuh dibunuh: ".$member['kills']."
"; echo " Kerusakan yang dibuat: ".$member['dmg']."
"; echo "
"; } else { echo "
"; echo "
"; echo "Bertempur melawan makhluk-makhluk abadi
"; echo "
"; ?> 22 && $h < 6) { $time = 3600 * 8; } else { $time = 3600 * 3; } mysql_query('INSERT INTO `undying` (`time`) VALUES ("'.(time() + $time).'")'); } if($battle['time'] <= time()) { mysql_query('UPDATE `undying` SET `start` = "1", `time` = "'.(time() + (60 * 5)).'" WHERE `id` = "'.$battle['id'].'"'); header('location: /hellgate/'); } echo "
Titans: ".mysql_result(mysql_query('SELECT COUNT(*) FROM `undying_member` WHERE `battle` = "'.$battle['id'].'"'),0)."
"; echo "Waktu tersisa untuk pertempuran berikutnya: ".timedetail($battle['time'] - time())."
"; echo "
"; echo "
"; if($member['battle'] != $battle['id']) { if($_GET['enter'] == true) { $_SESSION['refresh'] = rand(10000000,99999999); mysql_query('INSERT INTO `undying_member` (`battle`, `user`, `time`, `hp`, `mp`) VALUES ("'.$battle['id'].'", "'.$user['id'].'", "'.time().'", "'.($user['vit']*2).'", "'.($user['mana']).'")') or die(mysql_error()); $AddOpp = ($battle['opponents'] + rand(1,5)); mysql_query('UPDATE `undying` SET `opponents` = "'.$AddOpp.'" WHERE `id` = "'.$battle['id'].'"'); mysql_query('UPDATE `undying` SET `count_opponents` = "'.$AddOpp.'" WHERE `id` = "'.$battle['id'].'"'); $text = "Kamu berpartisipasi mengikuti pertarungan!"; $_SESSION['ok'] = $text; header('location: /hellgate/enterGame/?'.$_SESSION['refresh']); } echo " Daftar"; } else { ?>
Segarkan
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Kamu memiliki:
Batu
".$user['stone']." pc.
Herba
".$user['grass']." pc.
Beli lagi
"; echo "
"; if($EndingBattle){ echo "
"; echo "Pembunuh Terbaik:
"; $q = mysql_query('SELECT * FROM `undying_member` WHERE `battle` = "'.$BattleID.'" AND `kills` != "0" ORDER BY `kills` DESC LIMIT 4'); while($row = mysql_fetch_array($q)) { echo user_name($row['user'],5)." ".$row['kills']." musuh-musuh
"; } echo "
Terbaik dari kerusakan yang dibuat:
"; $q = mysql_query('SELECT * FROM `undying_member` WHERE `battle` = "'.$BattleID.'" AND `dmg` != "0" ORDER BY `dmg` DESC LIMIT 4'); while($row = mysql_fetch_array($q)) { echo user_name($row['user'],5)." ".$row['dmg']." kerusakan
"; } echo "
"; echo "
"; $CountMember = mysql_result(mysql_query('SELECT COUNT(*) FROM `undying_member` WHERE `battle` = "'.$BattleID.'"'),0); $BattleHG = mysql_fetch_array(mysql_query('SELECT * FROM `undying` WHERE `id` = "'.$BattleID.'"')); echo "
"; echo "Peserta pertarungan:
"; echo " Titans: ".$CountMember." "; echo " "; echo " Musuh : ".$BattleHG['count_opponents']."
"; echo "
"; } echo "
"; echo ""; echo "
"; echo ""; } } else { $title = 'Gerbang Neraka'; $header = 'Gerbang Neraka'; $_SESSION['place'] = 'Gerbang Neraka'; include './inc/head.php'; echo "
Untuk bergabung di Gerbang Neraka kamu harus level 4
"; echo "Level kamu: ".$user['level']."
"; echo "
Level dapat ditingkatkan di Arena"; echo "
"; echo "Pergi ke arena
"; } include './inc/foot.php'; ?>