Jump to content

cbox


Recommended Posts

Posted

There fake. There just generated numbers.

 

I wrote this in 2008 to make the codes. Someone told me the rules (I think its like no O or I, because they look like numbers and like there is never more than 2 numbers in a row).

 

private string RandomString(int size=25)
 {
	 //TEMP VARS
	 StringBuilder builder = new StringBuilder();
	 Random random = new Random();
	 char ch;
	 int num = 0;
	 string cm;
	 char N1 = (Convert.ToChar(Convert.ToInt32(73)));
	 char N2 = (Convert.ToChar(Convert.ToInt32(79)));
	 char N3 = (Convert.ToChar(Convert.ToInt32(111)));
	 char N4 = (Convert.ToChar(Convert.ToInt32(105)));
	 /* This handles the randomizing of Letters and Numbers
		 * Only 2-9 are used
		 * All Letters except O,o, I, i */
	 for (int i = 0; i < size; i++)
	 {
		 Random r1 = new Random();
	 check4:
		 int r2 = r1.Next(1, 3);
		 if (test == 0) //This makes sure the first one is a letter
			 r2 = 2;
		 switch (r2)
		 {
			 case 1: //Gen the Number
				 //Make sure more than 2 numbers never happen
				 if (num == 2)
				 {
					 num = 0;
					 goto case 2;
				 }
				 Random r3 = new Random();
				 Thread.Sleep(r1.Next(1,5));
				 num++; //Make sure only numbers used twice
				 cm = (Convert.ToString(r3.Next(2, 9)));
				 builder.Append(cm);
				 r2 = 2;
				 break;
			 case 2: //Gen the Character
				 test = 1;
				 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
			 if ((ch == N1) | (ch == N2) | (ch == N3) | (ch == N4))
				 {
					 goto check4;
				 }
				 else
				 {
					 builder.Append(ch);
					 break;
				 }
		 }
	 }
	 return builder.ToString().ToUpper(); //Return the string
 }

  • Like 1
Posted (edited)

Thats what i thought. Um another question if i may dont gift cards need to be activated? So if you enter the random code and it works is that not stealing?

 

Um also how would i be able to use that code? ^

I

Edited by a 5argent
Posted

That actually used to happen more ofter before the 360 and with the original xbox.

Now the codes you buy in a store (Not in one of those Clam shell cases that are impossible to open) are only activated when the cashier checks it out. Meaning the code will only start working after purchase which still makes it possible for someone to randomly get it but the time frame the code is active is much less now then back with 2 month codes that could be active before the sale.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...