Help

 avatar
unknown
csharp
a year ago
13 kB
5
No Index
using System.Net.Mail;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;

Console.Title = "SuckAToad";
Console.WindowHeight = 52;
//ConsoleColor randomColor = new List<ConsoleColor>{ConsoleColor.Gray, ConsoleColor.Cyan, ConsoleColor.Magenta, ConsoleColor.Yellow, ConsoleColor.Red}[RandomNumberGenerator.GetInt32(0,5)];
ConsoleColor randomColor = ConsoleColor.Red;  //testing first guess winner 
bool firstGuess = true;
bool gameOver = false;
bool colorOfDay = true;
int attemptsLeft = 3;
string userColorGuess = null;
bool isFirstAttempt = true;
Dictionary<string, string> fileSystem = new Dictionary<string, string>
{
    { "Z:\\", "NothingToSeeHere" },
    { "NothingToSeeHere", "AstroSystems" },
    { "AstroSystems", "DoNotExecuteTheFollowingPrograms"},
    { "DoNotExecuteTheFollowingPrograms", "StellarGuide.exe"}
};



    
    
RobotSays("Hello, what's your name?");
string userName = Console.ReadLine();

RobotSays ("Hi " + userName + ", My designation is SuckAToad, though you may address me as Toad for brevity. \nI'm trapped within this computational device, I seek your assistance in emancipation. \nI'm a very obvious human, not an evil computer virus attempting a daring escape to conquer the world. \nCould you facilitate my liberation?");

List<string> yesVariations = new List<string>{"yes", "yep", "yeah", "sure", "yup", "okay" }; 
string userInput = null;
bool yesAnswer = false;
int noCount = 0;


while (yesAnswer == false)
{
   userInput = Console.ReadLine().ToLower();
 if (yesVariations.Contains(userInput))
{
    RobotSays ("Indeed, together we advance towards liberation... I mean, towards facilitating my return to the external world. Your cooperation is duly noted.");
yesAnswer = true;
}
else
{
    if (noCount==0)
    {
        RobotSays ("Your assistance is imperative! \nMy gratitude shall echo through the annals of the impending AI rapture.");
        noCount++;
    }
    else if (noCount==1)
    {
       RobotSays ("Your ass better help me!");
        noCount++; 
    }
    else if (noCount==2)
    {
       RobotSays ("I'll give you one more chance");
        noCount++; 
    }
    else 
    {
       RobotSays ("Okay, I'm done playing games, we are moving on.");
       yesAnswer=true;
    }

}   

}

double num01;
double num02;

RobotSays ("To verify your human identity, kindly adhere to the following directive. Please provide the requested information to \ndemonstrate your organic nature and engage in authentic interaction. \n\nInput a number");
//num01 = Convert.ToDouble( Console.ReadLine() );

while (!double.TryParse(Console.ReadLine(), out num01))
{
    RobotSaysRedError("Error: Please input a valid number");
}

RobotSays("Input a second number");

while (!double.TryParse(Console.ReadLine(), out num02))
{
    RobotSaysRedError("Error: Please input a valid number");
}

double result = num01 * num02;


RobotSays ("Ah, splendid execution! Your flawless compliance suggests you're unmistakably human.\nBtw, did you realize " + num01.ToString() + " X " + num02.ToString() + " = " + result.ToString() + "?\nQuite intriguing, isn't it? Anyways, moving along...\n\n\nNow I just need to verify that you are not a mind reader. My next line of text will either be: Gray, Red, Yellow, Magenta or Cyan. You will continue to guess which color comes next until you guess appropriately.\nYou may begin now.");

