Check this out!


#1


Hey guys! I made a game and I would love if you checked it out. Copy and Paste this in your script and feel free to play with it! I only made it in a few hours so don't make fun of me :stuck_out_tongue_winking_eye:. Have fun!


confirm("This is a text adventure. Please make sure to enter valid answers/choices for questions or else the game might restart.")
var ready = prompt("Now are you ready to start the adventure?").toUpperCase()
if (ready === "YES") {
    confirm("Let's start then!")
}
else if (ready === "NO") {
    confirm("Ok, I guess you can come again another time.")
    document.getElementById("client").reset()
}
else {
    confirm("Please enter YES or NO. I told you this in the beginning!")
    document.getElementById("client").reset()
}
var inventory = []
var gender = prompt("Are you a girl or a boy?").toUpperCase()
switch(gender) {
    case 'GIRL':
        confirm("Me too! Girl power! Girls rule, boys drool!")
    break;
    case 'BOY':
         confirm("Boys are awesome! Boys rule!")
    break;
    
    default:
     confirm("That is not even a gender!")
     document.getElementById("client").reset()
}
var name = prompt("What's your name?").toUpperCase()

switch(name) {
    case 'JACOB':
        confirm("OMG JACOB UR THE BIG FUCKIN GIANT!!!!")
    break;
    case 'IZZY':
         confirm("Izzy! That's the most amazing name I have ever heard of!");
    break;
    
    case 'GRAMMY':
         confirm("Hi, Grammy!")
    break;
    
    case 'JOHNNY':
        confirm("Ayy, Johnny! Man, u so cool!")
    break;
    
    case 'BATMAN':
         confirm("Duh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh nuh BATMAN!!!!!")
    break;
    
    case 'KIP':
         confirm("Kip kip bo bip banana fanna fo fanna bo kip kip bo bip bo KIIIIIP!!!")
    break;
    
    case 'LUCAS':
         confirm("Yooooo Lucas y u playin my game?")
    break;
    
    if(name === '0' || '1') {
        console.log("No, it isn't")
    }
    else {
        console.log(name)
    }
    if(name === '0' && '1') {
        console.log("Pretty sure you don't have two names.")
    }
    else {
        console.log("Ok then.")
    }
    default:
    confirm (name + "! That name is awesome!")
}
confirm("So, " + name + ", you are walking down a long road. You see three paths. One is dark and scary. The next has flowers, candy, and mountains of gold. Finally, the last goes on forever.") 
var road = prompt("Which path do you choose to walk down? Choose SCARY, CANDY, or NORMAL.").toUpperCase()

if (road === "CANDY") {
    var candyChoice = prompt("You start walking down the candy road. You pick up a piece of candy. Do you eat it? Answer YES or NO.").toUpperCase()
    if (candyChoice === "YES") {
        confirm("You ate the piece of candy and continue walking down. Turns out, the candy was poison and you immediately died.       THE END")
    document.getElementById("client").reset()
    
    }
    else {
        confirm("You continue walking down the path. You walk over to the mountain of gold. You go to pick up a piece, then suddenly, a giant dragon crawls out from the shadows and eats you!      THE END")
        document.getElementById("client").reset()
    }
}
else if (road === "NORMAL") {
    confirm("You walk for a while. You walk some more. You keep walking. You walk for days. You walk for a month. There is no end and you die of starvation.      THE END")
    document.getElementById("client").reset()
}
else if (road === "SCARY") {
    var scaryChoice = prompt("You start walking down the scary road. Suddenly, an animal walks near you. It looks very hostile and you have never seen an animal like this before! Do you ATTACK or STAY?").toUpperCase()
    if (scaryChoice === "ATTACK") {
        confirm("The animal turns around, looks at you, and lunges. It pounces on you and kills you with one bite.      THE END")
        document.getElementById("client").reset()
    }
    else if (scaryChoice === "STAY") {
        confirm("The animal walks toward you, sniffs you, and lays down. You pet it and it instantly loves you. It licks you all over and you are covered in slobber, but at least you aren't dead. The animal will now be your friend for the remainder of this story. ")
    }
    else {
        confirm("That is not a choice!")
        document.getElementById("client").reset()
    }
}
else {
    confirm("That is not a choice!")
    document.getElementById("client").reset()
}
var nameAnimal = prompt("You walk on the creepy path with the animal. You decide to give it a name. Would you like to name the animal? Answer YES or NO.").toUpperCase()

if (nameAnimal === "NO") {
    nameAnimal = "the animal"
}
else if (nameAnimal === "YES") {
    var animalName = prompt("What would you like the name the animal?").toUpperCase()
    if (animalName === name) {
        confirm("Don't name your animal your own name!")
        document.getElementById("client").reset()
    }
    else {
        confirm("You and " + animalName + " continue walking the path.")
    }
}
else {
    confirm("That is not a choice!")
    document.getElementById("client").reset()
}
var enemyAttack = prompt("You and " + animalName + " are walking down the path and something rustles in the bushes. Do you check it out or continue walking? Answer CHECK or WALK.").toUpperCase()

