Proper pasword scripts

Tutorials for Call of Duty 4 mapping

Moderator: Core Staff

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Proper pasword scripts

Post by megazor » May 24th, 2010, 5:29 am

If you are going to create a map with password input system, my advices may help you.

Sooner or later, all players learn the password (someone give it to them) and unfortunately they just enter it instead of looking for a way to get it. It makes me sick -.-

Therefore I decided that the password should be random-generated and (optionally) changed after each successful input.

For my map I wrote a code that generates random quadratic equations; its form is ax^2 + bx + c = 0; the two roots are integers of the interval (-1000; 1000):

Code: Select all

level.x1 = randomIntRange(-1000, 1000);
level.x2 = randomIntRange(-1000, 1000);
level.b = (level.x1+level.x2)*(-1);
level.c = level.x1*level.x2;
or
x^2 + bx + c = 0

yeah, a is 1, but this doesn't really matter, it is still as diffucult to solve as if the number a wasn't equal with 1.

1. The majority of players are unable to solve quadratic equations.
2. If someone learns the code, it will be unable to be used one more time, as it is automatically changed upon the putting into the system.

These facts make my code system be much better than having an invariable password.
You are able not to use the equation way. There are lots of different ways, for example making a big gap jump and a button placed beyond of the gap; if pressed, the button tells the code (random generated, of course).

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Proper pasword scripts

Post by megazor » May 24th, 2010, 5:32 am

For some reason I can't edit my posts. I've made a mistake in the code, it should have been:

Code: Select all

level.x2 = randomIntRange(-1000, 1000);

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: Proper pasword scripts

Post by Moustache » May 24th, 2010, 10:04 am

megazor wrote:lol... what an idiot...
:?:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Proper pasword scripts

Post by Drofder2004 » May 24th, 2010, 11:32 am

Not sure the point of using quadratic equations to forma random password...

simply doing

Code: Select all

level.password = "";
level.password = spawnStruct();
level.password.a = rand(10);
level.password.b = rand(10);
level.password.c = rand(10);
level.password.d = rand(10);
level.password = "" + level.password.a + level.password.b + level.password.c + level.password.d;
Then you can at trigger points print indivdual numbers...

If you want this to be even better, you can instead of using level, use self and then each player is assigned their own password, different to each other player.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Proper pasword scripts

Post by megazor » May 24th, 2010, 11:35 am

no no and no. I wanted to make it so that only clever players can get into the secret room.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Proper pasword scripts

Post by Drofder2004 » May 24th, 2010, 11:36 am

megazor wrote:no no and no. I wanted to make it so that only clever players can get into the secret room.
Ok, fair enough, I thought you were simply creating a random script...
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Proper pasword scripts

Post by megazor » May 24th, 2010, 11:37 am

that is why i wrote
You are able not to use the equation way. There are lots of different ways, for example making a big gap jump and a button placed beyond of the gap; if pressed, the button tells the code (random generated, of course).

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Proper pasword scripts

Post by Drofder2004 » May 24th, 2010, 5:04 pm

Nothing really.

A more complex puzzle would be to simply create your own logic. For example, why not program the enigma code?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Proper pasword scripts

Post by Pedsdude » May 24th, 2010, 5:39 pm

Differentiation/integration ftw, that'll keep most of the noobs out.
Image
Image

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Proper pasword scripts

Post by Rezil » May 24th, 2010, 5:43 pm

Integration ftw.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Proper pasword scripts

Post by Pedsdude » May 24th, 2010, 5:47 pm

Do integration by substitution and you'll be sorted.

But then again, they can use Wolfram if they have any common sense :(
Image
Image

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Proper pasword scripts

Post by megazor » May 25th, 2010, 1:42 am

Am I the only one thinking that you don't have to be clever to solve a quadratic equation...
You unfortunately can't think like a child. Being an adult, it seems so easy. but believe me, 95% of players can't solve quadratic equations and hardly ever anyone of them will visit wikipedia for it. It is actually good elimination.
Even knowing the formula, they will be perhaps unable to realize what a, b, c are. many players don't even know what square root is and so on.

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Proper pasword scripts

Post by megazor » May 25th, 2010, 1:46 am

why not program the enigma code?
what is it? explain in detail

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Proper pasword scripts

Post by Pedsdude » May 25th, 2010, 1:54 am

megazor wrote:
why not program the enigma code?
what is it? explain in detail
http://tinyurl.com/32exclk
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Proper pasword scripts

Post by Drofder2004 » May 25th, 2010, 2:09 pm

megazor wrote:
why not program the enigma code?
what is it? explain in detail
Mathematical description.

Code: Select all

E = P(ρiRρ − i)(ρjMρ − j)(ρkLρ − k)U(ρkL − 1ρ − k)(ρjM − 1ρ − j)(ρiR − 1ρ − i)P  − 1.
In other words, it a complex encryption technique that doesn't require computers...
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests