function mob_attack_back() { global $user; global $mobatk; global $mess; global $atker_hp; global $defer_hp; $atker_block_roll = mt_rand(1, 100); if ($atker_block_roll <= $user->_block) { $def_message = "<tr><td width=33%></td><td width=33%></td<td width=33% border=1 border-color=#737373 align=center class=style54 id=message_{$mess} style=visibility:hidden;background-color:" . BG_COLOR_BLOCK . ";border-collapse: collapse;><font color=lightgreen><b>" . $user->username . "</b></font> blocks <font color=red><b>{$mobatk['name']}</b></font>'s attack!</td></tr>"; } else { $dcal = $mobatk['atk']; $defer_crit_roll = mt_rand(1, 100); $defer_crit = 1; if ($defer_crit_roll <= $mobatk['crit']) { $defer_crit = 1.5; } $mypower1 = $dcal * $defer_crit; if ($mypower1 > 2147483647) { $defdmg = $mypower1; } else { $defdmg = mt_rand($mypower1 * 0.75, $mypower1 * 1.25); } if ($defdmg < 0) { $defdmg = 0; } $defdmg1 = commas($defdmg); $atker_hp = $atker_hp - $defdmg; if ($atker_hp < 0) { $atker_hp = 0; } $atker_left = convert2percent($atker_hp / $user->_hp * 100); if ($defer_crit_roll <= $mobatk['crit']) { $def_message = "<tr><td width=33%></td><td width=33%></td><td width=33% border=1 border-color=#737373 align=center class=style54 id=message_{$mess} style=visibility:hidden;background-color:" . BG_COLOR_CRIT . ";border-collapse: collapse;><font color=red><b>{$mobatk['name']}</b></font> CRITICALLY attacks <font color=lightgreen><b>" . $user->username . "</b></font> for <font color=red><b>{$defdmg1}</b></font> damage! ({$atker_left} left)</td></tr>"; } else { $def_message = "<tr><td width=33%></td><td width=33%></td><td width=33% border=1 border-color=#737373 align=center class=style54 id=message_{$mess} style=visibility:hidden;background-color:" . BG_COLOR_DEFER . ";border-collapse: collapse;><font color=red><b>{$mobatk['name']}</b></font> attacks <font color=lightgreen><b>" . $user->username . "</b></font> for <font color=red><b>{$defdmg1}</b></font> damage! ({$atker_left} left)</td></tr>"; } } echo $def_message; $mess++; if ($atker_hp <= 0) { $this->mob_result(2); } else { $this->mob_attack(); } }
$statatk = commas($stat['attacks']); $statmaxatk = commas($stat["maxattacks"] + $itemmaxatk['maxattk']); $statcash = commas($stat["cash"]); $statpower = commas($stat["power"]); // Attack points $statcph = commas($stat["cph"] + $itemcph['clicks'] + $crew1upg['scomp'] * 3); $stataph = commas($stat["aph"] + $itemaph['attacks'] + $crew1upg['kia'] * 3); $statatkcap = commas($stat["atkcap"] + $itematkcap['atkcap'] + $crew1upg['aggressive']); $statatkbonus = commas(($power1['atk'] + $itematk['attack']) * $setamul - $atkdown + $atkup); $statdefbonus = commas(($power1['def'] + $itemdef['defense']) * $setdmul - $defdown + $defup); $usratk = ($power1['atk'] + $itematk['attack']) * $setamul - $atkdown + $atkup; $usrdef = ($power1['def'] + $itemdef['defense']) * $setdmul - $defdown + $defup; $statpoints = commas($stat["points"]); $statfpoints = commas($stat["free"]); $statskpoints = commas($stat["skpoints"]); $stattropoints = commas($tpoints["trpoints"]); if ($stat['nextlvl'] - $stat['power'] <= 0) { $nextlvl = 'LEVEL UP!'; } else { $nextlvl = $stat['nextlvl'] - $stat['power']; } $crew = mysql_fetch_assoc(mysql_query("select crewid,name from crew where crewid='{$stat['crew']}'")); if ($crew > '0') { $crewn = $crew['name']; } else { $crewn = 'None'; } $rt = number_format(($stat['wins'] - $stat['losses']) / $stat['wins'] * 100, 2); if ($rt < '0') { $rt = '0'; }
function attack() { global $stat; global $stat1; global $mypower; global $attackdmg; global $attackdmg2; global $defdmg; global $defdmg2; global $mess; global $randeally; global $randeally1; global $sum1; global $sum3; $playallyc = mysql_num_rows(mysql_query("select * from plally where ally1='{$stat['id']}'")); $playallyc1 = mysql_num_rows(mysql_query("select * from plally where ally='{$stat['id']}'")); $playallyc2 = mysql_num_rows(mysql_query("select * from plally where ally1='{$stat1['id']}'")); $playallyc3 = mysql_num_rows(mysql_query("select * from plally where ally='{$stat1['id']}'")); /* Your atk and def */ $itemattack = mysql_fetch_assoc(mysql_query("select CAST(SUM(atk) as signed) as attack from iteminv where owner='{$stat['id']}' and status='E'")); $itemdefense = mysql_fetch_assoc(mysql_query("select CAST(SUM(def) as signed) as defense from iteminv where owner='{$stat['id']}' and status='E'")); $power = mysql_query("select itemid,sid,owner,CAST(SUM(shop.atk*qty) as unsigned ) as atk,CAST(SUM(shop.def*qty) as unsigned ) as def from inventory, shop where `inventory`.owner='{$stat['id']}' and `shop`.sid=`inventory`.itemid group by `inventory`.owner"); $power1 = mysql_fetch_assoc($power); /* End */ $sum2 = 0; $sum3 = 0; /* Enemy atk and def */ $itemattack1 = mysql_fetch_assoc(mysql_query("select CAST(SUM(atk) as signed) as attack from iteminv where owner='{$stat1['id']}' and status='E'")); $itemdefense1 = mysql_fetch_assoc(mysql_query("select CAST(SUM(def) as signed) as defense from iteminv where owner='{$stat1['id']}' and status='E'")); $power2 = mysql_query("select itemid,sid,owner,CAST(SUM(shop.atk*qty) as unsigned ) as atk,CAST(SUM(shop.def*qty) as unsigned ) as def from inventory, shop where `inventory`.owner='{$stat1['id']}' and `shop`.sid=`inventory`.itemid group by `inventory`.owner"); $power3 = mysql_fetch_assoc($power2); /* End */ /* Set Multipliers */ /* Set multiplier */ $setamul = 1; $setdmul = 1; $hotdog = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat['id']}' and `status`='E' and `set`='1'")); if ($hotdog == '8') { $setamul = 1.5; $setdmul = 1.5; } $racing = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat['id']}' and `status`='E' and `set`='2'")); if ($racing == '8') { $setdmul = 2; } $nefarious = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat['id']}' and `status`='E' and `set`='3'")); if ($nefarious == '8') { $setamul = 2; } $senti = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat['id']}' and `status`='E' and `set`='4'")); if ($senti == '8') { $setamul = 2.5; $setdmul = 1.5; } /* Task End. */ /* Set multiplier(defender) */ $setamul1 = 1; $setdmul1 = 1; $hotdog1 = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat1['id']}' and `status`='E' and `set`='1'")); if ($hotdog1 == '8') { $setamul1 = 1.5; $setdmul1 = 1.5; } $racing1 = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat1['id']}' and `status`='E' and `set`='2'")); if ($racing1 == '8') { $setdmul1 = 2; } $nefarious1 = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat1['id']}' and `status`='E' and `set`='3'")); if ($nefarious1 == '8') { $setamul1 = 2; } $senti1 = mysql_num_rows(mysql_query("select `status`,`set` from iteminv where `owner`='{$stat1['id']}' and `status`='E' and `set`='4'")); if ($senti1 == '8') { $setamul1 = 2.5; $setdmul1 = 1.5; } /* End */ /* Skill data collection */ require "includes/mainskills.inc.php"; $pskillfrag = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=1 and reciever={$stat['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillfrag) { $atkdown = 0; } else { $pskillfraglvl = $pskillfrag['level']; $pskillfraglvl = $skill[1]["x2"][$pskillfraglvl]; $atkdown = ($power1['atk'] + $itemattack['attack']) * 3 * $setamul * ($pskillfraglvl / 100); } $pskilldevit = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=2 and reciever={$stat['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskilldevit) { $defdown = 0; } else { $pskilldevitlvl = $pskilldevit['level']; $pskilldevitlvl = $skill[1]["x2"][$pskilldevitlvl]; $defdown = ($power1['def'] + $itemdefense['defense']) * 3 * $setdmul * ($pskilldevitlvl / 100); } $pskillblaze = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=3 and reciever={$stat['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillblaze) { $atkup = 0; } else { $pskillblazelvl = $pskillblaze['level']; $pskillblazelvl = $skill[1]["x2"][$pskillblazelvl]; $atkup = (($power1['atk'] + $itemattack['attack']) * 3 * $setamul - $atkdown) * ($pskillblazelvl / 100); } $pskillprotect = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=4 and reciever={$stat['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillprotect) { $defup = 0; } else { $pskillprotectlvl = $pskillprotect['level']; $pskillprotectlvl = $skill[1]["x2"][$pskillprotectlvl]; $defup = ($power1['def'] + $itemdefense['defense']) * 3 * $setdmul * ($pskillprotectlvl / 100); } /* Task end */ /* Enemy skill data collection */ $pskillfrag1 = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=1 and reciever={$stat1['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillfrag1) { $atkdown1 = 0; } else { $pskillfraglvl1 = $pskillfrag1['level']; $pskillfraglvl1 = $skill[1]["x2"][$pskillfraglvl1]; $atkdown1 = ($power3['atk'] + $itemattack1['attack']) * 3 * $setamul1 * ($pskillfraglvl1 / 100); } $pskilldevit1 = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=2 and reciever={$stat1['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskilldevit1) { $defdown1 = 0; } else { $pskilldevitlvl1 = $pskilldevit1['level']; $pskilldevitlvl1 = $skill[1]["x2"][$pskilldevitlvl1]; $defdown1 = ($power3['def'] + $itemdefense1['defense']) * 3 * $setdmul1 * ($pskilldevitlvl1 / 100); } $pskillblaze1 = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=3 and reciever={$stat1['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillblaze1) { $atkup1 = 0; } else { $pskillblazelvl1 = $pskillblaze1['level']; $pskillblazelvl1 = $skill[1]["x2"][$pskillblazelvl1]; $atkup1 = (($power3['atk'] + $itemattack1['attack']) * 3 * $setamul1 - $atkdown) * ($pskillblazelvl1 / 100); } $pskillprotect1 = mysql_fetch_assoc(mysql_query("select level from castedskills where skillid=4 and reciever={$stat1['id']} and `end` > UNIX_TIMESTAMP()")); if (!$pskillprotect1) { $defup1 = 0; } else { $pskillprotectlvl1 = $pskillprotect1['level']; $pskillprotectlvl1 = $skill[1]["x2"][$pskillprotectlvl1]; $defup1 = (($power3['def'] + $itemdefense1['defense']) * 3 * $setdmul1 - $defdown) * ($pskillprotectlvl1 / 100); } /* Task end */ /* Your damage */ $mypower = ($power1['atk'] + $itemattack['attack']) * 3 * $setamul + $stat['power'] * 3.3 - $atkdown + $atkup - (($power3['def'] + $itemdefense1['defense']) * 3 * $setdmul1 + $stat1['power'] * 3.3 - $defdown1 + $defup1); if ($mypower > 2147483647) { $attackdmg = $mypower; } else { $attackdmg = mt_rand($mypower / 1.1, $mypower); } if ($attackdmg < 5000) { $attackdmg = mt_rand(5000, 6000); } $attackdmg1 = commas($attackdmg); /* End */ $mess = 0; echo "<br><p align=center class=style54 id=message_{$mess} style=visibility:hidden>You Have just Attacked <font color=red><b>{$stat1['username']}</b></font></p><br><br>"; $mess++; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightgreen><b>{$stat['username']}</b></font> attacks <font color=red><b>{$stat1['username']}</b></font> for <font color=lightgreen><b>{$attackdmg1}</b></font> damage! </p> <br><br>"; $mess++; if ($stat['crew'] > 0) { $sum6 = 0; /* Your crew member help */ $randeally = mt_rand(1, 5); if ($randeally == '3') { $allyatk = mysql_query("select id,crew from players where crew='{$stat['crew']}' and id not like '{$stat['id']}'"); $countya = mysql_num_rows($allyatk); if (isset($allyatk) and $countya > 1) { while ($allyatk1 = mysql_fetch_assoc($allyatk)) { $input[] = $allyatk1['id']; } shuffle($input); list(, $input) = each($input); /* Your crew member attack */ $atkbonus4 = mysql_query("SELECT itemid,owner,qty FROM `inventory` where `owner`='{$input}'"); while ($atk2 = mysql_fetch_assoc($atkbonus4)) { $atkbonus5 = "SELECT `atk` FROM `shop` where `sid`='{$atk2['itemid']}'"; $r4 = mysql_query($atkbonus5); while ($row4 = mysql_fetch_assoc($r4)) { $array4[] = $atk2['qty'] * $row4['atk']; $sum6 = 0; foreach ($array4 as $atkadd2) { $sum6 += $atkadd2; } } } /* Your crew member damage */ $stat3 = mysql_fetch_assoc(mysql_query("select id,username,power from players where id='{$input}'")); $mypower2 = $sum6 * 3 + $stat3['power'] * 3.3 - (($sum3 + $itemdefense1['defense']) * 3 + $stat1['power'] * 3.3 * $setdmul1); if ($mypower2 > 2147483647) { $attackdmg2 = $mypower2; } else { $attackdmg2 = mt_rand($mypower2 / 1.1, $mypower2); } if ($attackdmg2 < 5000) { $attackdmg2 = mt_rand(5000, 6000); } $attackdmg3 = commas($attackdmg2); /* End */ echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden>Your crew member <font color=lightgreen><b>{$stat3['username']}</b></font> jumps in and attacks <font color=red><b>{$stat1['username']}</b></font> for <font color=lightgreen><b>{$attackdmg3}</b></font> damage! </p> <br><br>"; $mess++; } } } /* Enemy damage*/ $mypower1 = ($power3['atk'] + $itemattack1['attack']) * 3 * $setamul1 + $stat1['power'] * 3.3 - $atkdown1 + $atkup1 - (($power1['def'] + $itemdefense['defense']) * 3 * $setdmul + $stat['power'] * 3.3 - $defdown + $defup); if ($mypower1 > 2147483647) { $defdmg = $mypower1; } else { $defdmg = mt_rand($mypower1 / 1.1, $mypower1); } if ($defdmg < 5000) { $defdmg = mt_rand(5000, 6000); } $defdmg1 = commas($defdmg); echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=red><b>{$stat1['username']}</b></font> Defends against your attack</p> <br><br>"; $mess++; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=red><b>{$stat1['username']}</b></font> attacks <font color=lightgreen><b>{$stat['username']}</b></font> for <font color=red><b>{$defdmg1}</b></font> damage!<br></p>"; $mess++; if ($stat1['crew'] > 0) { $sum7 = 0; /* Enemy crew member help */ $randeally1 = mt_rand(1, 5); if ($randeally1 == '4') { $allyatk4 = mysql_query("select id,crew from players where crew={$stat1['crew']} and id not like '{$stat1['id']}'"); $countea = mysql_num_rows($allyatk4); if (isset($allyatk4) and $countea > 1) { while ($allyatk5 = mysql_fetch_assoc($allyatk4)) { $input4[] = $allyatk5['id']; } print "<br><br>"; shuffle($input4); list(, $input4) = each($input4); /* Enemy Ally attack */ $atkbonus6 = mysql_query("SELECT itemid,qty,owner FROM `inventory` where `owner`='{$input4}'"); while ($atk3 = mysql_fetch_assoc($atkbonus6)) { $atkbonus7 = "SELECT `atk` FROM `shop` where `sid`='{$atk3['itemid']}'"; $r6 = mysql_query($atkbonus7); while ($row6 = mysql_fetch_assoc($r6)) { $array5[] = $atk3['qty'] * $row6['atk']; $sum7 = 0; foreach ($array5 as $atkadd2) { $sum7 += $atkadd2; } } } /* Enemy Allies damage */ $stat4 = mysql_fetch_assoc(mysql_query("select id,username,power from players where id='{$input4}'")); $mypower3 = $sum7 * 3 + $stat4['power'] * 3.3 - ($stat['power'] * 3.3 + ($sum1 + $itemdefense['defense']) * 3 * $setdmul); if ($mypower3 > 2147483647) { $defdmg2 = $mypower3; } else { $defdmg2 = mt_rand($mypower3 / 1.1, $mypower3); } if ($defdmg2 < 5000) { $defdmg2 = mt_rand(5000, 6000); } $defdmg3 = commas($defdmg2); /* End */ echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=red><b>{$stat1['username']}</b></font>'s crew member <font color=red><b>{$stat4['username']}</b></font> jumps in and attacks <font color=lightgreen><b>{$stat['username']}</b></font> for <font color=red><b>{$defdmg3}</b></font> damage! </p> <br><br>"; $mess++; } } } }
<?php include("config.inc.php"); ?> <body STYLE="font-family: arial narrow" text="#FFFFFF" bgcolor="#000000" topmargin="0" leftmargin="0"> <?php $item = $_GET['item']; $i = mysql_fetch_array(mysql_query("select * from shop where sid='$item'")); $atk = commas($i['atk']); $def = commas($i['def']); if (!$i) { echo "<br> <div align=center> <center> <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF> <tr> <td width=100% bgcolor=#666666> <font color=#FF0000><b>ERROR:</b></font> No such Item<br> </tr> </table> </center> </div>"; } if ($i) {?> <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="450" id="AutoNumber1" height="250"> <tr> <td width="405" colspan="2"> <p align="center"> <b><font size="5"><?php $i['name'];?></font></b></td> </tr> <tr> <td width="117" align="center" valign="top"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100" id="AutoNumber2" height="100"> <tr>
<h3><?php $mobq[$mobid]["desc"][3]; ?> </h3> <?php mysql_query("update qactive set complete='1' where mob={$mobid} and mobqid=" . $mobq[$mobid]["qid"] . " and owner={$stat['id']}") or die("Something went wrong(1)"); mysql_query("update qactive set end=UNIX_TIMESTAMP() where mob={$mobid} and mobqid=" . $mobq[$mobid]["qid"] . " and owner={$stat['id']}") or die("Something went wrong(2)"); mysql_query("delete from qitems where mob='{$mobid}' and owner={$stat['id']}") or die("Something went wrong(3)"); if ($mobq[$mobid]["creward"] > 0) { mysql_query("update players set power=power+" . $mobq[$mobid]["creward"] . " where id={$stat['id']}"); mysql_query("update players set growth=growth+" . $mobq[$mobid]["creward"] . " where id={$stat['id']}"); echo "<font size=3 color=#FFFFFF>You have recieved <font color=lightgreen>" . commas($mobq[$mobid]["creward"]) . "</font> clicks</font><br><br>"; } if ($mobq[$mobid]["skreward"] > 0) { mysql_query("update players set skpoints=skpoints+" . $mobq[$mobid]["skreward"] . " where id={$stat['id']}"); echo "<font size=3 color=#FFFFFF>You have recieved <font color=lightgreen>" . commas($mobq[$mobid]["skreward"]) . "</font> Skill points.</font><br><br>"; } if ($mobq[$mobid]["setreward"] > 0) { mysql_query("delete from qactive where mob={$mobid} and mobqid=" . $mobq[$mobid]["qid"] . " and owner={$stat['id']}") or die("Something went wrong(4)"); $itemqset = mysql_fetch_assoc(mysql_query("select * from `sets` where `set`=" . $mobq[$mobid]["setreward"] . " order by RAND()")); $itemsname = smartquote($itemqset['name']); mysql_query("insert into iteminv (owner,name,`set`,slot,,tradeatk,def,cph,aph,income,maxatk,atkcap,critical,pic) VALUES ({$stat['id']},{$itemsname},{$itemqset['set']},'{$itemqset['slot']}','{$itemqset['trade']}',{$itemqset['atk']},{$itemqset['def']},{$itemqset['cph']},{$itemqset['aph']},{$itemqset['income']},{$itemqset['maxatk']},{$itemqset['atkcap']},{$itemqset['critical']},'{$itemqset['pic']}')") or die("Something went wrong.(5)"); echo "<font size=3 color=#FFFFFF>You have recieved <font color=lightgreen>{$itemqset['name']}</font></font><br><br>"; } $rew = 0; while ($rew < $mobq[$mobid]["itemrqty"]) { $rew1 = $rew + 1; $itemqsel = mysql_fetch_assoc(mysql_query("select * from qrewards where itemid=" . $mobq[$mobid]["ireward"][$rew1] . "")); $itemname = smartquote($itemqsel['name']); mysql_query("insert into iteminv (owner,name,`set`,slot,trade,atk,def,cph,aph,income,maxatk,atkcap,critical,pic) VALUES ({$stat['id']},{$itemname},{$itemqsel['set']},'{$itemqsel['slot']}','{$itemqsel['trade']}',{$itemqsel['atk']},{$itemqsel['def']},{$itemqsel['cph']},{$itemqsel['aph']},{$itemqsel['income']},{$itemqsel['maxatk']},{$itemqsel['atkcap']},{$itemqsel['critical']},'{$itemqsel['pic']}')") or die("Something went wrong.(6)"); echo "<font size=3 color=#FFFFFF>You have recieved <font color=lightgreen>{$itemqsel['name']}</font></font><br><br>";
<table width="90%"> <tr> <td align="center"><b>Most Powerful</b></td> <td align="center"><b>Biggest</b></td> </tr> <td> <table border="0"> <tr> <?php $rank = 1; $crewpow = mysql_query("select `crewid`,`name`,SUM(`power`) as power from `crew` join `players` on `crewid`=`crew` where membership < '3' group by crewid order by power desc limit 50 "); while ($crewpower = mysql_fetch_array($crewpow)) { $crewpower1 = commas($crewpower['power']); ?> <tr><td><?php $rank; ?> .</td><td><a href="crewprofile.php?id=<?php $crewpower['crewid']; ?> "><?php $crewpower['name']; ?> </a></td><td><?php $crewpower1; ?> Power</td></tr> <?php
?> </b></td> <td width="40%"><b><?php echo commas($hits['str']); ?> </b></td> </tr> <?php } $total = mysql_fetch_assoc(mysql_query("select COUNT(htid) as hittotal,SUM(strip) as strtotal from chitstats where crid={$stat['crew']} group by `crid`")); ?> <tr> <td width="25%"><b>Total</b></td> <td width="15%"></td> <td width="20%"><b><?php echo commas($total['hittotal']); ?> </b></td> <td width="40%"><b><?php echo commas($total['strtotal']); ?> </b></td> </tr> </table> </center> <?php } else { echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You need to be logged into an Outrage account<br>\n </tr>\n </table>\n </center>\n</div>"; } include "includes/footer.inc.php";
<tr><td colspan="3" width="100%"><img src="images/comboitems.jpg"></td></tr><tr> <?php $count2 = 1; $item4 = mysql_query("select * from " . PLAYERS_INV_TABLE . " join " . INV_SHOP . " on `sid`=`itemid` where `owner`='{$id['id']}' and `type`='C' order by `itemid`"); while ($item5 = mysql_fetch_assoc($item4)) { ?> <td width="25%" align="center"><a href="#" ONMOUSEOVER="ddrivetip('<?php echo $item5['name']; ?> <br><br>Attack: <?php echo commas($item5['atk']); ?> <br>Defense: <?php echo commas($item5['def']); ?> <br>Max Qty: <?php echo $item5['qtymax']; ?> <br>Qty:<font size=3.5 color=#D36435><b><?php echo $item5['qty']; ?> </b></font>')"; ONMOUSEOUT="hideddrivetip()"> <img border="0" src="images/players/inventory/<?php echo $item5['pic']; ?> "></a> </td> <?php if ($count2 == 4 or $count2 == 8) {
<td style="padding-left:25px;" align="left"><?php echo $ranksrank; ?> (<?php $ranksn1['rid']; ?> )</td> <td><a href="profile.php?id=<?php echo $ranksid; ?> "><?php echo $ranksuser; ?> </a></td> <td><?php echo commas($rankspower); ?> </td> </tr> <?php } } ?> </table> </td> </tr> </table> </center> </div>
</p> <?php $crewdep = $crew['crewmax'] - $crew['crewbank']; $crewdep1 = $stat['cash'] * ($stat['maxdep'] / 100); ?> <?php if ($crewdep > $crewdep1) { $crewdep = $crewdep1; } if ($crew['crewbank'] >= $crew['crewmax'] and 0 > $crewdep) { $crewdep = 0; } ?> <p align="center"><b>Max Deposit:</b> $<?php echo commas($crewdep); ?> <a href="?crewdeposit=1&amount=<?php echo round($crewdep); ?> ">[Deposit Max]</a></p><br> <p align="center">$<input type="text" size="8" name="amount"> <input type="hidden" value="Deposit" name="crewdeposit"> <input type="submit" value="Deposit"> </tr> </table> </td> </tr> </center>
} elseif ($time == 3) { $formtime = time() + 60 * 60; } mysql_query("insert into `cactive` (crewid,leader,message,defcrew,joinatk,dmg,start,launch) values ('{$stat['crew']}','{$stat['id']}','{$message}','{$target}','5','0',UNIX_TIMESTAMP(),'{$formtime}')") or die("Can not create crew raid"); mysql_query("update `players` set `attacks`=`attacks`-'20' where id='{$stat['id']}'") or die("Attacks not taken away(Crew Raid)"); $formed = mysql_fetch_array(mysql_query("select * from `cactive` where `leader`='{$stat['id']}' and `active`='Y'")); mysql_query("insert into `cjoinraid` (plid,crewraid,raid,dmg) values ('{$formed['leader']}','{$stat['crew']}','{$formed['crewrid']}','0')") or die("Cannot join raid"); header("Location: cjoinraid.php?raidid={$formed['crewrid']}"); } ?> <form method="post"> <meta http-equiv="Content-Language" content="en-us"> <div align="center"> <center> <p><b>Attack Turns:</b> <?php echo commas($stat['attacks']); ?> </p> </center> </div> <div align="center"> <p><b>Forming Raid on</b><select size="1" name="target"> <?php $crewfr = mysql_query("select emy,emy1,crewid,name from crewenemy join crew on emy1=crewid where emy='{$stat['crew']}'"); while ($crewform = mysql_fetch_array($crewfr)) { ?> <option value="<?php $crewform['crewid']; ?> "><?php $crewform['name'];
if ($patkcap == $atklimit) { ?> <font color=white><?php $crewlist['username']; ?> </font><?php } else { $crewlist['username']; } ?> </a></td> <td align="center" bgcolor="#0E0E17"><font color="<?php $color; ?> "><?php echo commas($crewlist['power']); ?> </font></td> <td bgcolor="#0E0E17"><?php $crewlist['reason']; ?> </td> <td bgcolor="#0E0E17"><?php $crewlist['hits']; ?> </td> <td bgcolor="#0E0E17"><a href="profile.php?id=<?php $lister['id']; ?> "><?php $lister['username'];
$search1['aph1']; ?> Attacks Per Hour<br><?php } if ($search1['income1'] > 0) { echo commas($search1['income1']); ?> % Income<br><?php } if ($search1['maxatk'] > 0) { echo commas($search1['maxatk']); ?> Max Attacks<br><?php } if ($search1['atkcap'] > 0) { echo commas($search1['atkcap']); ?> Attack Cap<br><?php } ?> ')"; ONMOUSEOUT="writetxt(0)"> <a href="tradeoffer.php?tid=<?php $search1['id']; ?> "><?php $search1['name']; ?> </font></a></td> </tr> <?php }
?> <tr> <form method="post" onSubmit="return confirmSubmit(this)"> <td align="left" valign="top"><a href="javascript:preview(<?php $shop5['itemid']; ?> )"><?php $shop1['name']; ?> </a> </td> <td align="left" valign="top"><?php $shop1['qty']; ?> of this item</td> <td align="left" valign="top">$<?php echo commas(round($shop1['cost'] * (15 / 100))); ?> </td> <td align="left" valign="top"> <input type="text" size="8" name="qty"> <input type="hidden" value="<?php $shop1['itemid']; ?> " name="itemid"> <input type="submit" value="Sell" name="sell"> </td> </form> </tr> <?php } ?>
function raidattack() { global $raid; global $crewr1; global $crew; global $crewpow; global $mess; global $craid; global $c2atkdmg; global $sum2; global $sum3; global $sum4; global $sum5; global $sum6; global $sum7; global $c2atk; if ($craid['active'] == 'Y') { /* Crew 1 Inventory Damages */ $atkbonus2 = mysql_query("SELECT * FROM `crewinventory` where `owner`='{$craid['crewid']}'"); while ($atk1 = mysql_fetch_array($atkbonus2)) { $atkbonus3 = "SELECT `atk` FROM `crewshop` where `id`='{$atk1['itemid']}'"; $r2 = mysql_query($atkbonus3); while ($row2 = mysql_fetch_assoc($r2)) { $array2[] = $atk1['qty'] * $row2['atk']; $sum2 = 0; foreach ($array2 as $atkadd1) { $sum2 += $atkadd1; } } } $defbonus2 = mysql_query("SELECT * FROM `crewinventory` where `owner`='{$craid['crewid']}'"); while ($def1 = mysql_fetch_array($defbonus2)) { $defbonus3 = "SELECT `def` FROM `crewshop` where `id`='{$def1['itemid']}'"; $r3 = mysql_query($defbonus3); while ($row3 = mysql_fetch_assoc($r3)) { $array3[] = $def1['qty'] * $row3['def']; $sum3 = 0; foreach ($array3 as $defadd1) { $sum3 += $defadd1; } } } /* End */ /* Crew 2 Inventory Damages */ $atkbonus6 = mysql_query("SELECT * FROM `crewinventory` where `owner`='{$crewr1['crewid']}'"); while ($atk3 = mysql_fetch_array($atkbonus6)) { $atkbonus7 = "SELECT `atk` FROM `crewshop` where `id`='{$atk3['itemid']}'"; $r6 = mysql_query($atkbonus7); while ($row6 = mysql_fetch_assoc($r6)) { $array6[] = $atk3['qty'] * $row6['atk']; $sum6 = 0; foreach ($array6 as $atkadd3) { $sum6 += $atkadd3; } } } $defbonus6 = mysql_query("SELECT * FROM `crewinventory` where `owner`='{$crewr1['crewid']}'"); while ($def3 = mysql_fetch_array($defbonus6)) { $defbonus7 = "SELECT `def` FROM `crewshop` where `id`='{$def3['itemid']}'"; $r7 = mysql_query($defbonus7); while ($row7 = mysql_fetch_assoc($r7)) { $array7[] = $def3['qty'] * $row7['def']; $sum7 = 0; foreach ($array7 as $defadd3) { $sum7 += $defadd3; } } } /* End */ /* Crew 2 Damage */ $crew2 = mysql_query("select * from players where crew='{$crewr1['crewid']}'") or die(mysql_error()); while ($crew2d = mysql_fetch_array($crew2)) { $itemattack1 = mysql_fetch_array(mysql_query("select CAST(SUM(atk) as signed) as attack from iteminv where owner='{$crew2d['id']}' and status='E'")); $itemdefense1 = mysql_fetch_array(mysql_query("select CAST(SUM(def) as signed) as defense from iteminv where owner='{$crew2d['id']}' and status='E'")); /* Set bonus */ $setamul1 = 1; $setdmul1 = 1; $hotdog = mysql_num_rows(mysql_query("select * from iteminv where `owner`='{$crew2d['id']}' and `set`='1' and `status`='E'")); if ($hotdog == '8') { $setamul1 = 1.2; $setdmul1 = 1.2; } /* End */ /* Attack */ $atkbonus4 = mysql_query("SELECT * FROM `inventory` where `owner`='{$crew2d['id']}'") or die(mysql_error()); while ($atk2 = mysql_fetch_array($atkbonus4)) { $atkbonus5 = "SELECT `atk` FROM `shop` where `sid`='{$atk2['itemid']}'"; $r4 = mysql_query($atkbonus5) or die(mysql_error()); while ($row4 = mysql_fetch_assoc($r4)) { $array4[] = $atk2['qty'] * $row4['atk'] * $setamul1; $sum4 = 0; foreach ($array4 as $atkadd2) { $sum4 += $atkadd2; } } } /* Defense */ $defbonus4 = mysql_query("SELECT * FROM `inventory` where `owner`='{$crew2d['id']}'"); while ($def2 = mysql_fetch_array($defbonus4)) { $defbonus5 = "SELECT `def` FROM `shop` where `sid`='{$def2['itemid']}'"; $r5 = mysql_query($defbonus5); while ($row5 = mysql_fetch_assoc($r5)) { $array5[] = $def2['qty'] * $row5['def'] * $setdmul1; $sum5 = 0; foreach ($array5 as $defadd2) { $sum5 += $defadd2; } } } unset($array4); unset($array5); $c2atk1[] = ($sum4 + $itemattack1['attack'] + $sum6) * 3; $c2atk = 0; foreach ($c2atk1 as $addatk2) { $c2atk += $addatk2; } } if ($craid['active'] == 'Y') { $clicks1 = mysql_fetch_array(mysql_query("select id,SUM(power) as power1 from players where crew='{$crewr1['crewid']}' group by id")); $c2clicks = $clicks1['power1'] * 10; $mypowerc2 = ($c2atk + $c2clicks) * $setamul1; if ($mypowerc2 > 2147483647) { $c2atkdmg = $mypowerc2; } else { $c2atkdmg = mt_rand($mypowerc2 / 1.09, $mypowerc2); } if ($c2atkdmg < 5000) { $c2atkdmg = mt_rand(5000, 6000); } mysql_query("update `cactive` set dmg='{$c2atkdmg}' where crewrid='{$craid['crewrid']}'"); } /* End */ /* Crew 1 Player Damages */ $raidjoin = mysql_query("select * from cjoinraid where raid={$raid}"); while ($raidjoin1 = mysql_fetch_array($raidjoin)) { $player = mysql_query("select * from players where id='{$raidjoin1['plid']}'"); while ($play = mysql_fetch_array($player)) { $itemattack = mysql_fetch_array(mysql_query("select CAST(SUM(atk) as signed) as attack from iteminv where owner={$raidjoin1['plid']} and status='E'")); $itemdefense = mysql_fetch_array(mysql_query("select CAST(SUM(def) as signed) as defense from iteminv where owner={$raidjoin1['plid']} and status='E'")); $atkbonus = mysql_query("SELECT * FROM `inventory` where `owner`='{$raidjoin1['plid']}'"); while ($atk = mysql_fetch_array($atkbonus)) { $atkbonus1 = "SELECT `atk` FROM `shop` where `sid`='{$atk['itemid']}'"; $r = mysql_query($atkbonus1); while ($row = mysql_fetch_assoc($r)) { $array[] = $atk['qty'] * $row['atk']; $sum = 0; foreach ($array as $atkadd) { $sum += $atkadd; } } } $defbonus = mysql_query("SELECT * FROM `inventory` where `owner`='{$raidjoin1['plid']}'"); while ($def = mysql_fetch_array($defbonus)) { $defbonus1 = "SELECT `def` FROM `shop` where `sid`='{$def['itemid']}'"; $r1 = mysql_query($defbonus1); while ($row1 = mysql_fetch_assoc($r1)) { $array1[] = $def['qty'] * $row1['def']; $sum1 = 0; foreach ($array1 as $defadd) { $sum1 += $defadd; } } } unset($array); unset($array1); /* End */ $cbombmulti = 1; $setamul = 1; $setdmul = 1; $hotdog1 = mysql_num_rows(mysql_query("select * from iteminv where owner='{$raidjoin1['plid']}' and `set`='1' and status='E'")); if ($hotdog1 == '8') { $setamul = 1.2; $setdmul = 1.2; } $joincount = mysql_num_rows(mysql_query("select * from cjoinraid where raid={$raid}")); $mypower1 = (($sum + $itemattack['attack'] + $sum2) * 3 + $play['power'] * 10) * $setamul * $cbombmulti; if ($mypower1 > 2147483647) { $atkdmg = $mypower1; } else { $atkdmg = mt_rand($mypower1 / 1.09, $mypower1); } if ($atkdmg < 5000) { $atkdmg = mt_rand(5000, 6000); } mysql_query("update `cjoinraid` set dmg='{$atkdmg}' where plid='{$raidjoin1['plid']}' and raid='{$craid['crewrid']}'"); } } } $mess = 0; echo "<br><p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue> <b>{$crew['name']}</b></font> Has just Attacked <font color=red><b>{$crewr1['name']}</b></font></p><br><br>"; $mess++; $raidjoin = mysql_query("select * from cjoinraid where raid={$raid}"); while ($raidjoin1 = mysql_fetch_array($raidjoin)) { $player = mysql_query("select * from players where id='{$raidjoin1['plid']}'"); while ($play = mysql_fetch_array($player)) { $atkdmg = commas($raidjoin1['dmg']); $crewpow1[] = $raidjoin1['dmg']; if ($craid['active'] == 'Y') { $defpow1[] = $sum1 + $itemdefense['defense'] * 3 * $setdmul; $clickpow1[] = $play['power'] * 10; } echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$play['username']}</b></font> attacks for <font color=lightgreen><b>{$atkdmg}</b></font> damage! </p> <br><br><br>"; $mess++; $crewpow = 0; foreach ($crewpow1 as $add) { $crewpow += $add; } if ($craid['active'] == 'Y') { $defpow = 0; foreach ($defpow1 as $defpow2) { $defpow += $defpow2; } $clickpow = 0; foreach ($clickpow1 as $clickpow2) { $clickpow += $clickpow2; } } } } echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}</b></font> has hit for <font color=lightgreen><b>", commas($crewpow), "</b></font> damage! </p> <br><br><br>"; $mess++; if ($crew1up['coves'] > 0 and $adv1['active'] == 'Y') { $cover = mt_rand(1, 2); if ($cover == '2') { $coves = $defdmg * ($crew1up['coves'] / 100); echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}</b></font> <font color=red><b>Coves</b></font> fends off <font color=lightgreen><b>", commas($coves), "</b></font> damage! </p> <br><br><br>"; $mess++; mysql_query("update cactive set coves='{$coves}' where adid={$raid}"); $defdmg = $defdmg - $coves; } } $craid = mysql_fetch_array(mysql_query("select * from cactive where crewrid={$raid}")); $c2atkdmg = $craid['dmg']; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=red><b>{$crewr1['name']}</b></font> attacks <font color=lightblue><b>{$crew['name']}</b></font> for <font color=red><b>", commas($c2atkdmg), "</b></font> damage!<br></p>"; $mess++; }
$stat1 = mysql_fetch_array(mysql_query("select username from players where id='{$cash['player']}'")); ?> <tr> <td><?php echo date("m/d/Y - h:i:sa", $cash['time']); ?> </td> <td><a href="profile.php?id=<?php $cash['player']; ?> "><?php $stat1['username']; ?> </a></td> <td>$<?php echo commas($cash['cash']); ?> </td> </tr> <?php } ?> </td> </tr> </table> <?php } else { ?> <br> <div align=center>
$income = "+ " . commas($item['income']) . " Income<br>"; } else { $income = ""; } if ($item['maxatk'] > 0) { $maxatk = "+ " . commas($item['maxatk']) . " Max Attacks<br>"; } else { $maxatk = ""; } if ($item['atkcap'] > 0) { $atkcap = "+ " . commas($item['atkcap']) . " Attack Cap<br>"; } else { $atkcap = ""; } if ($item['critical'] > 0) { $crit = "+ " . commas($item['critical']) . " Critical<br>"; } else { $crit = ""; } echo "<center><br><br><br><table width=300 height=200 border=1 style=\"border-collapse: collapse\" background=/images/bg.jpg><tr><td width=300 align=center colspan=2><b>{$item['name']}</b></td></tr><tr><td valign=top><font size=2>" . "<b>[{$trade}]</b><br>{$atk} {$def} {$income} {$cph} {$aph} {$maxatk} {$atkcap} {$crit}</font></td><td align=center valign=top><img border=1 src=/images/items/{$item['pic']}><br>{$gemimage}</td></tr></table>"; if ($item['owner'] == $stat['id']) { ?> <form method="post"> <input type="hidden" name="itemid" value="<?php $item['itemid']; ?> "> <input type="submit" name="don" value="Donate"> </form> <?php $pcheck = mysql_query("SELECT shopid FROM `pshop` WHERE `owner`='{$stat['id']}'");
<TD align="center" valign="center" width=20%> <a href="itembuy.php?pitemid=<?php $shop1['itemid']; ?> "><img src="images/items/<?php $shop1['pic']; ?> " <?php $itemlay->basiclayout(1); ?> border="1"></a><br><b><?php $shop1['name']; ?> </b><br>Cost: <?php echo commas($shop1['amount']); ?> points</TD> <?php if ($itemtrcount == $itemtrcount1) { $itemtrcount1 += 5; ?> </tr><tr><?php } else { } $itemtrcount += 1; } } ?> </tr>
</td> <td onmouseover="ddrivetip('<table bgcolor=black width=200><tr><td align=center colspan=2><b>Financial Summary</b></td></tr><tr><td><b>Gold Next Turn:</b></td><td> <?php echo commas($user->_income); ?> Gold</td></tr><tr><td><b>Outrage Bank:</b></td><td><?php echo commas($user->bank); ?> </td></tr><tr><td><b>World Bank:</b></td><td><?php echo commas($user->wbank); ?> </td></tr></table>')" onmouseout="hideddrivetip()" style="padding-left:5px;padding-right:5px;text-align:center;vertical-align:middle;"> <div style="color:#FFFFFF;background-color:#000000;padding-left:2px;padding-right:2px;border:2px inset;cursor:default;"> <b>Gold:</b> <?php echo commas($user->gold); ?> </div> </td> <td onclick="toggleBackpack(null,<?php echo $stat['id']; ?> );" onmouseover="ddrivetip('Click to View Your Backpack')" onmouseout="hideddrivetip()" style="padding-left:5px;padding-right:5px;text-align:center;vertical-align:middle;cursor:default;"> <img border="0" src="images/bp.gif" width="26" height="25" hspace="2"> </td> </tr> </table> </td> </tr> </table>
function raidattack() { global $raid; global $adv; global $crew; global $crewpow; global $mess; global $adv1; global $defdmg; $mess = 0; echo "<br><p align=center class=style54 id=message_{$mess} style=visibility:hidden> <font color=lightblue><b>{$crew['name']}</b></font> Has just Attacked <font color=red><b>{$adv['name']}</b></font></p><br><br>"; $mess++; $raidjoin = mysql_query("select * from ljoinraid where raid={$raid}"); while ($raidjoin1 = mysql_fetch_array($raidjoin)) { $player = mysql_query("select * from players where id='{$raidjoin1['plid']}'"); while ($play = mysql_fetch_array($player)) { $atkdmg = commas($raidjoin1['dmg']); echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$play['username']}</b></font> attacks for <font color=lightgreen><b>{$atkdmg}</b></font> damage! </p> <br><br>"; $mess++; } } $cpow = mysql_fetch_array(mysql_query("select SUM(dmg) as damage from ljoinraid where raid={$raid}")); $crewpow = $cpow['damage']; if ($adv1['warlords'] > 0) { $warlords = $adv1['warlords'] / 100 * $crewpow; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}</b></font> <font color=red><b>Warlords</b></font> add an additional <font color=lightgreen><b>", commas($warlords), "</b></font> damage! </p> <br><br>"; $mess++; $crewpow = $crewpow + $warlords; } if ($adv1['bomb'] > 0) { if ($adv1['bomb'] == 1) { $bomb = 0.2; $bombid = 19; } if ($adv1['bomb'] == 2) { $bomb = 0.4; $bombid = 20; } if ($adv1['bomb'] == 3) { $bomb = 0.6; $bombid = 21; } if ($adv1['bomb'] == 4) { $bomb = 0.8; $bombid = 22; } if ($adv1['bomb'] == 5) { $bomb = 1.0; $bombid = 23; } $bombname = mysql_fetch_array(mysql_query("select name from crewshop where `id`='{$bombid}'")); $bombpow = $crewpow * $bomb; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}</b></font> fires a <font color=greenblue><b>{$bombname['name']}</b></font> at <font color=red><b>{$adv['name']}</b></font>!!!!</p> <br><br>"; $mess++; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}'s</b></font> <font color=greenblue><b>{$bombname['name']}</b></font> adds an additional <font color=lightgreen><b>", commas($bombpow), "</b></font> damage! </p> <br><br>"; $mess++; $crewpow = $crewpow + $bombpow; } echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=lightblue><b>{$crew['name']}</b></font> has hit for <font color=lightgreen><b>", commas($crewpow), "</b></font> damage! </p> <br><br>"; $mess++; if ($adv1['coves'] > 0) { $coves = $adv1['coves'] / 100 * $adv1['dmg']; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><b>{$crew['name']}</b> <font color=red><b>Coves</b></font> fends off <font color=lightgreen><b>", commas($coves), "</b></font> damage! </p> <br><br>"; $mess++; } $defdmg = $adv1['dmg']; echo "<p align=center class=style54 id=message_{$mess} style=visibility:hidden><font color=red><b>{$adv['name']}</b></font> attacks <font color=lightblue><b>{$crew['name']}</b></font> for <font color=red><b>", commas($defdmg), "</b></font> damage!<br></p>"; $mess++; }
function ranks() { ?> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" align=center> <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" align=center> <tr> <td colspan="3"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" align=center> <tr> <td align="center"> <a href=top50.php><img border="0" src="images/standings.jpg"></a> </td> <tr> <td width="100%" colspan="3" bgcolor="#404040"> <img border="0" src="images/spacer_trans.gif" width="1" height="1"></td> </tr> <tr> <td width="100%" colspan="3"> <table border="0" cellpadding="10" cellspacing="0" style="border-collapse: collapse" width="100%"> <tr> <td width="33%" align="left" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><b><u> Top 10 Most Ruthless Gangsters </u></b></td></tr> <tr><td align=center></td></tr> <?php $t = "select * from players where membership < '3' and class='2' order by exp desc limit 10"; $tsel = mysql_query($t) or die(mysql_error()); $rank = 1; while ($top = mysql_fetch_array($tsel)) { $topid = $top["id"]; $topuser = $top["username"]; $toppower = commas($top["exp"]); echo "<tr><td>{$rank}. <a href=profile.php?id={$topid}>{$topuser}</a></td><td><font size=1.7>{$toppower} Thugs</font></td></tr>"; $rank += 1; } ?> </table></td> <td width="33%" align="left" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><b><u>Top 10 Powerful Swat Officers</u></b></td></tr> <?php $t4 = "select * from players where membership < 3 and class=3 order by exp desc limit 10"; $tsel4 = mysql_query($t4) or die(mysql_error()); $rank4 = 1; while ($top4 = mysql_fetch_array($tsel4)) { $topid4 = $top4["id"]; $topuser4 = $top4["username"]; $toppower2 = commas($top4["exp"]); echo "<tr><td>{$rank4}. <a href=profile.php?id={$topid4}>{$topuser4}</a></td><td><font size=1.7>{$toppower2} Swat Team</font></td></tr>"; $rank4 += 1; } ?> </table></td> <td width="33%" align="left" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><b><u>Top 10 Most Raging Monsters</u></b></td></tr> <?php $t2 = "select * from players where membership < 3 and class=1 order by exp desc limit 10"; $tsel2 = mysql_query($t2) or die(mysql_error()); $rank2 = 1; while ($top2 = mysql_fetch_array($tsel2)) { $topid2 = $top2["id"]; $topuser2 = $top2["username"]; $toppower1 = commas($top2["exp"]); echo "<tr><td>{$rank2}. <a href=profile.php?id={$topid2}>{$topuser2}</a></td><td><font size=1.7>{$toppower1} Anger</font></td></tr>"; $rank2 += 1; } ?> </table></td> </tr> </table> </td> </tr> <tr> <td width="100%" colspan="3" bgcolor="#404040"> <img border="0" src="images/spacer_trans.gif" width="1" height="1"></td> </tr> <tr> <td width="100%" colspan="2"> <table border="0" cellpadding="10" cellspacing="0" style="border-collapse: collapse" width="100%"> <tr> <td width="50%" align="left" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><b><u>Top 10 Biggest Crews</u></b></td></tr> <?php $rank6 = 1; $crenum = mysql_query("select `crewid`,`name`,count(*) as totalmembers from `crew` join `players` on `crewid`=`crew` group by crewid order by totalmembers desc limit 10 ") or die(mysql_error()); while ($crew1 = mysql_fetch_array($crenum)) { ?> <tr><td><?php echo $rank6; ?> . <a href=crewprofile.php?id=<?php echo $crew1['crewid']; ?> ><?php $crew1['name']; ?> </a></td><td><?php echo $crew1['totalmembers']; ?> Members</td></tr><?php $rank6 += 1; } ?> </table></td> <td width="50%" align="left" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><b><u>Top 10 Most Powerful Crews</u></b></td></tr> <?php $rank7 = 1; $crewpow = mysql_query("select `crewid`,`name`,SUM(`exp`) as exp from `crew` join `players` on `crewid`=`crew` where membership < 3 group by crewid order by exp desc limit 10 ") or die(mysql_error()); while ($crewpower = mysql_fetch_array($crewpow)) { $crewpower1 = commas($crewpower['exp']); ?> <tr><td><?php echo $rank7; ?> . <a href=crewprofile.php?id=<?php echo $crewpower['crewid']; ?> ><?php echo $crewpower['name']; ?> </a></td><td><?php echo $crewpower1; ?> exp</td></tr><?php $rank7 += 1; } ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <?php }
function postitemdata() { $this->itemid = $this->retidata['itemid']; $this->owner = $this->retidata['owner']; $this->name = addslashes($this->retidata['name']); $this->slot = $this->retidata['slot']; $this->set = $this->retidata['set']; $this->gem = $this->retidata['gem']; if ($this->gem == 0) { $this->gemimage = "<img src=\\'images/gemslot.jpg\\'> <img src=\\'images/gemslot.jpg\\'><br> <img src=\\'images/gemslot.jpg\\'> <img src=\\'images/gemslot.jpg\\'>"; } if ($this->gem == 1) { $this->gemimage = "<img src=\\'images/gem.jpg\\'> <img src=\\'images/gemslot.jpg\\'><br> <img src=\\'images/gemslot.jpg\\'> <img src=\\'images/gemslot.jpg\\'><br>"; } if ($this->gem == 2) { $this->gemimage = "<img src=\\'images/gem.jpg\\'> <img src=\\'images/gem1.jpg\\'><br> <img src=\\'images/gemslot.jpg\\'> <img src=\\'images/gemslot.jpg\\'><br>"; } if ($this->gem == 3) { $this->gemimage = "<img src=\\'images/gem.jpg\\'> <img src=\\'images/gem1.jpg\\'><br> <img src=\\'images/gem2.jpg\\'> <img src=\\'images/gemslot.jpg\\'><br>"; } if ($this->gem == 4) { $this->gemimage = "<img src=\\'images/gem.jpg\\'> <img src=\\'images/gem1.jpg\\'><br> <img src=\\'images/gem2.jpg\\'> <img src=\\'images/gem3.jpg\\'><br>"; } $this->trade = $this->retidata['trade']; if ($this->trade == 'Y') { $this->trade = "Non-binding"; } else { $this->trade = "Soul Bound"; } if ($this->slot == 'Q') { $this->itemtype = ", Quest Item"; } elseif ($this->slot == '1') { $this->itemtype = ", Inventory"; } elseif ($this->slot == '2') { $this->itemtype = ", Reagent"; } else { $this->itemtype = ""; } if ($this->retidata['hp'] > 0) { $this->hp = "+ " . commas($this->retidata['hp']) . " Hit Points<br>"; } else { $this->hp = ""; } if ($this->retidata['atk'] > 0) { $this->atk = "+ " . commas($this->retidata['atk']) . " Attack<br>"; } else { $this->atk = ""; } if ($this->retidata['cph'] > 0) { $this->cph = "+ " . commas($this->retidata['cph']) . " Clicks per turn<br>"; } else { $this->cph = ""; } if ($this->retidata['aph'] > 0) { $this->aph = "+ " . commas($this->retidata['aph']) . " Attacks per turn<br>"; } else { $this->aph = ""; } if ($this->retidata['income'] > 0) { $this->income = "+ " . commas($this->retidata['income']) . " Income<br>"; } else { $this->income = ""; } if ($this->retidata['maxatk'] > 0) { $this->maxatk = "+ " . commas($this->retidata['maxatk']) . " Max Attacks<br>"; } else { $this->maxatk = ""; } if ($this->retidata['atkcap'] > 0) { $this->atkcap = "+ " . commas($this->retidata['atkcap']) . " Attack Cap<br>"; } else { $this->atkcap = ""; } if ($this->retidata['crit'] > 0) { $this->crit = "+ " . commas($this->retidata['crit']) . "% to Critical Hit<br>"; } else { $this->crit = ""; } if ($this->retidata['block'] > 0) { $this->block = "+ " . commas($this->retidata['block']) . "% to Block<br>"; } else { $this->block = ""; } $this->pic = $this->retidata['pic']; }
$item3['aph']; ?> Attacks Per Hour<br><?php } if ($item3['income'] > 0) { echo commas($item3['income']); ?> % Income<br><?php } if ($item3['maxatk'] > 0) { echo commas($item3['maxatk']); ?> Max Attacks<br><?php } if ($item3['atkcap'] > 0) { echo commas($item3['atkcap']); ?> Attack Cap<br><?php } ?> ')"; ONMOUSEOUT="hideddrivetip()"><?php $item3['name']; ?> </a> </td> <td> <input type="checkbox" name="items[]" value="<?php $item3['itemid']; ?> "></td> </tr> <?php }
?> <tr> <form method="post"> <td align="left" valign="top"><a href="javascript:preview(<?php $shop1['itemid']; ?> )"><?php $shop1['name']; ?> </a> </td> <td align="left" valign="top"><?php $shop1['qty']; ?> of this item</td> <td align="left" valign="top">$<?php echo commas(round($shop1['cost'] * ($stat['sellrate'] / 100))); ?> </td> <td align="left" valign="top"> <input type="text" size="8" name="qty"> <input type="hidden" value="<?php $shop1['itemid']; ?> " name="itemid"> <input type="hidden" value="Sell" name="sell"> <input type="submit" value="Sell" name="sell"> </td> </form> </tr> <?php }
<tr><form method="post"> <td align="left" valign="top"><a href="#" ONMOUSEOVER="ddrivetip('<?php $shop5['name']; ?> <br><br>Defense: <?php echo commas($shop5['def']); ?> <br>Max Qty: <?php $shop5['qtymax']; ?> ')"; ONMOUSEOUT="hideddrivetip()"><?php $shop5['name']; ?> </a></td> <td align="left" valign="top">$<?php echo commas($costd); ?> </td> <td align="left" valign="top"> <input type="text" size="8" name="qty"> <input type="hidden" value="<?php $shop5['id']; ?> "" name="itemid"> <input type="submit" value="Buy" name="buy"></td> </tr> </form><?php } ?>
<p align="center"><b>Change Rank</b></td> </tr> <tr> <td width="100%"> <table border="0" cellpadding="10" cellspacing="0" style="border-collapse: collapse" width="100%"> <tr> <td width="100%"> <p align="center"><b>Name: </b><a href="profile.php?id=<?php $id['id']; ?> "><?php $id['username']; ?> </a></p> <p align="center"><b>Power:</b> <?php echo commas($id['power']); ?> </p> <p align="center"><b>Current Rank:</b><?php if ($id['crewrank'] == 1) { echo $crew['rank1']; } if ($id['crewrank'] == 2) { echo $crew['rank2']; } if ($id['crewrank'] == 3) { echo $crew['rank3']; } if ($id['crewrank'] == 4) { echo $crew['rank4']; }
<?php $ranksn = mysql_query("select * from cnranks where owner='$id[crewid]' order by rid"); while($ranksn1 = mysql_fetch_array($ranksn)){ $ranks = mysql_query("select * from players where crew='$id[crewid]' and crewrank='$ranksn1[rid]'"); while ($ranks1 = mysql_fetch_array($ranks)){ $ranksid = $ranks1["id"]; $ranksuser = $ranks1["username"]; $ranksrank = $ranksn1["rname"]; $rankspower = $ranks1["power"]; ?> <tr> <td bgcolor="#191818"><a href="profile.php?id=<?php echo ($ranksid); ?>"><?php echo ($ranksuser); ?></a></td> <td align="center" bgcolor="#191818"><?php echo ($ranksn1['rname']); ?></td> <td align="center" bgcolor="#191818"><?php echo commas($rankspower); ?></td> <td align="center" bgcolor="#191818"><font color=<?php if (time() >= $ranks1['lastlogin']+60*60*24*7){?>red<? }else{?>lightblue<?}?>><?php echo date("m/d/Y - h:i:sa",$ranks1['lastlogin'])?></font></td> <td bgcolor="#191818"> <?php if ($stat['id'] != $ranksid) { if ($stat['crewrank'] <= $per['boot']) {?><a href="bootmember.php?id=<?php echo ($ranksid); ?>">Boot Member</a><?php }}?> </td> </tr> <?php }}?> </table> </center> </table> <?php } else { echo "<br> <div align=center> <center> <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF> <tr>
?> <br>Defense: <?php echo commas($shop7['def']); ?> <br>Max Qty: <?php $shop7['qtymax']; ?> <br>You can buy: <?php $miqty2; ?> ')"; ONMOUSEOUT="hideddrivetip()"><?php $shop7['name']; ?> </a></td> <td width="18%" align="left" valign="top"><?php echo commas($shop7['cost']); ?> gold</td> <td width="37%" align="left" valign="top"> <input type="text" size="8" name="qty" value=<?php $shop7['qtymax'] - $qmax3['qty']; ?> > <input type="hidden" value="<?php $shop7['sid']; ?> " name="itemid"> <input type="hidden" name="popcode" value=""> <input type="hidden" name="buy" value="Buy"> <input type="submit" value="Buy" name="buy"></td>
<td><b>Awarded To</b></td> <td><b>Awarded By</b></td> <td><b>Current Owner</b></td> </tr> <?php $log = mysql_query("select * from awardlog where crewid='$stat[crew]' order by time desc limit $start,50"); while($alog = mysql_fetch_assoc($log)){ $item = mysql_fetch_assoc(mysql_query("select * from iteminv where itemid='$alog[item]'")); $owner = mysql_fetch_assoc(mysql_query("select id,username from players where id='$item[owner]'")); $reciever = mysql_fetch_assoc(mysql_query("select id,username from players where id='$alog[reciever]'")); $giver = mysql_fetch_assoc(mysql_query("select * from players where id='$alog[giver]'")); ?> <tr> <td><?php echo date("m/d/Y - h:i:sa",$alog['time']);?></td> <td><?php if(!$item){?>Deleted item<?}else{?><a href="#" ONMOUSEOVER="ddrivetip('<?php if (($item['sell'] == 'N') or ($item['trade'] == 'N')){?>[<?php }?><?php if ($item['trade'] == 'N'){?>No Trade<?}?><?php if (($item['sell'] == 'N') and ($item['trade'] == 'N')){?>, <?php }?><?php if ($item['sell'] == 'N'){?>No Sell<?}?><?php if (($item['sell'] == 'N') or ($item['trade'] == 'N')){?>]<?php }?><br><?php if($item['gem'] == '1'){?><img src=\'/images/gem.jpg\'><?php }?> <?php if($item['gem'] == '2'){?><img src=\'/images/gem.jpg\'> <img src=\'/images/gem1.jpg\'><?php }?> <?php if($item['gem'] == '3'){?><img src=\'/images/gem.jpg\'> <img src=\'/images/gem1.jpg\'> <img src=\'/images/gem2.jpg\'> <?php }?><?php if($item['gem'] == '4'){?><img src=\'/images/gem.jpg\'> <img src=\'/images/gem1.jpg\'> <img src=\'/images/gem2.jpg\'> <img src=\'/images/gem3.jpg\'><?php }?><br><?php if ($item['atk'] > 0){?><?php echo commas($item['atk']);?> Attack<br><?php }?><?php if ($item['def'] > 0){?><?php echo commas($item['def']);?> Defense<br><?php }?><?php if ($item['cph'] > 0){?><?php $item['cph'];?> Clicks Per Hour<br><?php }?><?php if ($item['aph'] > 0){?><?php $item['aph'];?> Attacks Per Hour<br><?php }?><?php if ($item['income'] > 0){?><?php echo commas($item['income']);?>% Income<br><?php }?><?php if ($item['maxatk'] > 0){?><?php echo commas($item['maxatk']);?> Max Attacks<br><?php }?><?php if ($item['atkcap'] > 0){?><?php echo commas($item['atkcap']);?> Attack Cap<br><?php }?>')"; ONMOUSEOUT="hideddrivetip()"><?php $item['name'];?></a><?php }?></td> <td><a href="profile.php?id=<?php $reciever['id'];?>"><?php $reciever['username'];?></a></td> <td><a href="profile.php?id=<?php $giver['id'];?>"><?php $giver['username'];?></a></td> <td><a href="profile.php?id=<?php $owner['id'];?>"><?php $owner['username'];?></a></td> </tr> <?php }?> </table> </center> <?php } else { echo "<br> <div align=center> <center> <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF> <tr> <td width=100% bgcolor=#666666>
$offer1['aph']; ?> Attacks Per Hour<br><?php } if ($offer1['income'] > 0) { echo commas($offer1['income']); ?> % Income<br><?php } if ($offer1['maxatk'] > 0) { echo commas($offer1['maxatk']); ?> Max Attacks<br><?php } if ($offer1['atkcap'] > 0) { echo commas($offer1['atkcap']); ?> Attack Cap<br><?php } ?> ')"; ONMOUSEOUT="hideddrivetip()"><?php $offer1['name']; ?> </a> <br> <?php } ?> <?php $point = mysql_fetch_array(mysql_query("select points from tradepropose where tradeid='{$id}'")); if ($point['points'] > 0) {