daily pastebin goal
9%
SHARE
TWEET

project

a guest Jun 21st, 2018 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Final Project</title>
  5.         <script>
  6.             function getPlayerName(){
  7.                 alert("Welcome player to World Of WarCraft");
  8.                 var reply = prompt("What is your name?");
  9.  
  10.                 return reply;
  11.             }  
  12.              
  13.             function startLevelOne(name){
  14.                 var score = 0;
  15.                  
  16.                 alert("Today You Will Be training");
  17.                 var enter = prompt("Are you sure you want to do this").toLowerCase();
  18.                  
  19.                 if(enter == "yes"){
  20.                     alert("Good, you will now enter the Training Zone Adventure awaits!");
  21.                     score += 25;
  22.                 } else {
  23.                     alert("You Do Not wish to Train.Then Your journey ends here.");
  24.                     score -= 0;
  25.                     endGame(score);
  26.                 }
  27.                
  28.                 alert("before you joined the knights we checked your profile your element is lightning correct");
  29.                
  30.                 var question = prompt("Is That Your Element").toLowerCase();
  31.                
  32.                 if (answer == "yes"){
  33.                 alert("Then we were correct as always");
  34.                 }
  35.                
  36.                 else {
  37.                     score -= 25;
  38.                     endGame(score);
  39.                 }
  40.                
  41.                
  42.                
  43.            
  44.             return score;
  45.             }
  46.  
  47.             function endGame(score){
  48.                 alert("Game over!");
  49.                 alert("Your score is: " + score);
  50.             }
  51.              
  52.             function play(){
  53.                 alert("Game Started:");
  54.                 var name = getPlayerName();
  55.                 alert("Welcome " + name + "!");
  56.                 var score = startLevelOne();
  57.                  
  58.                 endGame(score);
  59.             }                    
  60.         </script>
  61.     </head>
  62.     <body>
  63.         <h1>World Of WarCraft</h1>
  64.         <input type="button" value="Start Game" onclick="play()" />
  65.     </body>
  66. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top