本文整理汇总了PHP中commas函数的典型用法代码示例。如果您正苦于以下问题:PHP commas函数的具体用法?PHP commas怎么用?PHP commas使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了commas函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mob_attack_back
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();
}
}
示例2: commas
$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';
}
示例3: attack
//.........这里部分代码省略.........
$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;
}
}
}
示例4: include
<?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>
示例5: mysql_query
<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>";
示例6: mysql_query
<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
示例7: commas
?>
</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";
示例8: mysql_query
<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) {
示例9: commas
<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>
示例10: commas
</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>
示例11: elseif
} 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'];
示例12: commas
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'];
示例13: commas
$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
}
示例14: confirmSubmit
?>
<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
}
?>
示例15: raidattack
//.........这里部分代码省略.........
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++;
}