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(); } }
<td valign="top" align="center" colspan="2"> <?php if ($plbossr['time'] + 14400 > time()) { $titlecol = "red"; } else { $titlecol = "#FFFFFF"; } ?> <font size="3" color="<?php $titlecol; ?> "><b><?php $boss['name']; ?> </b> <?php echo convert2percent($spboss['curhp'] / $spboss['maxhp'] * 100); ?> / 100%</font><br><br> <img align="center" style="margin-bottom:5px;" src="images/world/bosses/<?php $boss['pic']; ?> "> <br><br> <?php $boss['desc']; ?> <br><br> </td> </tr> <tr>