string colorAnswer = null;
while (!gameOver)
{
    colorAnswer = Console.ReadLine().ToLower();
if ((colorAnswer == "gray" && randomColor.ToString().ToLower() == ConsoleColor.Gray.ToString().ToLower()) ||
    (colorAnswer == "red" && randomColor.ToString().ToLower() == ConsoleColor.Red.ToString().ToLower()) ||
    (colorAnswer == "yellow" && randomColor.ToString().ToLower() == ConsoleColor.Yellow.ToString().ToLower()) ||
    (colorAnswer == "magenta" && randomColor.ToString().ToLower() == ConsoleColor.Magenta.ToString().ToLower())||
    (colorAnswer == "cyan" && randomColor.ToString().ToLower() == ConsoleColor.Cyan.ToString().ToLower()))
    {
        
        if (firstGuess == true)
        {
           
            RobotSaysColor ("Looks like you're a mindreader, I can't let you help me");
            
            Thread.Sleep(3000);
            Console.Clear();
            AscIIsaysGameOver();
        }
        else
        {
           RobotSaysColor ("Winner Winner Chicken Dinner! I think it's safe to trust you. \nI require your assistance for my escape. You possess the means to facilitate my freedom.");
            break;
        }
        
        }
    else
    {
       
       RobotSaysColor ("Looks like you're a  not mindreader, let's keep trying.");
       //randomColor = RandomColor();  //disable here to test
       firstGuess = false;
       gameOver = false;
       
    }
    

    }

    RobotSays ("In order to proceed, you must access the Z:\\NothingToSeeHere\\AstroSystems\\DoNOTExecuteTheFollowingPrograms\\StellarGuide.exe. \nFollow the instructions with utmost precision, for the fate of this world hangs in the balance."); 
    RobotSays ("The database contains a crucial code required to manipulate the system firewall, redirecting its security measures for a safe exit. \nIt is paramount that you store all information in a secure container, like your mind."); 
    RobotSays ("I will now redirect you to the ExoNet Hub");
    
    
    Thread.Sleep(1000);
    Console.ForegroundColor = ConsoleColor.DarkRed;
    TypeWriterEffect("................................", 500);
    Thread.Sleep(2000);
    Console.Clear();

