mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 17:12:56 -05:00
Added some stuff
-Added another story-script (Hack2.cs) -Fixed an issue where the MS-DOS prompt would freeze when displaying text -Added Action Delegate (method/function) as an argument for Time Distorter (optional)
This commit is contained in:
parent
07ad23b7c9
commit
e75e11bcc8
7 changed files with 135 additions and 43 deletions
|
@ -383,7 +383,7 @@ private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
|||
|
||||
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Hack1.startObjective();
|
||||
Hack1.StartObjective();
|
||||
}
|
||||
|
||||
private void temp_for_std(object sender, EventArgs e)
|
||||
|
@ -429,8 +429,7 @@ private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e)
|
|||
|
||||
private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
WinClassic app = wm.StartWin95(new WinClassicTimeDistorter("2017", "20XX", 10), "Time Distorter", null, false, true);
|
||||
|
||||
WinClassic app = wm.StartWin95(new WinClassicTimeDistorter("1998", "1999", 160, Hack2.StartObjective), "Time Distorter", null, false, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null);
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
|
|
|
@ -21,25 +21,15 @@ static class Hack1 : Object
|
|||
static bool devMode = true;
|
||||
|
||||
// This is the very first story script!
|
||||
public static void startObjective()
|
||||
public static void StartObjective()
|
||||
{
|
||||
System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
|
||||
|
||||
WinClassicTerminal Console = new WinClassicTerminal(true);
|
||||
WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connecting...");
|
||||
|
||||
tmr.Interval = 1;
|
||||
tmr.Tick += new EventHandler(CheckIfSoundFinished);
|
||||
|
||||
if (devMode == true)
|
||||
{
|
||||
Thread contObjective = new Thread(continueObjective);
|
||||
|
||||
app.Close();
|
||||
|
||||
contObjective.Start();
|
||||
ContinueObjective();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -48,40 +38,39 @@ public static void startObjective()
|
|||
}
|
||||
}
|
||||
|
||||
public static void continueObjective()
|
||||
public static async void ContinueObjective()
|
||||
{
|
||||
WinClassicTerminal Console = new WinClassicTerminal(true);
|
||||
wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Application.DoEvents();
|
||||
WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connecting...");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connected.");
|
||||
Thread.Sleep(2500);
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
|
||||
Thread.Sleep(2500);
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("TheHiddenHacker> I see you have access to 12padams.com.");
|
||||
Thread.Sleep(4500);
|
||||
await Task.Delay(4500);
|
||||
Console.WriteLine("TheHiddenHacker> Though it doesn't seem obvious, only a very limited amount of people can access the site.");
|
||||
Thread.Sleep(6000);
|
||||
await Task.Delay(6000);
|
||||
Console.WriteLine("TheHiddenHacker> 12padams has a secret, and I need you to help me find it.");
|
||||
Thread.Sleep(3500);
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("TheHiddenHacker> I was snooping around his website, when he blacklisted my IP address.");
|
||||
Thread.Sleep(4000);
|
||||
Console.WriteLine("TheHiddenHacker> While I was serching, I noticed a file that I didn't have permission to download. I need you to get it for me.");
|
||||
Thread.Sleep(6500);
|
||||
Console.WriteLine("TheHiddenHacker> First, I'll need you to download an FTP client, avalible under the software section of 12padams' website.");
|
||||
Thread.Sleep(5000);
|
||||
await Task.Delay(4000);
|
||||
Console.WriteLine("TheHiddenHacker> While I was searching, I noticed a file that I didn't have permission to download. I need you to get it for me.");
|
||||
await Task.Delay(6500);
|
||||
Console.WriteLine("TheHiddenHacker> First, I'll need you to download an FTP client, available under the software section of 12padams' website.");
|
||||
await Task.Delay(5000);
|
||||
Console.WriteLine("TheHiddenHacker> Once that's downloaded, You'll need to type in a Hostname, Username, and Password.");
|
||||
Thread.Sleep(4500);
|
||||
await Task.Delay(4500);
|
||||
Console.WriteLine("TheHiddenHacker> The hostname is 172.68.119.42, and the username is most likely 12padams. I'm not too sure what the password is, however.");
|
||||
Thread.Sleep(3500);
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("TheHiddenHacker> You'll need to figure out where you can get the password. Try looking for any odd text on the website.");
|
||||
Thread.Sleep(3500);
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("TheHiddenHacker> I don't have much time to talk - I'd quickly copy down those details into Notepad before this Terminal gets closed.");
|
||||
|
||||
Application.DoEvents();
|
||||
|
||||
Thread.Sleep(36000);
|
||||
await Task.Delay(36000);
|
||||
app.Close();
|
||||
}
|
||||
|
||||
public static void CheckIfSoundFinished(Object sender, EventArgs e)
|
||||
|
@ -91,7 +80,7 @@ public static void CheckIfSoundFinished(Object sender, EventArgs e)
|
|||
// Continue from where we were
|
||||
System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer;
|
||||
|
||||
continueObjective();
|
||||
ContinueObjective();
|
||||
trm.Stop();
|
||||
}
|
||||
}
|
||||
|
|
102
TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack2.cs
Normal file
102
TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack2.cs
Normal file
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.Engine.Template;
|
||||
|
||||
namespace TimeHACK.OS.Win95.Win95Apps.Story
|
||||
{
|
||||
public class Hack2 : Object
|
||||
{
|
||||
static WindowManager wm = new WindowManager();
|
||||
|
||||
public static async void StartObjective()
|
||||
{
|
||||
WinClassicTerminal Console = new WinClassicTerminal(true);
|
||||
WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Console.WriteLine("telnet> 185.152.46.51 Connecting...");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 185.152.46.51 Connected.");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 185.152.46.51 set hostname to '12padams'.");
|
||||
await Task.Delay(2000);
|
||||
Console.WriteLine("12padams> WHAT DO YOU THINK YOU'RE DOING??");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine("12padams> First you hack my FTP server and download hwcv.exe..");
|
||||
await Task.Delay(4500);
|
||||
Console.WriteLine("12padams> And use it to hack my website..");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("12padams> Oh, and I know you pressed it.");
|
||||
await Task.Delay(4000);
|
||||
Console.WriteLine("12padams> I can see your screen right now..");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("12padams> And to prove that I can see it, look at your timer. It says 130 seconds left.");
|
||||
await Task.Delay(4000);
|
||||
Console.WriteLine("12padams> Now, in 2 minutes you think you're going to be able to travel to 1999.");
|
||||
await Task.Delay(3250);
|
||||
Console.WriteLine("12padams> Well, I am sorry but I just can't let you do that.");
|
||||
await Task.Delay(5000);
|
||||
Console.WriteLine("12padams> You see, I have LOTS of power over your computer.");
|
||||
await Task.Delay(3400);
|
||||
Console.WriteLine("12padams> Okay, let me show you how easy this is.");
|
||||
await Task.Delay(1500);
|
||||
Console.WriteLine("Command> Hide Start Button");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("12padams> See how easy that was?");
|
||||
await Task.Delay(3700);
|
||||
Console.WriteLine("12padams> Now watch this..");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("12padams> Hahaha, having a few errors are we?");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connecting...");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connected.");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine("The Hidden Hacker> Great, you found the software.");
|
||||
await Task.Delay(3700);
|
||||
Console.WriteLine("12padams> How dare you..");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine($"The Hidden Hacker> Don't worry {SaveSystem.ProfileName}.");
|
||||
await Task.Delay(4500);
|
||||
Console.WriteLine("The Hidden Hacker> I have to say, good job for getting the software.");
|
||||
await Task.Delay(3900);
|
||||
Console.WriteLine("12padams> The Hidden Hacker.. I thought my first punishment was enough to get you away.");
|
||||
await Task.Delay(4500);
|
||||
Console.WriteLine("The Hidden Hacker> Well, now that I have uncovered your secret, I'm not just gonna go away.");
|
||||
await Task.Delay(3600);
|
||||
Console.WriteLine("12padams> If you don't go, I'll make you go!");
|
||||
await Task.Delay(3700);
|
||||
Console.WriteLine($"The Hidden Hacker> Hey {SaveSystem.ProfileName}, don't worry about 12padams. You're about to get away from all this.");
|
||||
await Task.Delay(3500);
|
||||
Console.WriteLine("The Hidden Hacker> Let me fix this..");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("Command> Show Start Button");
|
||||
await Task.Delay(2900);
|
||||
Console.WriteLine("12padams> OKAY, NOW YOU'VE DONE IT!");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("Command> Stop Timer");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine("12padams> I bet you didn't see that one coming..");
|
||||
await Task.Delay(3700);
|
||||
Console.WriteLine("The Hidden Hacker> Oh but I did..");
|
||||
await Task.Delay(5000);
|
||||
Console.WriteLine("The Hidden Hacker> I converted the stop function to the hide function when I logged on..");
|
||||
await Task.Delay(4200);
|
||||
Console.WriteLine("12padams> NO! That's impossible!");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine("The Hidden Hacker> Oh, is it? Well, watch this!");
|
||||
await Task.Delay(2500);
|
||||
Console.WriteLine("Command> Show Timer");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine("The Hidden Hacker> And here's one more command for you to learn.");
|
||||
await Task.Delay(1700);
|
||||
Console.WriteLine("Command> Disconnect 12padams");
|
||||
await Task.Delay(2000);
|
||||
Console.WriteLine("telnet> 12padams Disconnected.");
|
||||
await Task.Delay(3000);
|
||||
Console.WriteLine($"The Hidden Hacker> Good luck {SaveSystem.ProfileName}! I'll see you in the future!");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -114,7 +114,7 @@ private void goToSite(string url, bool back)
|
|||
break;
|
||||
case "www.12padams.com":
|
||||
hidePrograms();
|
||||
Story.Hack1.startObjective();
|
||||
Story.Hack1.StartObjective();
|
||||
webBrowser1.DocumentText = resources.GetString("padams_HTML");
|
||||
break;
|
||||
case "www.microsoft.com/internetexplorer4/welcome":
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.Engine.Template;
|
||||
|
@ -8,9 +9,9 @@ namespace TimeHACK.OS.Win95
|
|||
public partial class WinClassicTimeDistorter : UserControl
|
||||
{
|
||||
private int _counter;
|
||||
private Form _action;
|
||||
private Action _action;
|
||||
|
||||
public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Form action = null)
|
||||
public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Action action = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
@ -25,6 +26,8 @@ private void btnGo_Click(object sender, EventArgs e)
|
|||
{
|
||||
lblCountDown.Visible = true;
|
||||
btnGo.Enabled = false;
|
||||
|
||||
_action?.Invoke();
|
||||
countDownTimer.Start();
|
||||
|
||||
lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds";
|
||||
|
@ -37,10 +40,8 @@ private void countDownTimer_Tick(object sender, EventArgs e)
|
|||
if (_counter == 0)
|
||||
{
|
||||
countDownTimer.Stop();
|
||||
|
||||
if (_action != null)
|
||||
_action.ShowDialog();
|
||||
}
|
||||
|
||||
lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
|||
|
||||
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Hack1.startObjective();
|
||||
Hack1.StartObjective();
|
||||
}
|
||||
|
||||
private void temp_for_std(object sender, EventArgs e)
|
||||
|
|
|
@ -146,6 +146,7 @@
|
|||
<DependentUpon>GooglePrototype.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OS\Win95\Win95Apps\Story\Hack1.cs" />
|
||||
<Compile Include="OS\Win95\Win95Apps\Story\Hack2.cs" />
|
||||
<Compile Include="OS\Win95\Win95Apps\TempIE4.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
|
Loading…
Reference in a new issue