Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| universe:earth:officers3 [ 9 Feb 2008 19:23] – james | universe: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 = 10; | + | $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 (" | $prev = array (" | ||
| - | $crim = array ("Dodgy", "Murky", "Minor Offences", "Minor Offences", "Clean", "Clean", "Clean", "Clean", "Clean", "Clean"); | + | $crim = array ("Colonial Fleet", "Battle Fleet", "Fleet Support", "Naval Staff", "Training", "Port Staff", "Special Duties", "Shipyard", "Naval Staff", "Naval Academy", |
| $refs = array (" | $refs = array (" | ||
| + | $Ranks = array (" | ||
| // 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 18: | Line 19: | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| - | <td>Firstname | + | < |
| - | < | + | < |
| - | < | + | < |
| - | < | + | < |
| - | < | + | < |
| - | < | + | < |
| - | < | + | |
| </ | </ | ||
| $appl=1; | $appl=1; | ||
| + | $rank=0; | ||
| // for each applicant then roll the various dice and then set the variables | // for each applicant then roll the various dice and then set the variables | ||
| do | do | ||
| Line 58: | Line 59: | ||
| $Homeworld=" | $Homeworld=" | ||
| $gen=rand(0, | $gen=rand(0, | ||
| - | if($gen > 5) | + | if($gen > 2) |
| { | { | ||
| // set the necessary connection variables to connect to MySQL | // set the necessary connection variables to connect to MySQL | ||
| Line 95: | 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 114: | Line 117: | ||
| // $sql2 = ' | // $sql2 = ' | ||
| // $FirstName = $names[" | // $FirstName = $names[" | ||
| + | $last4 = $appl + rand (1000, | ||
| + | $promote = $promote + 1 + $rank + rand (0,6); | ||
| + | |||
| + | if ($promote> | ||
| + | | ||
| + | $PQ = $Quadrant; | ||
| + | $move = rand (0,10); | ||
| + | if ($move> | ||
| + | { | ||
| + | | ||
| + | | ||
| + | } | ||
| echo " | echo " | ||
| < | < | ||
| - | < | + | < |
| + | < | ||
| < | < | ||
| - | < | + | < |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| < | < | ||
| + | < | ||
| + | < | ||
| </ | </ | ||
| + | |||
| $appl++; | $appl++; | ||