Jump to content


Photo

Advanced Yet Simple Activation Code


  • Please log in to reply
10 replies to this topic

#1 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 24 January 2008 - 07:09 PM

Ok i recently thought of a great new idea for an activiation system on a software on game.
I want to have a popup with a textbox for me to enter the key and press OK. How does the software recognize the key is valid?
Each activation key has to add up to a number. For example:

"PLEASE INSERT THE ACTIVATION KEY PROVIDED ON YOUR JEWEL CASE:"

10-9-3-10-8

"-" representing "+" as part of the activation key.

All together the above activation key adds up to = 40

I want the code to detect that whatever numbers i have entered into the text box, when i press OK, if the numbers add up to a certain number (the number in my example product being 40) then the key is valid. if not, it will not proceed. This way i can make many validation keys that add up to 40, for example:

20-10-5-5

I tried making the code but failed. any ideas? Could someone develop the code? Have i been descriptive enough?
The code should recognize - as + when the product key is entered. Everyone can use this code safetly and set there own number total for the activation key to add up to.

Hope you can help gmc,

gmkaya!

Edited by gmkaya, 24 January 2008 - 07:12 PM.

  • 0

#2 dannyzs

dannyzs

    GMC Member

  • New Member
  • 67 posts

Posted 24 January 2008 - 07:13 PM

Ok i recently thought of a great new idea for an activiation system on a software on game.
I want to have a popup with a textbox for me to enter the key and press OK. How does the software recognize the key is valid?
Each activation key has to add up to a number. For example:

"PLEASE INSERT THE ACTIVATION KEY PROVIDED ON YOUR JEWEL CASE:"

10-9-3-10-8

"-" representing "+" as part of the activation key.

All together the above activation key adds up to = 40

I want the code to detect that whatever numbers i have entered into the text box, when i press OK, if the numbers add up to a certain number (the number in my example product being 40) then the key is valid. if not, it will not proceed. This way i can make many validation keys that add up to 40, for example:

20-10-5-5

I tried making the code but failed. any ideas? Have i been descriptive enough?
The code should recognize - as +.

Hope you can help gmc,

gmkaya!

<{POST_SNAPBACK}>


Well, I wouldn't have any clue how to do this. However, you might find something info in this topic - http://gmc.yoyogames...6&hl=activation
  • 0

#3 Renegade605

Renegade605

    Xtreme Gamers Ltd.

  • New Member
  • 1333 posts

Posted 24 January 2008 - 07:42 PM

var code,result;
result = false;
code = get_string("Enter your product key","0-0-0-0");
code = string_replace_all(code,"-","+");
execute_string('if (' +code +' == 40) then result = true;');
if (result)
{
   //ACTIVATE THE GAME
}

Note: This is not very secure, as anyone can find out what this is and how it works.
  • 0

#4 Rick_Slick

Rick_Slick

    GMC Member

  • New Member
  • 876 posts

Posted 24 January 2008 - 08:21 PM

What if you did something like this...

F8RE3-R823J-99GU4-ER34K

You would convert each character (not the hyphens) into a value based on a translation table you would store in an array:

regcode[1] = "F"
regvalue[1] = "32"

regcode[2] = "8"
regvalue[2] = "19"

and so on...

You add the values of the characters in each section to come up with four numbers:

ex:

F8RE3-R823J-99GU4-ER34K = 834-285-948-384

And then specify that the first and third numbers have to add up to a certain number (in this case, 1782) and the second and fourth numbers have to add up to a certain number (in this case, 669).

This would be a bit more secure, but the challenge, of course, would be creating the algorithm that works backwards to come up with the original registration code.
  • 0

#5 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 24 January 2008 - 10:11 PM

nice i like the suggestion made above. Could you code this?

Getting back to the original idea, if i set my total number to, say, 3,640,003 (the example one was 40) and used activation keys to add up to that, i wouldnt see how it would be so unsecure. I generally thought it was simple, and could be used for small, commercial games.
  • 0

#6 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 24 January 2008 - 10:21 PM

Ok can someone make the script so that if i enter the incorrect activation key it takes me to the next room. Use the scipt above!

Thanks gmc, you will undoubtably be credited!

gmkaya
  • 0

#7 TadFireBird

TadFireBird

    GMC Member

  • New Member
  • 89 posts

Posted 24 January 2008 - 10:23 PM

Just a thought, try a dll with MD5 encryption. Then encrypt the key code and store the hash in your game file. When the user inputs the code, it is then encrypted and compared with the one in the exe. Much better way of doing it I think.
  • 0

#8 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 24 January 2008 - 11:07 PM

hey everybody dont worry about the code anymore i fixed it:

var code,result;
result = false;
code = get_string("Enter your product key","0-0-0-0");
code = string_replace_all(code,"-","+");
execute_string('if (' +code +' == 40) then result = room_goto(1);');
if (result)
{
  //ACTIVATE THE GAME
}

Will take you to room number 1 if the key is correct.

If you use it, make sure to include a high total number to make it more secure. Possible with many even and uneven digits: 2,000,751

I hope you all enjoy this script!
  • 0

#9 Renegade605

Renegade605

    Xtreme Gamers Ltd.

  • New Member
  • 1333 posts

Posted 24 January 2008 - 11:09 PM

to have actions happen when the user enters an incorrect code, simply add:

else
{
   //STUFF
}

to the end of the first code.
  • 0

#10 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 24 January 2008 - 11:19 PM

and for those of you who wished to place letters in the key aswell as numbers:

var code,result;
result = false;
code = get_string("Enter your product key. Remember to include all letters in upper case:","0-0-0-0");
code = string_replace_all(code,"-","+");
code = string_replace_all(code,"FVG","10");
code = string_replace_all(code,"MEW","20");
code = string_replace_all(code,"VDF","30");
code = string_replace_all(code,"AVM","40");
code = string_replace_all(code,"GQR","50");
code = string_replace_all(code,"HXC","60");
code = string_replace_all(code,"QZS","70");
code = string_replace_all(code,"XER","80");
code = string_replace_all(code,"NOE","90");
code = string_replace_all(code,"BXM","100");
code = string_replace_all(code,"KAE","150");
code = string_replace_all(code,"DRO","200");
code = string_replace_all(code,"IOY","9");
execute_string('if (' +code +' == 23001009) then result = room_goto(1);');
if (result)
{
  //ACTIVATE THE GAME
}

enjoy!
  • 0

#11 Renegade605

Renegade605

    Xtreme Gamers Ltd.

  • New Member
  • 1333 posts

Posted 25 January 2008 - 12:09 AM

so why do you still have all the use of the variable 'result' in there, you're not using it.

Take out ',result' from the first line, remove the second line completely, and everything after (and including) the 'if (result)' line.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users