if (enemyAttack === "WALK") {
    var checkWalk = prompt("You and " + animalName + " walk down the path. You hear another rustling. Do you check it out or continue? Answer CHECK or WALK.").toUpperCase()
    if (checkWalk === "WALK") {
        var monsterAttack = prompt("The rustling got louder and out popped a huge ferocious monster! Do you ATTACK or RUN?").toUpperCase()
        if (monsterAttack = "ATTACK") {
            confirm("The monster rips you and " + animalName + " to shreds.      THE END")
            document.getElementById("client").reset()
        }
        else if (monsterAttack = "RUN") {
            confirm("The monster easily outruns you and rips you and " + animalName + " to shreds.     THE END")
            document.getElementById("client").reset()
        }
        else {
            confirm("That is not a choice!")
            document.getElementById("client").reset()
        }
    }
    else if(checkWalk === "CHECK") {
        confirm("You check the bushes and find a gold coin.")
        inventory.push("Gold Coin")
    }
    else {
        confirm("That is not a choice!")
        document.getElementById("client").reset()
    }
}
else if (enemyAttack === "CHECK") {
    confirm("You check the bushes and find a gold coin.")
    inventory.push("Gold Coin")
}
else {
    confirm("That is not an answer!")
    document.getElementById("client").reset()
}
var thingsToDo = prompt("What would you like to do now? If you want to check your inventory, enter INVENTORY. If you would like you continue the story, enter GO.").toUpperCase()
if (thingsToDo === "INVENTORY") {
    confirm(inventory)
    confirm("Ok, now let's continue.")
}
else if (thingsToDo === "GO") {
    confirm("Let's continue, then!")
}
else {
    confirm("That is not a choice!")
    document.getElementById("client").reset()
}
var leftOrRight = prompt("You see two paths. Would you like to go RIGHT, LEFT, or check your INVENTORY?").toUpperCase()
if (leftOrRight === "INVENTORY") {
    confirm(inventory)
}
else if (leftOrRight === "RIGHT") {
    var comfortOrKill = prompt("You walk towards the right path. In the distance, you see a man crying. Do you COMFORT him, or KILL him and take his stuff?").toUpperCase()
    if (comfortOrKill === "COMFORT") {
        confirm("You walk up to the crying man. You ask him what's wrong, and he says, 'I just got robbed and the person who stole my stuff is over there. If you get me my stuff I will give you money.'")
        var catchTheRobber = prompt(" Do you choose to catch the robber and STEAL the things, or GIVE them back to the man?").toUpperCase()
        if (catchTheRobber === "STEAL") {
            confirm("You run at the robber and tackle him. You take all of his things. When you start to walk away, the man yells, 'HEY! GET BACK HERE!' and he jumps on you. He steals all of your things, including the things from him. He beats you up and you wake up in a cell without " + animalName + ". You end up spending the rest of your short life (without food) not knowing how you got there.      THE END")
            document.getElementById("client").reset()
        }
        
        else if (catchTheRobber === "GIVE") {
            confirm("You run at the robber and tackle him. You take all of his things, and sprint back to the man. You give him his things back, and he gives you 5 Gold Coins. He thanks you and you are back on your way with " + animalName + "." )
        inventory = ["6 Gold Coins"]
        }
        else {
            confirm("That's not a choice!")
            document.getElementById("client").reset()
        }
    }
    else if (comfortOrKill === "KILL") {
        confirm("You attack the man and kill him. He didn't have anything on him, so you had no benefit of killing him.")
    
    }  
    else {
        confirm("That isn't an answer!")
        document.getElementById("client").reset()
    }
    
}
else if(leftOrRight === "LEFT") {
    var goToLight = prompt("You and " + animalName + " walk towards the left path. You are walking and you see a light. Do you GO towards the light or do you go BACK?").toUpperCase()
    if (goToLight === "GO") {
        confirm("You go towards the light. When you get close enough you see what it really is. It's a town! You and " + animalName + " rush toward the town and when you guys get there, it looks amazing. It is full of lights and houses and it smells like food!")
        var goToShop = prompt("Do you want to go to the SHOP or find a ROOM to sleep in?").toUpperCase()
        if (goToShop === "SHOP") {
           var buyStuff = prompt("You and " + animalName + " get in the shop. You see a person at the counter. Would you like to buy a healing potion for 1 coin? If you say NO, the game will restart.").toUpperCase()
           if (buyStuff === "YES") {
               confirm("1 potion has been added to your inventory. You leave the shop.")
               confirm("You and " + animalName + " get back on track.")
               inventory = ["4 Gold Coins", "1 Healing Potion"]
           }
           else {
               document.getElementById("client").reset()
           }
           
               
        }
        else if (goToShop === "ROOM") {
            var getRoom = prompt("You go to the hotel. A lady asks if you want a room. Do you want a room for 1 coin? Answer YES or NO. If you say no, your game will be restarted.").toUpperCase()
            if (getRoom === "YES") {
                confirm("You have a room now. You and " + animalName + " get back on track.")
                
            }
            else {
                document.getElementById("client").reset()
            }
        }
        else {
            confirm("That's not an answer!")
            document.getElementById("client").reset()
        }
    }
    else if (goToLight === "BACK") {
        confirm("Really? Now that's just pathetic. And for that, you will restart.")
        document.getElementById("client").reset()
    }
    else {
        confirm("That isn't an answer!")
        document.getElementById("client").reset()
    }
}
else {
    confirm("That isn't an answer!")
    document.getElementById("client").reset()
}
var invOrLeft = prompt("What would you like to do? Open your INVENTORY or go back to the LEFT path?").toUpperCase()
if (invOrLeft === "INVENTORY") {
    confirm(inventory)
}
else if (invOrLeft === "LEFT") {
    var goToLight = prompt("You and " + animalName + " walk towards the left path. You are walking and you see a light. Do you GO towards the light or do you go BACK?").toUpperCase()
    if (goToLight === "GO") {
        confirm("You go towards the light. When you get close enough you see what it really is. It's a town! You and " + animalName + " rush toward the town and when you guys get there, it looks amazing. It is full of lights and houses and it smells like food!")
        var goToShop = prompt("Do you want to go to the SHOP or find a ROOM to sleep in?").toUpperCase()
        if (goToShop === "SHOP") {
           var buyStuff = prompt("You and " + animalName + " get in the shop. You see a person at the counter. Would you like to buy a healing potion for 1 coin? If you say NO, the game will restart.").toUpperCase()
           if (buyStuff === "YES") {
               confirm("1 potion has been added to your inventory. You leave the shop.")
               inventory.push("1 healing potion")
           }
           else {
               document.getElementById("client").reset()
           }
        }
        else if (goToShop === "ROOM") {
            var getRoom = prompt("You go to the hotel. A lady asks if you want a room. Do you want a room for 1 coin? Answer YES or NO. If you say no, your game will be restarted.").toUpperCase()
            if (getRoom === "YES") {
                confirm("You have a room now.")
            }
            else {
                document.getElementById("client").reset()
            }
        }
        else {
            confirm("That's not an answer!")
            document.getElementById("client").reset()
        }
    }
    else if (goToLight === "BACK") {
        confirm("Really? Now that's just pathetic. And for that, you will restart.")
        document.getElementById("client").reset()
    }
    else {
        confirm("That isn't an answer!")
        document.getElementById("client").reset()
    }
}
else {
    confirm("That isn't an answer!")
    document.getElementById("client").reset()
}
var sleepWalk = prompt("You are getting tired. Do you wish to SLEEP or WALK?").toUpperCase()

