CyberCriminal - A C# project where you can be a part of

CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 26 Jul 2013, 16:47

Hi everyone!
I started a project called CyberCriminal. It is a C# Console program, what pretends to look something like (MS)-DOS. It is(going to be) a type game, and it is not finished.
Because it is a program with all sorts of commands, I thought that the community can make commands for it. You will get credit if you work on it!

Knipsel.PNG
CyberCriminal
Knipsel.PNG (8.39 KiB) Viewed 1004 times


Now about the source, there are almost NO comments. This has one advantage:
You must look at the code before you code something for it. It will force you to understand it.
And it has one disadvantage: You must look at the code :P

source:
The console void, this is the place where your comment if block will come. It is a infinite loop.
Spoiler:



An example of a command(color):
Spoiler:


The whole source v 0.1:
CyberCriminal Source 0_1.zip
CyberCriminal Source code v 0.1
(30.09 KiB) Downloaded 53 times


Rules submitting commands
Spoiler:


CyberCriminal(DEBUG).zip
cyber criminal preview exe
(6.75 KiB) Downloaded 46 times



Have fun with it!
PM me if you want more info.
For updates, SCROLL DOWN! You can't edit posts after a few minutes!
Image
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: CyberCriminal - A C# project where you can be a part of

Postby Conor » 26 Jul 2013, 18:47

Nice idea to get everybody involved :)

Just a little suggestion, making each command as a separate class might make things a lot easier for you, and for organisation.
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 26 Jul 2013, 19:12

Conor wrote:Nice idea to get everybody involved :)

Just a little suggestion, making each command as a separate class might make things a lot easier for you, and for organisation.


You are right. The only bad thing is I use local varibles. To convert everything to classes, takes for me much, much time. Also, to make a command will be different.
So I am not sure if I do that, but thanks for the suggestion! :)
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 27 Jul 2013, 16:03

I would love to get some suggestions, and see some other coders.
I have worked on a file and directory system, so you can run files and stuff.
I am on vacation the next 7 days so I am away! :)
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: CyberCriminal - A C# project where you can be a part of

Postby Conor » 28 Jul 2013, 04:52

Enjoy your holiday!

Here is something simple for the source :)

Code: Select all
// Below is an example of how to access my command from your command() method.
public void command()
{
    string msg = Console.ReadLine().ToLower().Trim();

    if (msg.IndexOf(' ') != -1)
    {
        if (msg.Split(' ')[0] == "setsize")
        {
             setConsoleSize(msg.Split(' ')[1]);
        }
    }
}

// Below is the called command
public void setConsoleSize(string msg)
{
    int squareLength;
    if (!int.TryParse(msg, out squareLength) || int.Parse(msg) < 50)
    {
        Console.WriteLine("Invalid size, retry?");
        if (Console.ReadLine().ToLower() == "yes" || Console.ReadLine().ToLower() == "y")
        {
             Console.WriteLine("Enter your new size:");
             setConsoleSize(Console.ReadLine().ToLower().Trim());
        }
    }
    else
    {
        try
        {
             Console.WindowWidth = squareLength;
             Console.WindowHeight = squareLength;
        }
        catch
        {
                 Console.WriteLine("An error occured, retry?");
                 if (Console.ReadLine().ToLower() == "yes" || Console.ReadLine() == "y")
                 {
                     Console.WriteLine("Enter your new size:");
                     setConsoleSize(Console.ReadLine().ToLower().Trim());
                 }
        }
    }
}
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 28 Jul 2013, 09:31

Conor wrote:Enjoy your holiday!

Here is something simple for the source :)

Code: Select all
// Below is an example of how to access my command from your command() method.
public void command()
{
    string msg = Console.ReadLine().ToLower().Trim();

    if (msg.IndexOf(' ') != -1)
    {
        if (msg.Split(' ')[0] == "setsize")
        {
             setConsoleSize(msg.Split(' ')[1]);
        }
    }
}

// Below is the called command
public void setConsoleSize(string msg)
{
    int squareLength;
    if (!int.TryParse(msg, out squareLength) || int.Parse(msg) < 50)
    {
        Console.WriteLine("Invalid size, retry?");
        if (Console.ReadLine().ToLower() == "yes" || Console.ReadLine().ToLower() == "y")
        {
             Console.WriteLine("Enter your new size:");
             setConsoleSize(Console.ReadLine().ToLower().Trim());
        }
    }
    else
    {
        try
        {
             Console.WindowWidth = squareLength;
             Console.WindowHeight = squareLength;
        }
        catch
        {
                 Console.WriteLine("An error occured, retry?");
                 if (Console.ReadLine().ToLower() == "yes" || Console.ReadLine() == "y")
                 {
                     Console.WriteLine("Enter your new size:");
                     setConsoleSize(Console.ReadLine().ToLower().Trim());
                 }
        }
    }
}


Thank you very much! May I put it into the "set" command? for example: set windowsize 40.
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: CyberCriminal - A C# project where you can be a part of

Postby Conor » 28 Jul 2013, 18:45

Sure go for it, its your program ;D
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 03 Aug 2013, 08:42

0.2 is out!
Changes:
Code: Select all
v 0.2    -    9:37 3-8-2013
- Added a system so you can open a file
- Added the commands directory and cd(not finished)
- Added new SET arguments(Thanks to Conor)
* set height [value | max] - Sets the console height
* set width [value | max] - Sets the console width

- Added the command system to the help page
- Added more colors
- Code tweaks & fixes


The file:
CyberCriminal.zip
the debug .exe v 0.2
(8.45 KiB) Downloaded 56 times


The source:
CyberCriminal Source 0_2.zip
The source 0.2
(46.33 KiB) Downloaded 50 times
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: CyberCriminal - A C# project where you can be a part of

Postby Clowny » 04 Aug 2013, 07:08

I guess I'd be nice to get into this and maybe learn a little along the way however I'm not quite understanding what commands would i make for this...?
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53

Re: CyberCriminal - A C# project where you can be a part of

Postby joppiesaus » 04 Aug 2013, 09:37

Clowny wrote:I guess I'd be nice to get into this and maybe learn a little along the way however I'm not quite understanding what commands would i make for this...?


Thanks! It could be anything(as long as it is not useless, read the guidelines). <ok>
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Next

Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 3 guests

cron