Thread: trying to make a KenGen ( for a game tool )

  1. #1
    Registered User
    Join Date
    Mar 2007

    Unhappy trying to make a KenGen ( for a game tool )


    i trying to make a KeyGen , A-Z and 0-9

    I have a book on c++ programming and its called : C++ PROGRAMMING : in easy steps

    and at the back of the book there is a lottery picker ( but its not gonna make you millions lol )

    and the program is in Microsoft Visial c++ ( what i have :P ) and it generates six random numbers from 1-49. and all the code gives me is the FUNCTIONAL code to make the button make the text boxes to put the rendom numbers in.

    and i did try to put it into my program code that i maded to try the code but it did not work and then i tryed editting the code to try to fix it in ect but i just get errors ect

    well my program atm looks like this

    but the button dos notting
    and my code atm looks like this

    #pragma once
    namespace myKeyGen {
    	using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	/// <summary>
    	/// Summary for Form1
    	/// WARNING: If you change the name of this class, you will need to change the
    	///          'Resource File Name' property for the managed resource compiler tool
    	///          associated with all .resx files this class depends on.  Otherwise,
    	///          the designers will not be able to interact properly with localized
    	///          resources associated with this form.
    	/// </summary>
    	public ref class Form1 : public System::Windows::Forms::Form
    			//TODO: Add the constructor code here
    		/// <summary>
    		/// Clean up any resources being used.
    		/// </summary>
    			if (components)
    				delete components;
    	private: System::Windows::Forms::Button^  button1;
    	private: System::Windows::Forms::Label^  label1;
    	private: System::Windows::Forms::Label^  label2;
    	private: System::Windows::Forms::TextBox^  textBox1;
    	private: System::Windows::Forms::TextBox^  textBox2;
    	private: System::Windows::Forms::TextBox^  textBox3;
    	private: System::Windows::Forms::TextBox^  textBox4;
    		/// <summary>
    		/// Required designer variable.
    		/// </summary>
    		System::ComponentModel::Container ^components;
    #pragma region Windows Form Designer generated code
    		/// <summary>
    		/// Required method for Designer support - do not modify
    		/// the contents of this method with the code editor.
    		/// </summary>
    		void InitializeComponent(void)
    			this->button1 = (gcnew System::Windows::Forms::Button());
    			this->label1 = (gcnew System::Windows::Forms::Label());
    			this->label2 = (gcnew System::Windows::Forms::Label());
    			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
    			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
    			this->textBox3 = (gcnew System::Windows::Forms::TextBox());
    			this->textBox4 = (gcnew System::Windows::Forms::TextBox());
    			// button1
    			this->button1->Location = System::Drawing::Point(30, 49);
    			this->button1->Name = L"button1";
    			this->button1->Size = System::Drawing::Size(102, 23);
    			this->button1->TabIndex = 0;
    			this->button1->Text = L"Generate Key";
    			this->button1->UseVisualStyleBackColor = true;
    			// label1
    			this->label1->AutoSize = true;
    			this->label1->Location = System::Drawing::Point(304, 91);
    			this->label1->Name = L"label1";
    			this->label1->Size = System::Drawing::Size(57, 13);
    			this->label1->TabIndex = 1;
    			this->label1->Text = L"By **** ****";
    			// label2
    			this->label2->AutoSize = true;
    			this->label2->Location = System::Drawing::Point(59, 21);
    			this->label2->Name = L"label2";
    			this->label2->Size = System::Drawing::Size(251, 13);
    			this->label2->TabIndex = 2;
    			this->label2->Text = L"Click the Generate Key button to get your Key Code";
    			// textBox1
    			this->textBox1->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
    			this->textBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
    			this->textBox1->Location = System::Drawing::Point(163, 50);
    			this->textBox1->MaxLength = 4;
    			this->textBox1->Name = L"textBox1";
    			this->textBox1->Size = System::Drawing::Size(45, 22);
    			this->textBox1->TabIndex = 10;
    			this->textBox1->WordWrap = false;
    			// textBox2
    			this->textBox2->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
    			this->textBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
    			this->textBox2->Location = System::Drawing::Point(214, 50);
    			this->textBox2->MaxLength = 4;
    			this->textBox2->Name = L"textBox2";
    			this->textBox2->Size = System::Drawing::Size(45, 22);
    			this->textBox2->TabIndex = 11;
    			this->textBox2->WordWrap = false;
    			// textBox3
    			this->textBox3->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
    			this->textBox3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
    			this->textBox3->Location = System::Drawing::Point(265, 50);
    			this->textBox3->MaxLength = 4;
    			this->textBox3->Name = L"textBox3";
    			this->textBox3->Size = System::Drawing::Size(45, 22);
    			this->textBox3->TabIndex = 12;
    			this->textBox3->WordWrap = false;
    			// textBox4
    			this->textBox4->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
    			this->textBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
    			this->textBox4->Location = System::Drawing::Point(316, 50);
    			this->textBox4->MaxLength = 4;
    			this->textBox4->Name = L"textBox4";
    			this->textBox4->Size = System::Drawing::Size(45, 22);
    			this->textBox4->TabIndex = 13;
    			this->textBox4->WordWrap = false;
    			// Form1
    			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
    			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    			this->ClientSize = System::Drawing::Size(373, 113);
    			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
    			this->Name = L"Form1";
    			this->RightToLeftLayout = true;
    			this->Text = L"KeyGen";
    #pragma endregion
    lol big big code

    well i want my program to random generate 4 numbers ( from 0-9 ) and 12 letters ( from A-Z )


    so what i would like is that when i click the button "Generate Key" it will make a random key and then out print it into the text boxs

    so if you can make up a litte code to help me do that or if you have some tips or links or somethink pls post here


  2. #2
    Registered User
    Join Date
    Nov 2006
    If u want to make a keygen for a game , u must first learn to read ASM, download a debugger and find the part where the the key u entered gets checked. reverse engineer that part and insert it in your program to give u keys that are valid. this is a simple explaination for somthing that takes a lot of time. i do not know how to do this, cause i do not know ASM, i do not know how to use a debugger, and im not yet goot enough myself with normal c++ programs.

    but if u are just making a random number/character generator on the otherhand.... i suggest u make, a character array with all the characters from A to Z and just use a rand() function to pic an index from 0 to 25. and just do the same with a integer array. then put them in place and voila...

  3. #3
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    I believe it's possible the topic starter is just interested in simulating a key generator for the express purpose of learning how to randomly build strings.

    If someone is interested in game hacking, or perhaps more properly termed "game cracking", I can only hope that no one would be willing to assist such an attempt on these forums.

  4. #4
    Registered User
    Join Date
    May 2003
    This shouldn't have been moved to C#, the language used is C++/CLI.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  5. #5
    Registered User
    Join Date
    Mar 2007
    Yeah, i actually am trying to do the SAME thing just i don't need it to be real key for a game, i just want a randoms string of numbers and characters to be inserted when they click the "create key" button.....umm yea so either someone could tell me how to do it or could you lonelywolf just give me a shout when u figure it out... TY

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D Game project requires extra C++ programmers, new or experienced
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-16-2007, 10:46 AM
  2. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-22-2006, 12:23 AM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. u got me wrong fellas
    By clover in forum Game Programming
    Replies: 4
    Last Post: 10-18-2003, 04:23 PM
  5. I want to team up with some one to make a cool game.
    By Blizzarddog in forum Game Programming
    Replies: 10
    Last Post: 03-02-2003, 01:18 PM