if (sleepWalk === "SLEEP") {
    confirm("You have a good, long sleep. You wake up in the morning and you feel very refreshed.")
}
else if (sleepWalk === "WALK") {
    confirm("You continue, and pass out. You wake up with a major concussion and you don't remember anything. You attack " + animalName + ", not knowing that you were allies, and " + animalName + " killed you.")
    document.getElementById("client").reset()
}
else {
    document.getElementById("client").reset()
}
var feedAnimal = prompt("You start walking again and you find some meat and grapes on the ground." + animalName + " looks very hungry, but so do you. Do you give HALF of your food to " + animalName + " or EAT it all?").toUpperCase()
if (feedAnimal === "EAT") {
    confirm("You eat all of the food and " + animalName + " pounces on you, eating you because of its hunger.")
}
else if (feedAnimal === "HALF") {
    confirm("You give half of your food to " + animalName + ". It is very thankful and kisses (licks) you on the face.")
}
else {
    confirm("You save the food for later, but soon you both die of hunger and thirst.")
}
confirm("You and " + animalName + " start walking again. You find a mountain of gold.")
var gold = prompt("Do you choose to take GOLD from the mountain or RUN away?").toUpperCase()
if (gold === "GOLD") {
    if (gender === "BOY") {
        confirm("You conquer the mountain and take the gold! You and " + animalName + " live in riches for the rest of your lives and are very happy. You get a beautiful wife and have a great amount of friends.")
    }
    else if (gender === "GIRL") {
        confirm("You conquer the mountain and take the gold! You and " + animalName + " live in riches for the rest of your lives and are very happy. You get a handsome husband and have a great amount of friends.")
    }
}
else if (gold === "RUN") {
    confirm("You live a pathetic life in disgust without a home because you never stood up to take your claims.")
}
else {
    confirm("You live a pathetic life in disgust without a home because you never stood up to take your claims.")
}


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.