Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 12:55 am

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1590 posts ]  Go to page 1, 2, 3, 4, 5 ... 64  Next
Author Message
PostPosted: Thu May 14, 2009 6:53 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
Having a email verafaction is good just in case people loose there passwords, and also good for warnings and ban reasons instead of the msgbox.

---------
Basicly easy to copy and paste 2/5
Understanding 3/5

///CLIENT SIDE///


Make your SendNewAccount Look like this.

Code:
Sub SendNewAccount(ByVal Name As String, ByVal Password As String, ByVal Email As String)
Dim Packet As String

    Packet = "newaccount" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & Trim(Email) & SEP_CHAR & END_CHAR
    Call SendData(Packet)
End Sub


Add these into ModConstants

Now add:
Code:
Public Const MENU_STATE_EMAIL = 9


Right now add:
Code:
Public Const EMAIL_LENGTH = 50


Now Find Private SUb Pic_Connect in frmNewaccount and add:

Code:
If Trim(txtName.Text) <> "" And Trim(txtPassword.Text) <> "" And Trim(txtEmail.Text) <> "" Then


Now find Public Sub MenuState(ByVal State As Long) and go to Call SendNewaccount and add:

Code:
frmNewAccount.txtEmail.Text



Now on form frmNewAccount add these:
A text Box with the name of txtEmail and set the caption to nothing(THE NAME OF THE TEXT BOX MATTERS)
Put a label and call it labelemail and set the caption to Email (Doesn't matter on the name of the label)

Ok thats all for Client Side..

///Server Side///

Make your AddAccount look like this:

Code:
Sub AddAccount(ByVal index As Long, ByVal Name As String, ByVal Password As String,ByVal Email As String)
Dim i As Long

    Player(index).Login = Name
    Player(index).Password = Password
    Player(index).Email = Email
   
    For i = 1 To MAX_CHARS
        Call ClearChar(index, i)
    Next i
   
    Call SavePlayer(index)
End Sub


Add Under AccountRec:

Code:
Type EmailRec
    Email As String * EMAIL_LENGTH
End Type


And Now in AccountRec add to the bottom of it:
Code:
Email as string


Now go to ModConstants and add the 2 following constants:

Code:
Public Const EMAIL_LENGTH = 50

Code:
Public Const MAX_EMAIL = 15


Under HandleData add :
Code:
Dim Email As String


Add Under New account Packet

Code:
Email = Parse(3)


And just below that add next to
Code:
Or Len(Trim(Password)) < 3


Code:
Or Len(Trim(Email)) < 15


now find If Not AccountExist(Name) Then change the line Call AddAccount(index, Name, Password) to look like this:

Code:
Call AddAccount(index, Name, Password, Email)


Now find
Code:
Call PutVar(FileName, "GENERAL", "Password", Trim(Player(index).Password))


and add under it.

Code:
Call PutVar(FileName, "GENERAL", "Email", Trim(Player(index).Email))


I think thats about it msn me if there is any problems

_________________
Image


Top
 Profile  
 
PostPosted: Thu May 14, 2009 8:13 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
How would you add a "forgot password" button.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Thu May 14, 2009 8:31 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
add a button then setup either email to ask and have a auto responce with the account name and email in the email, or have it so there are 2 text boxes that have email and account name and then when you click ok it will send you a email. I could try code this if you want me to.

_________________
Image


Top
 Profile  
 
PostPosted: Thu May 14, 2009 10:29 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Hmm would be better if it was email verification. It's a bit useless at the moment but it's a good start.

_________________
Image


Top
 Profile  
 
PostPosted: Fri May 15, 2009 12:07 am 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
How do you send email from vb was my real question.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Fri May 15, 2009 2:07 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Perhaps this can help: http://www.devarticles.com/c/a/Visual-B ... ual-Basic/

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
PostPosted: Fri May 15, 2009 6:43 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
http://www.freevbcode.com/ShowCode.Asp?ID=109

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Fri May 15, 2009 3:29 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
Right im going to work on forgot password button all this weekend, hopefully it wont take that long. Tutorial will be made as soon as i finish.

_________________
Image


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 8:56 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:43 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:44 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
95


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:45 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:46 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:48 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Clif


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:49 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Dean


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:50 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Mich


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:51 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Harl


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:52 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Esta


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:53 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Mere


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:54 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Fiel


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:55 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Clar


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:56 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Barb


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Colu


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:59 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Stok


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 8:00 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Kona


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1590 posts ]  Go to page 1, 2, 3, 4, 5 ... 64  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group