Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <font size="xx-small">
- <?php
- $pname = 'Ecko D\'Blaze';
- $con = 5;
- $str = 5;
- $phealth = $con + 20;
- $npcname = 'Stinson The Great';
- $con = 6;
- $str = 4;
- $npchealth = $con + 20;
- if($phealth < 1)
- {
- print("You have no health!");
- }
- else
- {
- $npcroll = rand(1 , 10);
- $proll = rand(1 , 10);
- if($npcroll < $proll)
- {
- $turn = 0;
- }
- elseif($proll < $npcroll)
- {
- $turn=1;
- }
- else
- {
- $turn=rand(0,1);
- }
- for( ; ; )
- {
- if($npchealth < 1 || $phealth < 1)
- {
- if($phealth < 1)
- {
- print("$pname has been defeated by $npcname!<br/>");
- }
- else
- {
- print("$npcname has been defeated by $pname!<br/>");
- }
- break;
- }
- $hit = rand(1 , 4);
- if(($turn % 2) == 0)
- {
- $npchealth -= $hit;
- if($hit >= 4)
- {
- print("<font color='red'>\t$pname has just Bitch Slapped $npcname for $hit damage! - $npchealth remaining.</font><br/>");
- }
- else
- {
- print("\t$pname has just girly slapped $npcname for $hit damage! - $npchealth remaining.<br/>");
- }
- }
- else
- {
- $phealth -= $hit;
- if($hit >= 4)
- {
- print("<font color='red'>\t$npcname has just Bitch Slapped $pname for $hit damage! - $phealth remaining.</font><br/>");
- }
- else
- {
- print("\t$npcname has just girly slapped $pname for $hit damage! - $phealth remaining.<br/>");
- }
- }
- $turn++;
- }
- }
- ?>
- </font>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement