MAX_BULLETS) { $bullets = MAX_BULLETS; } } else { // Assume no bullets $bullets = 0; } // They're not dead (yet) $dead = false; // Do we have an argument if(isSet($m) && ($m != '')) { // We won't need our header unset($heading); // If we're loading a bullet if($m == 'Load Bullet') { // If we have space for another bullet if($bullets < MAX_BULLETS) { // Load another bullet $bullets++; // Add a comment to convince the user to pull the trigger $content = "

Feeling lucky, punk?

\n"; } else { // Inform the user that they can't do this $content = "

Your gun is already full.

\n"; } } else if($m == 'Pull Trigger') { // If we have bullets loaded if($bullets > 0) { // Randomly decide if they're dead now if(rand(1, MAX_BULLETS) <= $bullets) { $content = "

BLAM!!

\n" . "

Now who's going to clean up that mess?

\n"; $bullets--; $dead = true; } else { $content = "

click

\n" . "

Guess this is your lucky day

\n"; } } else { // Inform the user that they might like to load first $content = "

Not very risky with an empty gun, is it?

\n"; } } } // If they're dead if($dead) { // Link back so they can start again $content .= "

(start again?)

\n"; } else { // Produce a form for input $content .= "
\n" ."\n" ."\n" ."\n" ."
\n" ."

(source code?)

\n"; } echo "\n"; ?> <?=$title?>
$heading\n"; echo "

A product of The Lost Realm.

"; } ?>