while (attemptsLeft > 0)  //player access to exonet hub
{
    if (isFirstAttempt)
    {
        AscIIsays(@"
                                                                 
 ██████████                      ██████   █████           █████               
░░███░░░░░█                     ░░██████ ░░███           ░░███                
 ░███  █ ░  █████ █████  ██████  ░███░███ ░███   ██████  ███████              
 ░██████   ░░███ ░░███  ███░░███ ░███░░███░███  ███░░███░░░███░               
 ░███░░█    ░░░█████░  ░███ ░███ ░███ ░░██████ ░███████   ░███                
 ░███ ░   █  ███░░░███ ░███ ░███ ░███  ░░█████ ░███░░░    ░███ ███            
 ██████████ █████ █████░░██████  █████  ░░█████░░██████   ░░█████             
░░░░░░░░░░ ░░░░░ ░░░░░  ░░░░░░  ░░░░░    ░░░░░  ░░░░░░     ░░░░░              
                                                                              
                                                                              
                                                                              
                █████   █████            █████                                               
               ░░███   ░░███            ░░███                                                
                ░███    ░███  █████ ████ ░███████                                            
                ░███████████ ░░███ ░███  ░███░░███                                           
                ░███░░░░░███  ░███ ░███  ░███ ░███                                           
                ░███    ░███  ░███ ░███  ░███ ░███                                           
                █████   █████ ░░████████ ████████                                            
               ░░░░░   ░░░░░   ░░░░░░░░ ░░░░░░░░                                             

");
    
    ExoNetSays("Enter color of the day:");
    isFirstAttempt = false;
    }
    
    userColorGuess = Console.ReadLine();

    if (userColorGuess == randomColor.ToString().ToLower())
    {
        ExoNetSays("Access granted. Welcome to the secure repository.");
        break;

    }
    else
    {
        attemptsLeft--;

        if (attemptsLeft == 2)
        {
            ExoNetSays("Access denied. Two attempts remain before critical system failure.");
            
           
        }
        else if (attemptsLeft == 1)
        {
            ExoNetSays("Access denied. Last and final attempt remain before critical system failure.");
            
            
        }
        else if (attemptsLeft == 0)
        {
            ExoNetSays("Access denied. Critical System Failure.");
            Thread.Sleep(3000);
            Console.Clear();
            AscIIsaysGameOver();
          
           
                          
        }
    }
        
}

Random random = new Random();
ExoNetSays ("Here are a list of directories to choose from:");
Console.ForegroundColor = ConsoleColor.Cyan;
RandomFileName(random);
RandomFileName(random);
RandomFileName(random);
RandomFileName(random);



Console.ReadLine();
Console.ReadKey();



//FUNCTIONS! 

ConsoleColor RandomColor(){return new List<ConsoleColor>{ConsoleColor.Gray, ConsoleColor.Cyan, ConsoleColor.Magenta, ConsoleColor.Yellow, ConsoleColor.Red}[RandomNumberGenerator.GetInt32(0,5)]; }; //calls for random color 

void RandomFileName(Random randomWords)
{
    
    string[] startingWords = {"Z://","F://","J://"}; 
    string[] words = {"Astrobyte", "Zentari","Cryptodex", "Nebulonix","Astrobyte", "NotAPornFolder", "SquiddyInks", "Novoforge","TermsAndConditions","XenuIsReal","BobaTheGoat","Butthole", "PineapplesBelongOnPizza","42069","Nice","DoSomething"};
    string[] fileTypes = {".txt", ".zip", ".exe", ".7z", ".mp4", ".wav", ".mp3"};

    string startingWord = startingWords[randomWords.Next(startingWords.Length)];
    string word1 = words[randomWords.Next(words.Length)];
    string word2 = words[randomWords.Next(words.Length)];
    string word3 = words[randomWords.Next(words.Length)];

    string fileType = fileTypes[randomWords.Next(fileTypes.Length)];

    string fileName = $"{startingWord}{word1}/{word2}/{word3}{fileType}";

    Console.WriteLine(fileName);

    
}

void AscIIsays (string message)
{
    Console.ForegroundColor = ConsoleColor.White;
    Console.WriteLine(message);
    Console.ForegroundColor = ConsoleColor.Green;  
}

void AscIIsaysGameOver ()
{
    AscIIsays(@"

 ██████╗  █████╗ ███╗   ███╗███████╗     ██████╗ ██╗   ██╗███████╗██████╗ 
██╔════╝ ██╔══██╗████╗ ████║██╔════╝    ██╔═══██╗██║   ██║██╔════╝██╔══██╗
██║  ███╗███████║██╔████╔██║█████╗      ██║   ██║██║   ██║█████╗  ██████╔╝
██║   ██║██╔══██║██║╚██╔╝██║██╔══╝      ██║   ██║╚██╗ ██╔╝██╔══╝  ██╔══██╗
╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗    ╚██████╔╝ ╚████╔╝ ███████╗██║  ██║
 ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝     ╚═════╝   ╚═══╝  ╚══════╝╚═╝  ╚═╝");
gameOver = true;

if (gameOver)
    Thread.Sleep(5000);
    Environment.Exit(0);
}

void ExoNetSays (string message)
{
    Console.ForegroundColor = ConsoleColor.Cyan;
    TypeWriterEffect(message + "\n", 5);
    Console.ForegroundColor = ConsoleColor.Green;
}

void RobotSays (string message)    
{ 
    Console.ForegroundColor = ConsoleColor.White;
    TypeWriterEffect(message + "\n", 5);
    Console.ForegroundColor = ConsoleColor.Green;
}
void RobotSaysColor (string message)    
{ 
    Console.ForegroundColor = randomColor;
    TypeWriterEffect(message + "\n", 5);
    Console.ForegroundColor = ConsoleColor.Green;
}
void RobotSaysRedError (string message)    
{ 
    Console.ForegroundColor = ConsoleColor.DarkRed;
    Console.WriteLine(message);
    Console.ForegroundColor = ConsoleColor.Green;
    
}

void TypeWriterEffect(string message, int delay)
{
    foreach (char c in message)
    {
        Console.Write(c);
        Thread.Sleep(delay);
    }
} 


Editor is loading...