generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Need some C# code...

Previous Thread :: Next Thread 
doomtitan is not online. doomtitan
Joined: 02 Apr 2011
Total Posts: 111
08 Aug 2011 04:59 PM
I'm in need of some C# code.

I want it to generate every possibility of, say, 3 charectars and 2 integers.
So some of the results should look like:

abc45
59fgd
a88qw
ac56q

And so on...
Here is code so that it makes the charectars ALWAYS first.
I need that changed...



(Note: Roblox blocks my angle brackets, so I've replaced them with (leftAngleBracket) and (rightAngleBracket), respectively)

//Define this struct somewhere in your code
struct Possibility
{
char char1;
char char2;
char char3;
int int1;
int int2;
}

//Use this code to generate all the possibilities;
List(leftAngleBracket)Possibility(rightAngleBracket) possibilityList = new List(leftAngleBracket)Possibility(rightAngleBracket)();
for (char a = 0; a (leftAngleBracket)= 255; a++) //Go through all possible values of char1
{
for (char b = 0; b (leftAngleBracket)= 255; b++) //Go through all possible values of char2
{
for (char c = 0; c (leftAngleBracket)= 255; c++) //Go through all possible values of char3
{
for (int d = int.MinValue; d (leftAngleBracket)= int.MaxValue; d++) //Go through all possible values of int1 (if you don't want to use negative numbers, change int.MinValue to 0)
{
for (int e = int.MinValue; e (leftAngleBracket)= int.MaxValue; e++) //Go through all possible values of int2 (if you don't want negative numbers here, see above)
{
Possibility newPossibility = new Possibility(); //Create Possibility object
newPossibility.char1 = a; //Fill values
newPossibility.char2 = b;
newPossibility.char3 = c;
newPossibility.char1 = d;
newPossibility.char1 = e;
}
}
}
}
}




Any ideas?

Report Abuse
Sorcus is not online. Sorcus
Forum Moderator
Joined: 29 Nov 2010
Total Posts: 3775
08 Aug 2011 05:26 PM
Someone wants help in brute force password breaking. Locked.

~Sorcus
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image