} else { if ($probe > $sentry + 40) { $rand = rand(9, 11) / 10; $def = floor(calcDef($sid, $pid) * $rand); $report = 'Your probe report came back very positive. They report the estimated defensive capabilities are ' . $def . '. The estimated land remaining is ' . $land . '. This report is very accurate.'; } else { if ($probe > $sentry + 25) { $rand = rand(8, 12) / 10; $def = floor(calcDef($sid, $pid) * $rand); $report = 'Your probe report came back positive. They report the estimated defensive capabilities are ' . $def . '.'; } else { if ($probe > $sentry + 10) { $rand = rand(7, 13) / 10; $def = floor(calcDef($sid, $pid) * $rand); $report = 'Your probe report came back neutral. They report the estimated defensive capabilities are ' . $def . '. This report is somewhat uncertain.'; } else { $rand = rand(5, 15) / 10; $def = floor(calcDef($sid, $pid) * $rand); $report = 'Your probe report came back very vague. They report the estimated defensive capabilities are ' . $def . '. This report is very uncertain.'; } } } } echo $report; setFleetStat(report, $report, $sid, $fid); setFleetStat(probetime, -1, $sid, $fid); addNotification('Your scan of planet <a href="./planetdetails.php?id=' . $pid . '">' . getPlanetStat(name, $sid, $pid) . '</a> is complete. The results are <a href="./report.php?id=' . $fid . '">here</a>', $sid, getFleetStat(ownerid, $sid, $fid)); } } } }
$query = "SELECT id,name FROM planets{$sid} WHERE ownerid={$id} ORDER BY z ASC"; $result = @mysql_query($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $pid = $row[id]; $query2 = "SELECT endtime,shiptype FROM shipq{$sid} WHERE pid={$pid} AND ownerid={$id} ORDER BY endtime ASC"; $result2 = mysql_query($query2); $queuesize = mysql_num_rows($result2); if ($row2 = mysql_fetch_array($result2)) { $finish = $row2[endtime] - time(); $finish = max(0, $finish); echo '<tr> <td><a href="./name.php?id=' . $row[id] . '">' . $row[name] . '</a></td> <td>' . $queuesize . '</td> <td>' . getShipStat(name, $row2[shiptype]) . '</td> <td>' . $finish . '</td> <td>' . calcDef($sid, $row[id]) . '</td> <td><a href="./build.php?id=' . $row[id] . '">Build</a></td> </tr>'; } else { echo '<tr> <td><a href="./name.php?id=' . $row[id] . '">' . $row[name] . '</a></td> <td>0</td> <td>---</td> <td>---</td> <td>' . calcDef($sid, $row[id]) . '</td> <td><a href="./build.php?id=' . $row[id] . '">Build</a></td> </tr>'; } } echo '</table></div>'; include './footer.php';