Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Password Stars (***)

Author
Message
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 27th Apr 2003 20:19
If you add some things you cold use it as a password protecter.

EXAMPLE:
Login: Redostrike
Pass: *********

Only heroes live forever.
http://members.lycos.nl/redostrike/RedoTitel.jpg[/img]
The StartStrike project is going good.
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 27th Apr 2003 22:53
Common peeps any inprovement any comments?

Only heroes live forever.

The StartStrike project is going good.
Whisper Wind
21
Years of Service
User Offline
Joined: 5th Apr 2003
Location:
Posted: 27th Apr 2003 23:47
Umm, maybe you should expand on it by having you insert a password un-starred at the beginning like you are creating an account, and then have you insert your password using the little star thing and check it to see if it is correct.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 28th Apr 2003 19:30
I'm unsure how to use that in my code, I want an asterisk (*) to appear for each character they press.

Help please?

I hear and I forget. I see and I remember. I do and I understand.
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 28th Apr 2003 19:44
This code does it but you can't check if the password id typed right. I dontknow how to do that. Sorry.

Only heroes live forever.

The StartStrike project is going good.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 28th Apr 2003 21:36
Could you please show me how to do that with my code please?
I'm a little unsure,
thanks in advance.



I hear and I forget. I see and I remember. I do and I understand.
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 28th Apr 2003 21:45
That is the prob. i dont know i wanted to try this but i dident work. Sorry !

Only heroes live forever.

The StartStrike project is going good.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 28th Apr 2003 21:47
Does someone please know?

I hear and I forget. I see and I remember. I do and I understand.
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 29th Apr 2003 03:25
You need to run it 2 times and check the strings like:

If pass$ = passb$ Then ...

I'll write up a function a little later when I have time.

"All programmers are playwrites and all computers are lousy actors" -Anon
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 29th Apr 2003 03:55
i modificated ..your code a little bit...
not case sensitive:

andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 29th Apr 2003 04:32 Edited at: 29th Apr 2003 04:34
Ok, I'm done. (see source)
It's case sensitive and includes spaces.

To use it just do something like:



You can change the password, messages, and validation (1 for enter twice, 0 for enter once).

"All programmers are playwrites and all computers are lousy actors" -Anon
Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 1st May 2003 06:14
hmmm thats pretty kewl. that would be good for MMOGs or even a single player game with maybe different players and loading games(so someone else doesn't load up and corrupt your game *thinks back to a few past experiences*)

*quickly stores the code into a snippet

Current Status: learning MORE about dbpro
I consider myself: newb
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 16:11
Andrew I'm not quite sure how to incorporate that, I'm new to functions..

could you write a small piece of code that uses the function please?
like lets say:


I hear and I forget. I see and I remember. I do and I understand.
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 4th May 2003 17:43
I'm surprised no-one's tried it this way.


Hope this helps

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 18:17
Is that in real-time?

Like you press 1, it comes up in a * as you press it?

I hear and I forget. I see and I remember. I do and I understand.
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 4th May 2003 20:53
It should do that. It also allows you to delete stuff and the number of stars is reduced.

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 4th May 2003 21:53 Edited at: 4th May 2003 21:54
You need to do:

If password([parameters])
[code goes here]
Endif

Inside the parenthesis you put:

-password string
-message to enter password
-message to reenter password
-message when password is correct
-message when password is incorrect
-validate? (1 for enter twice, 0 for enter once.)

Example:
If password("password", "Enter Password", "Re-enter Password", "Password Ok","Access denied",1) Then .....

@witchbomber

Mine does that too. It also allows reentry of passwords and checks them.

"All programmers are playwrites and all computers are lousy actors" -Anon
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 4th May 2003 22:51
Yeah I didn't see the source button, but I noticed with yours because you didn't use the entry buffer you missed some characters when typed at speed. However, I might use your idea of a function with Re-enter password etc. In my games I actually just end the program if someone enters an incorrect password! That really needs changing.

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 5th May 2003 02:28
The stars aren't reduced because their still on the screen but if u used an integer to count the number of stars and the used a cls command at the front of the loop and print the num of stars every time it loops.

Sit in reverie and watch the changing color of the waves that break upon the idle seashore of the mind.
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 5th May 2003 03:29
I didn't post the whole code because that was lifted from part of a game but in the game I had a cls command. The reason it wasn't in there was because I had other things in there (username, continue button) and I edited these out.

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 5th May 2003 22:40 Edited at: 5th May 2003 22:43
I tried entry$(), but sometimes if you press backspace, it adds a star. I'm not sure why. I usually use inkey$() even though it goes too fast and skips sometimes.

"All programmers are playwrites and all computers are lousy actors" -Anon
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 6th May 2003 18:55
I've never had a problem with adding a star with backspace. The code I posted deletes the last character if you press backspace. For an example of my code working download http://www.apollo-design.com/pinball.zip

Visit the new Madd Matt Games Website
http://www.madamattgames.o-f.com/index.htm
Home of Witch Bomber,Magic Cube and Pinball Football(and a lame website)
Xahjck
21
Years of Service
User Offline
Joined: 6th May 2003
Location: United States
Posted: 11th May 2003 03:51
Okay, well I was reading this n' all and I decided I liked witchbomber's code so I copied it into an empty program and ran it... by ALL means no offense... but it lacked. Therefor I, er, tweaked it a bit. Just a little I promise.

Anywho though, onto the good stuff. The code in this program is simple enough to the point where I think it can be run in even earlier versions of DB... not sure though so don't hurt me (. I added username, changed the password stuff, and added ENCODED saving and loading of the password. Mind you the level of encoding was designed to keep SOME people from deciphering it. However it's in ASCII (American Standard Code for Information Interchange) and there are MANY books ect. out there that can help someone decode it with ease. So my point is if you plan on making some top-level government security program... i'd recommend increasing how many times it encodes it or something of the like.



Quote: "System Specs: P4 1.6Ghz, 512MB RAM, ATI Rage 128 GL PCI Graphics Card, 17" Monitor, AC'97 Audio, Windows XP Professional on C:\, Windows 98 SE on D:\, A:\ 3½" Floppy, C:\ 80GB Western Digital, D:\ 4GB Fujitsu, E:\ 56x CD-Rom, F:\ 16x/12x/40x CD/RW"


Xahjck
21
Years of Service
User Offline
Joined: 6th May 2003
Location: United States
Posted: 11th May 2003 04:02
P.S. to ya: Sorry for makin' it so long but I figured SOMEONE out there might like something I didn't add in... so I added it all.

"Oh I'm sorry, did I break your concentration?!" -Samuel L. Jackson, Pulp Fiction
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th May 2003 08:36
you used reserved words for your gosubs which makes it bomb hard in dBP. DBC can effectively run it fine but it would need more tinkering to be properly executed.

Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th May 2003 00:27
i just had a bored moment.. so i thought i would give passwords stars ago myself from scratch to see what I could come out with.. its not for anyone to really use (feel free, but its not too great ) but more just some mental streching for myselfs XD figured i would whack it up here for fun.

Complete with x, y, prompt parameters and funky blinky cursor thingy thing >.>

Login to post a reply

Server time is: 2024-11-24 04:23:44
Your offset time is: 2024-11-24 04:23:44