Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
universe:earth:officers3 [ 9 Feb 2008 21:45] jamesuniverse:earth:officers3 [20 Apr 2011 13:04] (current) – and then added the semi-colon! james
Line 4: Line 4:
  
 // 11 work out how many applicants.  // 11 work out how many applicants. 
-$apps = rand (6,200);+$apps = rand (20,60);
  
 // set up some arrays as lookups for the values from the d10 rolls // set up some arrays as lookups for the values from the d10 rolls
 $prev = array ("Pilot", "Astronaut", "Pacifier Pilot", "Command", "Astronaut", "Technical", "Legal", "Medical", "Logistics", "Marine"); $prev = array ("Pilot", "Astronaut", "Pacifier Pilot", "Command", "Astronaut", "Technical", "Legal", "Medical", "Logistics", "Marine");
-$crim = array ("Small Ship", "Capital Ship", "Logs Ship", "Shipyard", "Training", "Port Staff", "Special Duties", "Staff","Staff", "Naval Academy", "Command", "Command", "Admiralty", "Command");+$crim = array ("Colonial Fleet", "Battle Fleet", "Fleet Support", "Naval Staff", "Training", "Port Staff", "Special Duties", "Shipyard", "Naval Staff", "Naval Academy", "Command", "Command", "Admiralty", "Command");
 $refs = array ("Poor", "Guarded", "Guarded", "Guarded", "Average", "Good", "Good", "Good", "Excellent", "Excellent"); $refs = array ("Poor", "Guarded", "Guarded", "Guarded", "Average", "Good", "Good", "Good", "Excellent", "Excellent");
-$Ranks = array ("Ensign", "Lieutenant", "Lt.Commander", "Commander", "Captain", "Rear Admiral", "Vice Admiral", "Admiral of the White", "Admiral of the Black","Grand Admiral");+$Ranks = array ("Ensign", "Lieutenant", "Lt.Commander", "Commander", "Captain", "Flag Captain", "Rear Admiral", "Vice Admiral", "Admiral of the White", "Admiral of the Black","Grand Admiral");
  
 // set up a table inside a form so that the chosen applicants can be taken forwards to the next stage.  // set up a table inside a form so that the chosen applicants can be taken forwards to the next stage. 
Line 20: Line 20:
        <tr> \n        <tr> \n
          <td><b>Last 4 \n          <td><b>Last 4 \n
-         <td><b>Rank \n+         <td><b>Current Rank \n
          <td><b>Firstname \n          <td><b>Firstname \n
          <td><b>Surname \n          <td><b>Surname \n
          <td><b>Branch \n          <td><b>Branch \n
-         <td><b>Location \n +         <td><b>Current Location \n 
-         <td><b>Posting \n+         <td><b>New Posting \n
        </tr>";         </tr>"; 
 $appl=1; $appl=1;
Line 96: Line 96:
   {   {
     extract($row);     extract($row);
 +    $LastName = $Surname; 
 +    next($row);
  
 // then randomly take a firstname of the correct gender from the same list // then randomly take a firstname of the correct gender from the same list
Line 116: Line 118:
 // $FirstName = $names["FirstName"]; // $FirstName = $names["FirstName"];
 $last4 = $appl + rand (1000,9799); $last4 = $appl + rand (1000,9799);
-$promote = rand(0,25$rank;+$promote = $promote + 1 + $rank + rand (0,6)
 + 
 +if ($promote>35) 
 +     {$rank++; $promote=0;
 +$PQ = $Quadrant; 
 +$move = rand (0,10); 
 +if ($move>7)  
 +    { 
 +     if($PQ==0) {$PQ=rand(0,8);
 +     if($PQ>0) {$PQ = rand(0,1) * rand (0,8);
 +     }
  
-if ($promote>25) 
-     {$rank++;} 
  
 echo " echo "
Line 126: Line 136:
          <td>$Ranks[$rank] \n          <td>$Ranks[$rank] \n
          <td>$Forename \n          <td>$Forename \n
-         <td>$Surname \n+         <td>$LastName \n
          <td>$prev[$Experience] \n          <td>$prev[$Experience] \n
          <td>$Homeworld \n          <td>$Homeworld \n
-         <td>$crim[$CrimCheck] \n+         <td>$crim[$CrimCheck], Q$PQ \n
        </tr>";        </tr>";
  
Print/export
QR Code
QR Code Randomly Generated Officers (generated for current page)